The random variable $X$ has density function $f_{X}$ given by
\begin{equation} f_{X}(x) = \begin{cases} \frac{1}{2} \ \ \ \ \ x \in (0,1] \\ \frac{1}{2x^2} \ \ x \in (1,\infty) \\ 0 \ \ \ \ \ \ x \in (-\infty,0] \end{cases} \end{equation} Let $F_{X}$ be the distribution function of $X$. The random variable $Y$ is defined as follows $Y = 1/X$. I want to compute the density function of $Y$.
Here's my attempt:
Let $y \in \mathbb{R}$ and let $F_{Y}(y)$ be the distribution function of $Y$.
\begin{equation} F_{Y}(y) = P(Y\leq y) = P(1/X \leq y) = P(1/y \leq X) = P(X \geq 1/y) \end{equation}
case 1: if $y \in (0,1) \implies 1/y \in (1,\infty) $. Then
\begin{equation} F_{Y}(y) = P(X \geq 1/y) = 1 - P(X < 1/y) = 1 - F_{X}(1/y) = 1- \int_{1}^{1/y} \frac{1}{2x^2} dx = \frac{1+y}{2} \end{equation}
case 2: if $y \in [1,\infty) \implies 1/y \in (0,1) $. Then
\begin{equation} F_{Y}(y) = P(X \geq 1/y) = 1 - P(X < 1/y) = 1 - F_{X}(1/y) = 1- \int_{0}^{1/y} \frac{1}{2} dx =1-\frac{1}{2y} \end{equation}
case 3: if $y \in (-\infty,0) \implies 1/y \in (-\infty,0) $. Then
\begin{equation} F_{Y}(y) = P(X \geq 1/y) = 1 - P(X < 1/y) = 1 - F_{X}(1/y) = 1- \int_{\infty}^{1/y} 0 dx =1 \end{equation}
\begin{equation} F_{Y}(y) = \begin{cases} 1, \ \ \ \ \ \ \ \ \ \ y \in (-\infty,0) \\ \frac{1+y}{2}, \ \ \ \ \ \ \ y \in (0,1) \\ 1-\frac{1}{2y}, \ \ \ \ y \in [1,\infty) \end{cases} \end{equation}
But the function $F_{Y}(y)$ is not non-decreasing, hence is not a distribution. If $F_{Y}$ were a distribution then it would be easy to compute $f_{Y}$
\begin{equation} f_{Y}(y) = \begin{cases} 0, \ \ \ \ \ \ \ \ \ y \in (-\infty,0) \\ \frac{1}{2}, \ \ \ \ \ \ \ y \in (0,1) \\ \frac{1}{2y^{2}}, \ \ \ \ y \in [1,\infty) \end{cases} \end{equation}
questions:
- Do you know where I made a mistake?
- Do you know another strategy to compute $f_{Y}$?
Thanks in advance.
In case 1, it should be
$$P(X \ge 1/y) = \int_{1/y}^\infty \frac{1}{2x^2} \, dx$$ or alternatively $$P(X \ge 1/y) = 1 - P(X < 1/y) = 1 - \left(\int_0^1 \frac{1}{2} \, dx + \int_1^{1/y} \frac{1}{2x^2} \, dx\right).$$
You make a similar mistake in case 2.