Group Abstract Group Abstract

Message Boards Message Boards

Get the expected value from a function?

Posted 6 years ago

I can easily solve:

ExpectedValue[(1 + x)^2, 
 LogNormalDistribution[\[Mu], \[Sigma]], x]

1 + 2 E^(\[Mu] + \[Sigma]^2/2) + E^(2 \[Mu] + 2 \[Sigma]^2)

But when I try to solve

ExpectedValue[(1 + x)^0.3, LogNormalDistribution[\[Mu], \[Sigma]], x]

Mathematica freezes and finally return the input itself. Any idea why? Thanks

POSTED BY: Y Getachew
4 Replies

Hi Because Mathematica dosen't know a closed form solution for define integral.

ExpectedValue[(1 + x)^2, LogNormalDistribution[\[Mu], \[Sigma]], x]
(*1 + 2 E^(\[Mu] + \[Sigma]^2/2) + E^(2 \[Mu] + 2 \[Sigma]^2)*)

is the same as:

Integrate[(1 + x)^2*
  PDF[LogNormalDistribution[\[Mu], \[Sigma]], x], {x, 0, Infinity}, 
 Assumptions -> {\[Mu] > 0, \[Sigma] > 0}]

  (*1 + 2 E^(\[Mu] + \[Sigma]^2/2) + E^(2 \[Mu] + 2 \[Sigma]^2)*)

but:

Integrate[(1 + x)^(3/10)*PDF[LogNormalDistribution[\[Mu], \[Sigma]], x], {x, 0, Infinity}, 
Assumptions -> {\[Mu] > 0, \[Sigma] > 0}]
(*Return input*)

You can solve numericaly,for example:

\[Mu] = 1; \[Sigma] = 1;
NIntegrate[(1 + x)^(3/10)*PDF[LogNormalDistribution[\[Mu], \[Sigma]], x], {x, 0, Infinity}]
(*1.56169*)

Regards M.I.

POSTED BY: Mariusz Iwaniuk
Posted 6 years ago

Thanks Mariusz!

POSTED BY: Y Getachew
Posted 6 years ago

See the answer where you simultaneously posted the same question: https://mathematica.stackexchange.com/questions/204609/expected-value-of-a-lognormal-distribution.

POSTED BY: Jim Baldwin
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard