# Thread: Normal Distribution Expected Value

1. ## Normal Distribution Expected Value

I'm stuck with something that I think should be straightforward but can't see what to do.

I'm trying to find $\displaystyle E[e^X]$ where $\displaystyle X$~N($\displaystyle m$,$\displaystyle v^2$). I know that this is $\displaystyle \int^\infty_{-\infty}{e^{x}\cdot\frac{1}{\sqrt{2{\pi}v^2}}\cdot\ * e^{\frac{-(x-m)^2}{(2v^2)}}dx}$ i.e. the integral of the inner product of $\displaystyle e^{x}$ and the pdf of the Normal distribution. This is where it falls apart - how do I integrate this? I think it's done by substitution when dealing with $\displaystyle E(X)$ with the standard normal but this has the extra exponential and I'm not sure how to do it.

Help appreciated, thanks.

2. combine the exponents of e, you need to complete the square
This can be found in many books.
It's a bit messy but it works.

3. Thanks for the reply.

Combining $\displaystyle e^{x}$ and $\displaystyle e^{\frac{-(x-m)^2}{(2v^2)}}$ and then completing the square I get $\displaystyle e^{(m-v^2+x)^2 -m -m^2 + 2mv^2 - v^2}$.

I think the idea is to now split this into $\displaystyle e^{(m-v^2+x)^2}$ and $\displaystyle e^{-m -m^2 + 2mv^2 - v^2}$ and then take the latter outside of the integral.

This leaves me with $\displaystyle \frac{e^{-m -m^2 + 2mv^2 - v^2}}{\sqrt{2{\pi}v^2}}\int^\infty_{-\infty}{e^{(m-v^2+x)^2}dx}$ but I still can't solve this even with a change of variable as it doesn't converge. Am I missing something or is this the wrong idea?

4. You need the minus infront of the () in the exponent and where is the $\displaystyle 2v^2$

By the way this is the MGF evaluated at t=1.
I was looking for that online, but couldn't find it.
I'm sure it's out there.

5. Ah, silly mistake. I've now got it down to $\displaystyle \frac{e^{\frac{v^2(2m+v^2)}{2v^2}}}{\sqrt{2{\pi}v^ 2}}\int^\infty_{-\infty}{e^{-(m-v^2+x)^2}dx} = \frac{e^{\frac{v^2(2m+v^2)}{2v^2}}}{\sqrt{2{\pi}v^ 2}}\cdot\sqrt{\pi} = \frac{e^{m+\frac{v^2}{2}}}{v\sqrt{2}}$.

This is close to the target solution, only the denominator $\displaystyle v\sqrt{2}$ isn't included. Is this meant to cancel somewhere or is this actually the corrent solution?