Calculate the expected value of $Y=e^X$ where $X \sim N(\mu, \sigma^2)$ I got a problem of calculating $E[e^X]$, where X follows a normal distribution $N(\mu, \sigma^2)$ of mean $\mu$ and standard deviation $\sigma$.
I still got no clue how to solve it. Assume $Y=e^X$. Trying to calculate this value directly by substitution $f(x) = \frac{1}{\sqrt{2\pi\sigma^2}}\, e^{\frac{-(x-\mu)^2}{2\sigma^2}}$ then find $g(y)$ of $Y$ is a nightmare (and I don't know how to calculate this integral to be honest).
Another way is to find the inverse function. Assume $Y=\phi(X)$, if $\phi$ is differentiable, monotonic, and have inverse function $X=\psi(Y)$ then $g(y)$ (PDF of random variable $Y$) is as follows: $g(y)=f[\psi(y)]|\psi'(y)|$.
I think we don't need to find PDF of $Y$ explicitly to find $E[Y]$. This seems to be a classic problem. Anyone can help?
 A: Let $X$ be an $\mathbb{R}$-valued random variable with the probability density function $p(x)$, and $f(x)$ be a nice function. Then
$$\mathbb{E}f(X) = \int_{-\infty}^{\infty} f(x) p(x) \; dx.$$
In this case, we have
$$ p(x) = \frac{1}{\sqrt{2\pi}\sigma}e^{-\frac{(x-\mu)^2}{2\sigma^2}},$$
hence
$$ \mathbb{E}e^X = \frac{1}{\sqrt{2\pi}\sigma} \int_{-\infty}^{\infty} e^x e^{-\frac{(x-\mu)^2}{2\sigma^2}} \; dx. $$
Now the rest is clear.
A: $\newcommand{\E}{\operatorname{E}}$
Look at this: Law of the unconscious statistician.
If $f$ is the density function of the distribution of a random variable $X$, then
$$
\E(g(X)) = \int_{-\infty}^\infty g(x)f(x)\,dx,
$$
and there's no need to find the probability distribution, including the density, of the random variable $g(X)$.
Now let $X=\mu+\sigma Z$ where $Z$ is a standard normal, i.e. $\E(Z)=0$ and $\operatorname{var}(Z)=1$.
Then you get
$$
\begin{align}
\E(e^X) & =\E(e^{\mu+\sigma Z}) = \int_{-\infty}^\infty e^{\mu+\sigma z} \varphi(z)\,dz \\[10pt]
& = \frac{1}{\sqrt{2\pi}}\int_{-\infty}^\infty e^{\mu+\sigma z} e^{-z^2/2}\,dz = \frac{1}{\sqrt{2\pi}} e^\mu \int_{-\infty}^\infty e^{\sigma z} e^{-z^2/2}\,dz.
\end{align}
$$
We have $\sigma z-\dfrac{z^2}{2}$ so of course we complete the square:
$$
\frac 1 2 (z^2 - 2\sigma z) = \frac 1 2 ( z^2 - 2\sigma z + \sigma^2) - \frac 1 2 \sigma^2 = \frac 1 2 (z-\sigma)^2 - \frac 1 2 \sigma^2.
$$
Then the integral is
$$
\frac{1}{\sqrt{2\pi}} e^{\mu+ \sigma^2/2} \int_{-\infty}^\infty e^{-(z-\sigma)^2/2}\,dz
$$
This whole thing is
$$
e^{\mu + \sigma^2/2}.
$$
In other words, the integral with $z-\sigma$ is the same as that with just $z$ in that place, because the function is merely moved over by a distance $\sigma$.  If you like, you can say $w=z+\sigma$ and $dw=dz$, and as $z$ goes from $-\infty$ to $+\infty$, so does $w$, so you get the same integral after this substitution.
A: A start: We want 
$$\int_{-\infty}^\infty e^x f(x)\,dx,$$
where $f$ is the density function of your normal.  But 
$$\exp(x)\exp\left(--\frac{(x-\mu)^2}{2\sigma}\right)=\exp\left({-\frac{(x-\mu)^2}{2\sigma^2}+x}\right).$$
Look at the quadratic expression $-\frac{(x-\mu)^2}{2\sigma^2}+x$ and complete the square. Then the rest of the integration will be straightforward, since you know $\int_{-\infty}^\infty e^{-t^2/2}\,dt$.
Remark: After you have done the integration, you might want to look up the moment generating function of your normal. You want the value of the mgf at $t=1$. This will give you a check on whether your computation was correct. 
A: Since mgf of $X$ is $\;M_x(t)=e^{\large\mu t + \sigma^2 t^2/2}$
$$E[Y]=E[e^X]=M_x(1)=e^{\large\mu + \sigma^2/2}$$
