How to compute moments of log normal distribution?
Sebastian Wright
The computed moments of log normal distribution can be found here. How to compute them?
$\endgroup$ 12 Answers
$\begingroup$If $X$ is lognormal, then $Y = \log X$ is normal. So consider $${\rm E}[X^k] = {\rm E}[e^{kY}] = \int_{y=-\infty}^\infty e^{ky} \frac{1}{\sqrt{2\pi}\sigma} e^{-(y-\mu)^2/(2\sigma^2)} \, dy. $$ Now observe that $$\begin{align*} ky - \frac{(y-\mu)^2}{2\sigma^2} &= - \frac{-2k\sigma^2 y + y^2 - 2\mu y + \mu^2}{2\sigma^2} \\ &= -\frac{1}{2\sigma^2}\left(y^2 - 2(\mu + k\sigma^2)y + (\mu + k \sigma^2)^2 + \mu^2 - (\mu + k \sigma^2)^2\right) \\ &= -\frac{\left(y - (\mu+k\sigma^2)\right)^2}{2\sigma^2} + \frac{k(2\mu + k \sigma^2)}{2}. \end{align*}$$ Thus the $k^{\rm th}$ raw moment is simply $${\rm E}[X^k] = e^{k(2\mu + k\sigma^2)/2} \int_{y=-\infty}^\infty \frac{1}{\sqrt{2\pi}\sigma} e^{-(y - \mu')^2/(2\sigma^2)} \, dy,$$ where $\mu' = \mu + k \sigma^2$. But this latter integral is equal to 1, being the integral of a normal density with mean $\mu'$ and variance $\sigma^2$. So ${\rm E}[X^k] = e^{k(2\mu + k\sigma^2)/2}$. The variance of $X$ is then easily calculated from ${\rm Var}[X] = {\rm E}[X^2] - {\rm E}[X]^2$.
In fact, the expression for the $k^{\rm th}$ raw moment of $X$ that we derived is actually also the moment generating function of $Y = \log X$.
Addendum. A somewhat different computation can be made from the observation that $$\frac{Y - \mu}{\sigma} = Z \sim \operatorname{Normal}(0,1),$$ so $$\operatorname{E}[X^k] = \operatorname{E}[e^{kY}] = \operatorname{E}[e^{k(\sigma Z + \mu)}] = e^{k \mu + (k \sigma)^2/2} \operatorname{E}[e^{(k\sigma) Z - (k\sigma)^2/2}].$$ Then $$\operatorname{E}[e^{(k \sigma) Z - (k \sigma)^2/2}] = \int_{z=-\infty}^\infty \frac{e^{-z^2/2 + (k \sigma) z - (k \sigma)^2/2}}{\sqrt{2\pi}} \, dz = \int_{z=-\infty}^\infty \frac{e^{-(z-k\sigma)^2/2}}{\sqrt{2\pi}} \, dz = 1,$$ and the result is proven.
$\endgroup$ 5 $\begingroup$First let us write $X = \exp Y$ where $Y$ is normal. Let us denote $\operatorname{E}\left[Y\right]=\mu$ and $\operatorname{Var}\left[Y\right]=\sigma^2$. We can write $Y = \mu + \sigma Z$ where $Z\sim N(0,1)$. Therefore
$$\operatorname{E}\left[X^k\right]=\operatorname{E}\left[e^{kY}\right]=\operatorname{E}\left[e^{k\mu + k\sigma Y}\right]=e^{k\mu}\operatorname{E}\left[e^{k\sigma Z}\right]=e^{k\mu}\sum_{n=0}^\infty\frac{(k\sigma)^n}{n!}\operatorname{E}\left[Z^n\right]$$
Let us find the moments of normal distribution. Note from the symmetry that
$$\operatorname{E}\left[Z^{2n+1}\right]=0\qquad ,n=0,1,2,\ldots$$
From the Central Limit Theorem on a set $\{Z_1,Z_2,\ldots Z_m\}$ of i.i.d. random variables with $Z_1 \sim N(0,1)$ we have
$$\frac{\bar{Z}-0}{1/\sqrt{m}}= \frac{1}{\sqrt{m}}\sum_{i=1}^m Z_i \overset{m\rightarrow\infty}{\longrightarrow} Z \sim N(0,1)$$
Therefore (only even exponents)$$\operatorname{E}\left[Z^{2n}\right]\approx \frac{1}{m^n}\operatorname{E}\left[\sum_{i_1,i_2,\ldots,i_{2n}} Z_{i_1}Z_{i_2}\cdots Z_{i_{2n}}\right]$$
In the limit $m\rightarrow\infty$ the only dominant term comes from a summation of most distinct combinations. The most populous combinations are ones which contain only pairs of $Z_i$ and $Z_j$ with the same $i=j$. The combinations with quadruples $Z_iZ_iZ_iZ_i$ and higher order of repetition are even less present. We will therefore count the number of possible pairings. Since $m$ is large and $\operatorname{E}\left[Z_i^2\right]=1$ for any $i$, the problem is eqivalent to counting the number of words which consist of $2n$ letters, the letters are $L_1,L_2,L_3,\ldots,L_n$ and each letter is twice in the word (factor $m^n$ is cancelled, for each $L_i$ there is one $m$). Accorgind to the formula for repeated permutations, there exactly
$$\frac{(2n)!}{2!2!\cdots 2!}=\frac{(2n)!}{2!^n}$$
words. There words represents different "coloring" or assigment for $i_{j}$. Since there are exactly $n$ of these $i_j$'s and since they can be interchanged in the sum, we get
$$\operatorname{E}\left[Z^{2n}\right] = \frac{(2n)!}{2!^n n!}$$
Substituting this result into the formula for $\operatorname{E}\left[X^k\right]$, we get
$\endgroup$$$\operatorname{E}\left[X^k\right]=e^{k\mu}\sum_{n=0}^\infty\frac{(k\sigma)^{2n}}{(2n)!}\frac{(2n)!}{2!^n n!} = e^{k\mu}\sum_{n=0}^\infty\frac{1}{n!}\left(\frac{k^2\sigma^2}{2}\right)^{n} = e^{k\mu}e^{\frac12 k^2 \sigma^2} = \exp\left(k\mu+\frac12 k^2 \sigma^2\right)$$