TITLE: Cumulative and density function of a random variable
QUESTION [0 upvotes]: Let $X \sim \mathcal{U}([0,1])$. Calculate the cumulative function and the density function of $Y$ where
$$Y=\frac{2X}{1-X}$$

REPLY [0 votes]: I began by calculate the cumulative function, 
$$\begin{align}
F_Y(y)&=\mathbb{P}\left\{Y \leq y \right\} = \mathbb{P}\left\{\frac{2X}{1-X} \leq y \right\} = \mathbb{P}\left\{2X \leq y(1-X) \right\} = \mathbb{P}\left\{2X + yX \leq y \right\} \\
&= \mathbb{P}\left\{X(2+y) \leq y \right\} = \mathbb{P}\left\{X \leq \frac{y}{2+y} \right\} 
\end{align}$$
Thus,
$$F_Y(y):= \left\{
\begin{array}{ll}
\dfrac{y}{y+2} \quad & \text{if } y \ge 0 \\
0 & \text{else}
\end{array}
\right.$$
And, to get the density function we derivate,
$$f_Y(y):=\dfrac{d}{dy}F_Y(y) = \dfrac{2}{(y+2)^2}$$
We can verify that this function is a density function by calculate :
$$\int_{\mathbb{R}} f_Y(y) \cdot \mathcal{X}_{y \ge 0} \; dy = \int_{0}^{\infty} \dfrac{2}{(y+2)^2} \; dy= 1$$
{"set_name": "stack_exchange", "score": 0, "question_id": 1748300}