# Transformation of Random Variables

Suppose $f_{X}(x) = xe^{-x^2/2}$ for $x>0$ and $Y = \ln X$. Find the density function for $Y$. So we want to find $P(Y \leq y)$. This is the same thing as $P(\ln X \leq y)$ or $P(X \leq e^{y})$. Thus $f_{Y}(y) = f_{X}(e^y)$? Or does $f_{Y}(y) = F_{X}(e^y)$ since $P(X \leq x) = F_{X}(x)$?

-

You're correct up to the point where you have $P(Y \leq y) = P(\ln X \leq y) = P(X \leq e^y)$. The correct next step, though, is that $F_Y(y) = F_X(e^y)$. To obtain $f_Y(y)$, differentiate both sides of this equation with respect to $y$ (and don't forget to use Leibniz's rule on the right-hand side).
 Thus $f_{Y}(y) = f_{X}(e^y) \cdot e^y$. – PEV Oct 20 '10 at 18:12 That's correct. – Mike Spivey Oct 20 '10 at 18:13 I guess another way to do this is the following: $Y = \ln X \Rightarrow X = e^{Y}$. So $f_{Y}(y) = f_{X}(e^y) \cdot e^y$ (e.g. multiply by the derivative). But this method only works for bijective functions? – PEV Oct 20 '10 at 18:13 You can still use a version of this method even if the transformation isn't one-to-one. However, things get messier. For instance, see the first example in these notes: math.uiuc.edu/~r-ash/Stat/StatLec1-5.pdf. – Mike Spivey Oct 20 '10 at 18:19 How do you accept answers? – PEV Oct 20 '10 at 18:33