could someone explain why the log-normal distribution's mean is
$$ e^{u + {\sigma^2\over2} } $$ and the variance is
$$ (e^{\sigma^2} -1)e^{{2u} + \sigma^2} $$
I'm not too sure how these are derived..
could someone explain why the log-normal distribution's mean is
$$ e^{u + {\sigma^2\over2} } $$ and the variance is
$$ (e^{\sigma^2} -1)e^{{2u} + \sigma^2} $$
I'm not too sure how these are derived..
On
Let $Y$ be the random variable which obeys a log normal distribution and $Z=log(Y)$. We know that $Z$ obeys a normal distribution, let $\mu$ be its mean and $\sigma^2$ its variance.
The moment generating function of the normal distribution is,
$$M(t)= E(e^{Zt}) = e^{\mu t+\sigma^2t^2/2},$$
evaluating this at $t=1$ we obtain,
$$ M(1) = e^{\mu+\sigma^2/2} = E(e^{Z}) = E(Y) $$
which is the mean of $Y$,
$$ \boxed{ E(Y) = e^{\mu+\sigma^2/2} } $$
The variance of $Y$ is,
$$Var(Y) = E(Y^2) - E(Y)^2,$$
to get $E(Y^2)$ we evaluate $M(2)$ to obtain,
$$ M(2) = e^{2 (\mu + \sigma^2) } = E(e^{2Z}) = E(Y^2), $$
substituting this into the equation for the variance we get,
$$Var(Y) = e^{2 (\mu + \sigma^2) } - e^{2\mu+\sigma^2}, $$
which can be factored to obtain,
$$\boxed{Var(Y) = e^{2 \mu+\sigma^2}( e^{\sigma^2} - 1)}. $$
$X\sim \text{log-normal}(\mu,\sigma^2)$ means $Y=\log X\sim N(\mu,\sigma^2)$. So $X=e^Y$ and $Y\sim N(\mu,\sigma^2)$. Let $Z=\dfrac{Y-\mu} \sigma$ so that $Z\sim N(0,1)$. Then $X = e^Y = e^{\mu+\sigma Z}$ and for any measurable set $A$, $$ \Pr(Z\in A) = \int_A \varphi(z)\,dz \quad \text{ where } \varphi(z) = \frac 1 {\sqrt{2\pi}} e^{-z^2/2}. $$ So \begin{align} & \operatorname{E} (X) = \operatorname{E}(e^{\mu+\sigma Z}) = e^\mu \operatorname{E} (e^{\sigma Z}) = e^\mu \int_{-\infty}^\infty e^{\sigma z} \frac 1 {\sqrt{2\pi}} e^{-z^2/2}\,dz \\[10pt] = {} & e^\mu \int_{-\infty}^\infty \frac 1 {\sqrt{2\pi}} e^{-(z^2 - 2\sigma z)/2}\,dz. \tag 1 \end{align} Now complete the square: $$ z^2 - 2\sigma z = \Big(z^2 - 2\sigma z + \sigma^2\Big) -\sigma^2 = (z-\sigma)^2 - \sigma^2. $$ Thus $(1)$ becomes $$ e^\mu \int_{-\infty}^\infty \frac 1 {\sqrt{2\pi}} e^{-(z-\sigma)^2/2} \cdot e^{\sigma^2/2} \, dz = e^{\mu+\sigma^2/2} \int_{-\infty}^\infty \frac 1 {\sqrt{2\pi}} e^{-(z-\sigma)^2/2} \, dz. $$ This last integral is the integral of the same density function except that it is shifted $\sigma$ units to the right. That doesn't change the area under the curve, so the value of this integral is still $1$.
Recall that $\operatorname{var}(X) = \operatorname{E}(X^2) - (\operatorname{E}(X))^2$. To find $\operatorname{E}(X^2)$, write it as $\operatorname{E}(e^{2\mu+2\sigma Z})$ and then the rest is very similar to what is above.