2
$\begingroup$

Say $Y=g(X)$ and $p_X = \frac{e^{-\frac{(\mu -\log (x))^2}{2 \sigma ^2}}}{\sqrt{2 \pi } x \sigma }$ is Log-normal density function: [Wiki]

Find E[Y]?

Since $E[Y] = \int_0^\infty y f_Y \ dy = \int_0^\infty g(x)f_X(x)dx$. So, I do not need to find $f_Y(y)$.

.    
px = Simplify[PDF[LogNormalDistribution[Mu, Sigma], x], x > 0]
Integrate[Log2[1 + x] px, {x, 0, \Infinity}, Assumptions -> {Sigma > 0}]
.

Unfortunately, Mathematica cannot evaluate this integral for a closed form expression and I'm not quite sure how else to solve it. Will appreaciate any help I can get on the evaluation steps.

Edit:

I've also tried the code below with no results:

 Expectation[Log2[1 + x], x \[Distributed] LogNormalDistribution[Mu, Sigma]]
$\endgroup$
0

2 Answers 2

1
$\begingroup$

I suspect there may not be a closed form expression (I have not looked at it hard enough). If the aim is to not analytical but numerical, I post the following for illustration (apologies if not the intent of question):

f[x_, y_] := 
 NIntegrate[
  Log2[t + 1] Exp[-(x - Log[t])^2/(2 y^2)]/(Sqrt[2 Pi] t y), {t, 0, 
   Infinity}]
rv[a_, b_, n_] := 
 Mean[Log2[1 + RandomVariate[LogNormalDistribution[a, b], n]]]
Manipulate[
 Show[Plot[f[m, s], {m, 1, 5}, PlotRange -> {0, 7}], 
  ListPlot[Table[{j, rv[j, s, n]}, {j, 1, 5, 0.1}], 
   PlotMarkers -> {"\[FilledDiamond]", 10}, PlotStyle -> Red]], {s, 1,
   5}, {n, {10, 100, 1000, 10000}}]

enter image description here

$\endgroup$
0
$\begingroup$

You can also depict the expected value nicely as a function of Mu and Sigma using Plot3D.

px = Simplify[PDF[LogNormalDistribution[Mu, Sigma], x], x > 0]

E^(-((Mu - Log[x])^2/(2 Sigma^2)))/(Sqrt[2 π] Sigma x)

Plot3D[NIntegrate[Log2[1 + x] px, {x, 0, ∞}], {Mu, -5, 
  10}, {Sigma, .2, 2}, AxesLabel -> {Mu, Sigma, EY}]

Expected value of a log-normal Distribution as a function of Mu and Sigma

PS: Reminds me of Black-Scholes formula for the evaluation of an Option.

Extending the range of Sigma Shows the nontrivial dependence more clearly:

Expected value of a log-normal Distribution as a function of Mu and Sigma

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.