MathGroup Archive 2006

[Date Index] [Thread Index] [Author Index]

Search the Archive

How to find expected value?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg66189] How to find expected value?
  • From: mshunko at gmail.com
  • Date: Wed, 3 May 2006 02:45:48 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

Hi,

I am new to Mathematica and I am trying to calculate the expected value
of a function using the code pasted below. However, mathematica does
not find it and just spits back the last line of code. Could you please
help me figure out how to evaluate the expected value?

Thank you,
Masha

\!\(Clear["\<Global`*\>"]\[IndentingNewLine]
  Remove["\<Global`*\>"]\[IndentingNewLine]
  << Statistics`ContinuousDistributions`\[IndentingNewLine]
  << Statistics`DescriptiveStatistics`\[IndentingNewLine]
  h[q_]\  := PDF[NormalDistribution[μq, Ï?q], q]\[IndentingNewLine]
  g[c_]\  := PDF[NormalDistribution[μc, Ï?c], c]\[IndentingNewLine]
  \(pio\  = \ p\ q\  - \ c\ q;\)\[IndentingNewLine]
  \(pif\  = \ b\ μq\ \(â?«\_μ_c\%â??\((c - μc)\)\ g[
    c] \[DifferentialD]c\) + \ a\ μq\ \((c\  - \ μc)\)\  - \ Po\ b\
      μq;\)\[IndentingNewLine]
  pit\  = \ pio + pif\[IndentingNewLine]
  util\  = \ Exp[\(-r\)*W]\ Exp[\(-r\)*β\ pit]\
Exp[r*ch]\[IndentingNewLine]
  ExpectedValue[util, g[c], c]\)


  • Prev by Date: Beginner--Help on using FindRoot to solve the system of equations
  • Next by Date: Re: Function of function analytic definition
  • Previous by thread: Re: Beginner--Help on using FindRoot to solve the system of equations
  • Next by thread: Re: How to find expected value?