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.
 A: 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?
A: 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
