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?