Let X be a random variable that is uniformly distributed in (0,1). Find the
probability density function of Y = −ln X.
I got the solution $e^{-2y}$ for $y>0$, however the real solution is $e^{-y}$.
I followed the standard rule of $$f_Y(y) =f_X[g^{-1}(y)] \big |{d\over dy} g^{-1}(y) \big | $$
and did $$f_X[g^{-1}(y)] = f_X[e^{-y}] = e^{-y}$$ because the random variable is just x,
and then $$\big |{d\over dy} g^{-1}(y) \big |=e^{-y} $$
so $$e^{-y}e^{-y} = e^{-2y} $$
Where did I go wrong?
Best Answer
With a basic uniform distribution, $f_X(x)=1$ for $x \in (0,1)$ and $0$ otherwise
So $f_X(g^{-1}(y))=1$ for $g^{-1}(y) \in (0,1)$, i.e. for $y \in (0,\infty)$, and $0$ otherwise
So $f_Y(y) =f_X[g^{-1}(y)] \left|{d\over dy} g^{-1}(y) \right| = \left|{d\over dy} g^{-1}(y) \right| = e^{-y}$ for $y \in (0,\infty)$, and $0$ otherwise