# 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 $E[e^X]$ where $X$~N( $m$, $v^2$). I know that this is $\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 $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 $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.

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

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

This leaves me with $\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 $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 $\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 $v\sqrt{2}$ isn't included. Is this meant to cancel somewhere or is this actually the corrent solution?