# Let $X\sim N(0,\sigma^2)$. Compute $E(e^X)$ and $Var(e^X)$

I am stuck on the following problem. Let $X\sim N(0,\sigma^2)$. Compute $E(e^X)$ and $Var(e^X)$ Any hints are really appreciated thank you in advance.

Write the definition: $$E\left(e^X\right)=\int_{-\infty}^\infty\frac1{\sqrt{2\pi}\sigma}e^{x}e^{-\frac1{2\sigma^2}x^2}\,\mathrm dx,$$ and use the fact that $x-\frac1{2\sigma^2}x^2=-\frac12\left(\frac1{\sigma}x-\sigma\right)^2+\frac12\sigma^2$. Can you take it from here?

An often overlooked approach is by using the Gaussian Shift Theorem (GST) which can really speed up these kinds of calculations instead of actually solving the integral.

The GST states that:

If: $$Z \sim N(0,1)$$ and h an integrable function, and c is some constant, then: $$E[e^{cZ}h(Z)]=e^{\frac {c^2}{2}}E[h(Z+c)]$$

So, for your question, if we standardise X: Recall: $$Z=\frac {X-\mu}{\sigma}=\frac {X}{\sigma}$$ Then, clearly:

$$E[e^X]=E[e^{{\sigma}Z}]$$

So we can use the GST here by letting h(Z)=h(Z+c)=1 and c=$\sigma$, giving us that:

$$E[e^X]=E[e^{{\sigma}Z}]=e^{\frac{\sigma^2}{2}}$$

and an extension of this helps to calculate the variance:

Recall that $Var(X)=E(X^2)-[E(X)]^2$

So:

$$Var[e^X]=Var[e^{{\sigma}Z}]=E(e^{2{\sigma}Z})-[E(e^{{\sigma}Z})]^2$$

Trying using the GST on the first and second component here, as a hint, for the first expectation term, c is now equal to 2$\sigma$.

Alternatively, you can use MGFs to solve this (check wiki), but I would take the time to learn the GST as it saves a lot of time once you get the hang of it.

Hope this helps

• Ty ian for anawer, i knew this approch but my teacher told me that i could do something nicely knowing that the mean was zero? ty dimebucker, but now its not the case that $Z \sim N(0,1)$ but $Z\sim N(0,\sigma^2)$ May 23, 2014 at 16:46
• Everything you wrote is correct, but the GST is quite overkill for solving this problem. In fact, you prove the GST by "solving the integral".
– Ian
May 23, 2014 at 23:39
• Fair enough, I was merely providing an alternative that saves you a lot of time, especially when calculating the variance. Christian I think you misunderstood the GST, it works for any normally distributed random variable, as we can simply standardize and get it in terms of the standard normal, Z. May 24, 2014 at 3:33