Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Derivation of Lognormal mean

  1. Feb 9, 2009 #1
    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: Feb 9, 2009
  2. jcsd
  3. Feb 9, 2009 #2
    I made this a bit more readable, any ideas?
     
  4. Feb 10, 2009 #3

    mathman

    User Avatar
    Science Advisor
    Gold Member

    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.
     
  5. Feb 10, 2009 #4
    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" [Broken] 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: May 4, 2017
  6. Feb 11, 2009 #5

    mathman

    User Avatar
    Science Advisor
    Gold Member

    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.
     
  7. Feb 12, 2009 #6
    Thanks! Very much appreciated: you assume correctly!

    Thanks for you help.
     
  8. Feb 12, 2009 #7

    BWV

    User Avatar

    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
     
  9. Feb 12, 2009 #8
    yeh, sorry, that is the result I got, neglected to fix the typo...
     
  10. Feb 13, 2009 #9

    mathman

    User Avatar
    Science Advisor
    Gold Member

    I decided to work it out myself. I agree with BWV.
     
  11. Feb 14, 2009 #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.
     
  12. May 15, 2009 #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)*
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook