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

In summary: M+S^2/2) In summary, the strategy for integrating the lognormal function to calculate the mean involves using a substitution and then integration by parts. The final answer can be found by combining the two exponents into one and re-factorizing the resultant polynomial, which can be simplified to e^(M+S^2/2). The mean of a lognormal distribution can also be derived as a limit of geometric brownian motion.
  • #1
jacophile
22
0
Hi, I am curious as to the strategy for integrating the lognormal function to calculate the mean.

The integral to be solved is:

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

I was trying to do it by a substitution

[tex]y=lnx\;\rightarrow\;dy=\frac{1}{x}dx[/tex]

[tex]x=e^{y}\;\rightarrow\;dx=e^{y}dy[/tex]

to give

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

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
  • #2
I made this a bit more readable, any ideas?
 
  • #3
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.
 
  • #4
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:

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

I was trying to do it by a substitution

[tex]y=lnx\;\rightarrow\;dy=\frac{1}{x}dx[/tex]

[tex]x=e^{y}\;\rightarrow\;dx=e^{y}dy[/tex]

to give

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

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:

[tex]\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}}[/tex]
 
Last edited by a moderator:
  • #5
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.
 
  • #6
Thanks! Very much appreciated: you assume correctly!

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

it can be derived as a limit of geometric brownian motion
 
  • #8
yeh, sorry, that is the result I got, neglected to fix the typo...
 
  • #9
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 [itex] e^{\mu + \sigma^2/2}
[/itex] 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)*
 

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

What is a lognormal distribution?

A lognormal distribution is a probability distribution that is commonly used to model data that is skewed to the right. It is characterized by the fact that the logarithm of the data follows a normal distribution.

How is the mean of a lognormal distribution calculated?

The mean of a lognormal distribution is calculated by taking the exponential of the mean of the underlying normal distribution. In other words, if the mean of the normal distribution is μ, then the mean of the lognormal distribution is eμ.

Why is the mean of a lognormal distribution not equal to its median?

The mean and median of a lognormal distribution are not equal because the distribution is skewed to the right. This means that there are more values on the right side of the distribution, causing the mean to be pulled towards larger values while the median stays in the middle.

How is the mean of a lognormal distribution affected by changes in its parameters?

Changes in the parameters of a lognormal distribution, such as the mean and standard deviation of the underlying normal distribution, will affect the mean of the lognormal distribution. Specifically, increasing the mean and/or standard deviation of the normal distribution will result in a higher mean for the lognormal distribution.

Can the mean of a lognormal distribution be negative?

No, the mean of a lognormal distribution cannot be negative. Since the distribution is skewed to the right, the mean will always be greater than 0. If the underlying normal distribution has a mean of 0, then the mean of the lognormal distribution will be equal to 1.

Similar threads

Back
Top