# 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)$?

-

## 1 Answer

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).

(In case you don't remember, Leibniz's rule is the first part of the Fundamental Theorem of Calculus combined with the chain rule.)

-

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
– Mike Spivey Oct 20 '10 at 18:19
How do you accept answers? – PEV Oct 20 '10 at 18:33
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 17, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "github"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.9067098498344421, "perplexity_flag": "head"}