# lognormal distribution

• May 23rd 2009, 04:44 AM
anonder
lognormal distribution
Hi all, i have a few parts to a question that I'm not too sure about, and i was wondering if anyone could help me out.

I'll start with one and add more in if i still need help.

I'm having trouble deriving the E(X) of the log normal distribution.

I believe i should be using moment generating functions of the normal distribution and applying a X = exp(Y) transformation? But I'm not entirely sure how to use them both to derive it.

Thanks!
• May 23rd 2009, 05:00 AM
Isomorphism
Quote:

Originally Posted by anonder
Hi all, i have a few parts to a question that I'm not too sure about, and i was wondering if anyone could help me out.

I'll start with one and add more in if i still need help.

I'm having trouble deriving the E(X) of the log normal distribution.

I believe i should be using moment generating functions of the normal distribution and applying a X = exp(Y) transformation? But I'm not entirely sure how to use them both to derive it.

Thanks!

Let $X$ be normal with mean $m$ and variance $\sigma ^2$, then $e^X$ is lognormal.

$\mathbb{E}(e^X) = \phi_X(1)$, where $\phi$ is the MGF/characteristic fn(I dont what people call them exactly)

Since $\phi_X(s) = \mathbb{E}(e^{sX}) = \text{exp}\left(\frac{s^2 \sigma ^2}2 + ms\right)$, we have $\mathbb{E}(e^X) = \text{exp}\left(\frac{\sigma ^2}2 + m\right)$
• May 23rd 2009, 05:07 AM
Moo
Hello,
Quote:

Originally Posted by anonder
Hi all, i have a few parts to a question that I'm not too sure about, and i was wondering if anyone could help me out.

I'll start with one and add more in if i still need help.

I'm having trouble deriving the E(X) of the log normal distribution.

I believe i should be using moment generating functions of the normal distribution and applying a X = exp(Y) transformation? But I'm not entirely sure how to use them both to derive it.

Thanks!

*without MGF* :D (yeah, I'm crazy about LOTUS)

As you said, $X=\exp(Y)$, where Y follows a normal distribution $(\mu,\sigma^2)$. So we're looking for $\mathbb{E}(\exp(Y))$.

For more convenience, we can consider $Z\sim\mathcal{N}(0,\sigma^2)$. And then, Y follows the same distribution as $Z+\mu$.
We'll calculate $\mathbb{E}(\exp(Z))$.
And from the above, we'll have $\mathbb{E}(\exp(Y))=e^{\mu}\cdot \mathbb{E}(\exp(Z))$

Z's pdf is $\frac{1}{\sigma\sqrt{2\pi}}\cdot e^{-\frac{t^2}{2\sigma^2}}$.

Using the law of the unconscious statistician (at last I can put a name on it !!! :D), we have :

\begin{aligned}
\mathbb{E}(\exp(Z)) &=\int_{\mathbb{R}} \frac{1}{\sigma\sqrt{2\pi}}\cdot e^t\cdot e^{-\frac{t^2}{2\sigma^2}} ~dt \\
&=\int_{\mathbb{R}}\frac{1}{\sigma\sqrt{2\pi}} \cdot\exp\left(\frac{-t^2+2\sigma^2 t}{2\sigma^2}\right) ~dt
\end{aligned}

Complete the square : $-t^2+2\sigma^2t=-(t-\sigma^2)^2+\sigma^4$

Hence :

\begin{aligned}
\mathbb{E}(\exp(Z)) &=\int_{\mathbb{R}} \left[\frac{1}{\sigma\sqrt{2\pi}}\cdot\exp\left(\frac{-(t-\sigma^2)^2}{2\sigma^2}\right)\right]\cdot e^{\sigma^2/2} ~dt \\
&=e^{\sigma^2/2}\int_{\mathbb{R}} \frac{1}{\sigma\sqrt{2\pi}}\cdot\exp\left(\frac{-(t-\sigma^2)^2}{2\sigma^2}\right) ~dt
\end{aligned}

But the thing in the integral is exactly the pdf of a normal distribution $(\sigma^2 ~,~ \sigma)$ !
Hence this integral is 1.

And finally, $\mathbb{E}(\exp(Z))=e^{\sigma^2/2} \Rightarrow \boxed{\mathbb{E}(X)=\mathbb{E}(\exp(Y))=\exp\left (\mu+\frac{\sigma^2}{2}\right)}$

Quote:

where \phi is the MGF/characteristic fn(I dont what people call them exactly)
As stated, this is the MGF.

The MGF is equivalent to the Laplace transform $\int e^{tx} f(x) ~dx$
The characteristic function is equivalent to the Fourier transform $\int e^{itx} f(x) ~dx$

Quote:

Since $\phi_X(s) = \mathbb{E}(e^{sX}) = \text{exp}\left(\frac{s^2 \sigma ^2}2 - ms\right)$, we have $\mathbb{E}(e^X) = \text{exp}\left(\frac{\sigma ^2}2 - m\right)$
The MGF of a normal is $\exp\left(ms+\frac{\sigma^2s^2}{2}\right)$
For the characteristic function, just substitute t=it

You can find the definitions of mgf and characteristic function in wikipedia, as well as the mgf, char function of any distribution.
• May 23rd 2009, 05:22 AM
Isomorphism
Quote:

Originally Posted by Moo
As stated, this is the MGF.

The MGF is equivalent to the Laplace transform $\int e^{tx} f(x) ~dx$
The characteristic function is equivalent to the Fourier transform $\int e^{itx} f(x) ~dx$

The MGF of a normal is $\exp\left(ms+\frac{\sigma^2t^2}{2}\right)$
For the characteristic function, just substitute t=it

I have lost a total of 17.5 marks for putting that negative sign last semester, and I still do it (Angry)

Quote:

You can find the definitions of mgf and characteristic function in wikipedia, as well as the mgf, char function of any distribution.
The problem is our lecture notes call it the characteristic function, last time Laurent pointed it and I saw it on Wikipedia too. I dont why they called it char function in our lecture notes. Now its confusing me a lot. Anyway I wil keep that in mind...Thanks
• May 23rd 2009, 05:31 AM
Moo
Quote:

Originally Posted by Isomorphism
I have lost a total of 17.5 marks for putting that negative sign last semester, and I still do it (Angry)

Over 20 ? :eek:
Just joking... over 100 ? That's still a lot :s

By taking the pdf, you have very little chance of getting wrong lol! (except if, like I did in a first time, you forget the minus sign in the exp(-t^2/2sigma^2)... (Giggle))
Quote:

The problem is our lecture notes call it the characteristic function, last time Laurent pointed it and I saw it on Wikipedia too. I dont why they called it char function in our lecture notes. Now its confusing me a lot. Anyway I wil keep that in mind...Thanks
Both characterize the distribution. And you can go from one to another quite easily (though it requires justification if you want to be formal ^^)
That's still strange ?
• May 23rd 2009, 06:32 AM
anonder
Thanks guys! Especially Moo.

Another question about the variance. Would you need to then use MGFs to do derive the variance? Using the 2nd moment of the normal distribution to find E(X^2) for the log normal distribution, thus having E(X^2) - m^2 for the variance.

Though i can't get the right answer.
• May 23rd 2009, 06:52 AM
Moo
Quote:

Originally Posted by anonder
Thanks guys! Especially Moo.

Another question about the variance. Would you need to then use MGFs to do derive the variance? Using the 2nd moment of the normal distribution to find E(X^2) for the log normal distribution, thus having E(X^2) - m^2 for the variance.

Though i can't get the right answer.

Okay, here the MGF is more useful XD

$\mathbb{E}(X^2)=\mathbb{E}((e^Y)^2)=\mathbb{E}(e^{ 2Y})=\phi_Y(2)=\exp\left(2\mu+2\sigma^2\right)$
(Y follows a normal distribution $(\mu,\sigma^2)$)

Hence $\text{var}(X)=\mathbb{E}(X^2)-[\mathbb{E}(X)]^2=\exp\left(2\mu+2\sigma^2\right)-\exp\left(2\left(\mu+\frac{\sigma^2}{2}\right)\rig ht)$

$=\exp\left(2\mu+2\sigma^2\right)-\exp\left(2\mu+\sigma^2\right)=e^{2\mu+\sigma^2}\l eft(e^{\sigma^2}-1\right)$

Looks good ?
• May 23rd 2009, 02:36 PM
anonder
Thanks Moo, really helpful! I found my mistake (Lipssealed).

Was able to do the next part too! Though i might have 2 more questions still.

If you have alpha = Xbar as an estimator, how do you find the variance for that specific estimator? The estimator is unbiased, which was easy to show.
• May 24th 2009, 02:50 AM
anonder
I figured it out with an easy estimator, but I'm now stuck on another one.

It's a bit too long to type so i attached it :) I'm not sure how you use large n approximations? Actually I'm kinda pretty confused in general about it. If someone could point me in the right direction to get started, that would be awesome!

Thanks so far, it's really helped.