How Do You Integrate the Lognormal Function to Find Its Mean?

  • Thread starter Thread starter jacophile
  • Start date Start date
  • Tags Tags
    Derivation Mean
jacophile
Messages
22
Reaction score
0
Hi, I am curious as to the strategy for integrating the lognormal function to calculate the mean.

The integral to be solved is:

\frac{1}{S\sqrt{2\pi}}\int_{0}^{\infty} \frac{e^{(lnx-M)^{2}}}{2S^{2}} dx

I was trying to do it by a substitution

y=lnx\;\rightarrow\;dy=\frac{1}{x}dx

x=e^{y}\;\rightarrow\;dx=e^{y}dy

to give

\frac{1}{S\sqrt{2\pi}}\int_{-\infty}^{\infty} \frac{e^{(y-M)^{2}}}{2S^{2}}e^{y} dy

and then integration by parts, but I keep going round in circles with vdu and what not…

Can anyone enlighten me on the trick to this?
 
Last edited:
Physics news on Phys.org
I made this a bit more readable, any ideas?
 
It looks like you have two errors in your statement. The 2S^2 probably belongs as a divisor in the exponent. Also there should be a minus in the exponent, otherwise the integrand will blow up at both ends.
In any case the exponent in y is a quadratic polynomial. Recast it in the form -[(y-k)^2]/[2S^2] +n, where k and n are constants. The final answer will be e^n.
 
jacophile said:
Hi, I am curious as to the strategy for integrating the lognormal function to calculate the mean.

The integral to be solved is:

\frac{1}{S\sqrt{2\pi}}\int_{0}^{\infty} e^{-\frac{(lnx-M)^{2}}{2S^{2}}}\; dx

I was trying to do it by a substitution

y=lnx\;\rightarrow\;dy=\frac{1}{x}dx

x=e^{y}\;\rightarrow\;dx=e^{y}dy

to give

\frac{1}{S\sqrt{2\pi}}\int_{-\infty}^{\infty} e^{-\frac{(y-M)^{2}}{2S^{2}}}e^{y}\; dy

and then integration by parts, but I keep going round in circles with vdu and what not…

Can anyone enlighten me on the trick to this?

Thanks, you are right, I have fixed the typos.
Not sure I understand your suggestion though...

Do you mean combine the two exponents into one and re-factorise the resultant polynomial?

The reason I am trying to understand this is that http://mathworld.wolfram.com/LogNormalDistribution.html" they state (in reference to the moments of the lognormal distribution) that the following can be found by direct integration:

\frac{1}{S\sqrt{2\pi}}\int_{-\infty}^{\infty} e^{-\frac{(y-M)^{2}}{2S^{2}}}e^{y}\; dy \;=\;e^{\frac{M+S^2}{2}}
 
Last edited by a moderator:
Now that you've got the exponent right, work out what the constants a and b are for:
-(y-M)2/2S2 + y =-(y-a)2/2S2 + b.

I presume that b will turn out to be (M+S2)/2.
 
Thanks! Very much appreciated: you assume correctly!

Thanks for you help.
 
but the mean of a lognormal distribution is e^{\mu + \sigma^2/2} not e^{(\mu + \sigma^2)/2}

it can be derived as a limit of geometric brownian motion
 
yeh, sorry, that is the result I got, neglected to fix the typo...
 
I decided to work it out myself. I agree with BWV.
 
  • #10
Yes, sorry, that is what I meant in my last post. I got e^{\mu + \sigma^2/2}<br /> as well. It was just a typo in my previous posts.
 
  • #11
pdf f(x)=1/(x*S*sqrt(2*pie))*integral exp(-((lnx)-m)^2/(2*S^2))dx
mean=integral((f(x).x.)dx /*x will cancel up in this case)
mean= integral(1/(S*sqrt(2*pie)*exp(-((lnx)-m)^2/(2*S^2))dx
solving as you discuseed by assuming ln(x)=y we get
integral(1/(S*sqrt(2*pie)*exp(-(y-m)^2/(2*S^2))* exp^ydx
1/(S*sqrt(2*pie))*integral exp(-(y-m)/(2*S^2) + y) dy /* limit - infinity to infity will not change due to replcement of lnx by y)
1/(S*sqrt(2*pie))*integral exp(-1/(2*s)*(( y-(m+s))^2 -(s^2+2ms))
exp(1/(S*sqrt(2*pie)*(s^2+2ms)* integral (1/(S*sqrt(2*pie))*(-1/(2*s)*( y-(m+s))^2)


integral (1/(S*sqrt(2*pie)*(-1/(2*s)*( y-(m+s))^2) is standard normal distrbution with mean (m+s) and variance s. so it will be equal to one.
one firstpart will be left
exp(1/(S*sqrt(2*pie)*(s^2+2ms)*
 
Back
Top