# How can I find the CDF and PDF of $Y$?

Problem

Let $X$ be a $\operatorname{Uniform}(0,1)$ random variable, and let $Y=e^{-X}$.

Find the CDF of $Y$.

Find the PDF of $Y$.

Find $\mathbb E[Y]$.

My problem

If I solve for the range of $y$ I get $\left(1, \frac 1e \right)$, but because $Y$ is not an increasing function, my second bound is smaller than my first. I am really confused as to how I would be able to solve for the CDF and PDF in this case... Any help would be greatly appreciated.

For $y$ in the interval $(1/e,1)$ we have $$\small F_Y(y)=\Pr(Y\le y)=\Pr(e^{-X}\le y)=\Pr(-X\le \ln y)=\Pr(X\ge -\ln y)=1-(-\ln y)=1+\ln y.$$ For completeness, we add that $F_Y(y)=0$ if $y\le 1/e$, and $F_Y(y)=1$ for $y\ge 1$. Note, in the above calculation, the switch in the direction of the inequality, when $\Pr(-X\le \ln y)$ was replaced by $\Pr(X\ge -\ln y)$.
Now the pdf is easy to find. For $E(Y)$, we can use the newly found pdf of $Y$, or else bypass the distribution of $Y$ entirely, computing $\int_0^1 e^{-x}\,dx$.
• Yes, I computed the cdf only for "interesting" $y$. But the cdf is defined for all $y$. If $y\gt 1$, then for $Y\le y$, so $F_Y(y)=\Pr(Y\le y)=1$. And if $y\lt 1/e$, we cannot have $Y\le y$, so $F_Y(y)=0$. – André Nicolas Oct 6 '15 at 22:01