# Finding the probability density function of $Y=e^X$, where $X$ is standard normal

Let the random variable $X$ have the $N(0,1)$ distribution for which the probability function is: $$f(x)= \frac{1}{\sqrt{2\pi}}\exp\left(-\frac{x^2}{2}\right), -\infty< x <\infty$$ Let $Y=e^X$.

A. Find the probability density function for $Y$,

B. Find $E(Y)$,

C. Find $E(Y^2)$ and deduce $\mathrm{Var}(Y)$.

B and C I can do if I find A but can anybody explain to me how this is done. The logic behind it.

-

To find the density function $f_Y(y)$ of $Y$, one strategy is to find the cumulative distribution function $F_Y(y)$, and then differentiate. Note that $Y$ is always positive, so $F_Y(y)=0$ if $y\le 0$. Now suppose that $y\gt 0$. Then $$F_Y(y)=\Pr(Y\le y)=\Pr(e^X\le y)=\Pr(X\le \ln y).$$ Thus $$F_Y(y)=\int_{-\infty}^{\ln y}f(x)\,dx.$$ To find the density, differentiate. We do this by differentiating under the integral sign, that is, by using the Fundamental Theorem of Calculus. We get $$f_Y(y)=\frac{1}{y}f(\ln y).$$
Remark: To find $E(Y)$, I would suggest not using the density. Easier, I think, is to use $$\int_{-\infty}^\infty e^x f(x)\,dx.$$ Apart from a constant, we are integrating $e^{-(x^2-2x)/2}$. Complete the square, and make the substitution $u=x-1$.
Shouldnt you be more consistent by using $\ln$ instead of $\log$? – Don Nov 16 '15 at 19:39
The cumulative distribution function of $Y$ is $$F_Y(y)=P(Y\leq y)=P(e^X\leq y)$$ which is $0$ when $y\leq 0$, and when $y>0$ then $$P(e^X\leq y)=P(X\leq\log(y))=\int_{-\infty}^{\log(y)}f_X(x)\,\mathrm dx=F_X(\log(y)).$$ Differentiating $F_Y(y)$ we obtain the density of $Y$: $$f_Y(y)=F'_X(\log(y))\frac{1}{y}=f(\log(y))\frac{1}{y}=\frac{1}{y\sqrt{2\pi}}\exp\left(-\frac{\log(y)^2}{2}\right),\quad y>0,$$ and $f_Y(y)=0$ for $y\leq 0$.