# Finding PDF/CDF of a function g(x) as a continuous random variable

Suppose that $$X$$ is a continuous random variable with PDF: $$f_X(x)=\begin{cases} 4x^3 & 0 and let $$Y=\frac{1}{X}$$. Find $$f_Y(y).$$

My approach:

First, find the CDF, $$F_X(x)$$: $$F_X(x)=\begin{cases} 0, & x\le0\\ x^4, & 01 \end{cases}$$

Next, find range of $$Y$$, $$Y\in[1,\infty)$$,since $$x$$ can only take on value of $$(0, 1]$$, therefor, $$\frac{1}{x}$$ has range of $$[1, \infty)$$.

With that in mind, attempt to find CDF $$F_Y(y)$$, but I am stuck here and not sure how to proceed:

$$F_Y(y)=\begin{cases} 0 &y<1\\ ? &1\le y<\infty \end{cases}$$

UPDATE 12/16/2022 I got the limit thanks to the tips from @Ben

$$Y=\frac{1}{X}\\ 0\le x \le 1 \Rightarrow 0\le \frac{1}{y}\le 1 \\ \frac{1}{y}\le 1 \Rightarrow 1\le y \\ 0\le \frac{1}{y} \Rightarrow y\le\frac{1}{0}\Rightarrow y\le\infty \\ \text{therefore, the limit for y is: } 1\le y\le\infty \\$$

Now to find $$f_Y(y)$$, I suppose one has to start from CDF $$F_X(x)=\begin{cases} 0, & x\le0\\ x^4, & 01 \end{cases}\\ \text{ Therefore: }\\ F_Y(y)=\begin{cases} 0, & y\le1\\ \frac{1}{y^4}, & 1\le y\le\infty\\ 1 & y\ge\infty\text{ ?? This doesn't make sense}\\ \end{cases}\\$$

• $F_Y(y) = 1-\frac{1}{y^4}, 1\le y<\infty$ and $f_Y(y) = \frac{4}{y^5}, 1\le y<\infty$ Commented Oct 17, 2022 at 21:37
• @onyambu how did you get that? Commented Dec 15, 2022 at 8:48
• cdf inverse method Commented Dec 15, 2022 at 17:04

Since $$Y=1/X$$ you have:

\begin{align} F_Y(y) = \mathbb{P}(Y \leqslant y) &= \mathbb{P}(1/X \leqslant y) \\[6pt] &= \mathbb{P}(X \geqslant 1/y) \\[6pt] &= 1 - \mathbb{P}(X < 1/y) \\[6pt] &= 1 - F_X(1/y) \\[6pt] &= \begin{cases} 0 & & & \text{if } y < 1, \\[6pt] 1-1/y^4 & & & \text{if } y \geqslant 1. \\[6pt] \end{cases} \\[6pt] \end{align}

(Note that in the transition to the fourth line I have used the fact that $$X$$ is a continuous random variable so that $$\mathbb{P}(X=1/y)=0$$, which means that $$\mathbb{P}(X < 1/y) = \mathbb{P}(X \leqslant 1/y)$$.) We then get the corresponding density function:

$$f_Y(y) = \frac{4}{y^3} \quad \quad \quad \quad \quad \text{for } y \geqslant 1.$$

• Still don't get it. Sure, $P[1/x < y]$. Do I assume $f_Y(y)=4\frac{1}{y^3}$ for $1\le y\le\infty$? Commented Dec 15, 2022 at 9:35
• The hint gets you down to a point where you have a probability statement involving $X$, for which you have the CDF and density. See if you can find a way to re-arrange the inequality in the probability statement to get $X$ on its own.
– Ben
Commented Dec 15, 2022 at 22:59
• I got the limit now: Commented Dec 17, 2022 at 7:08
• attempting to solve CDF of y in update 12/16/2022, but the CDF of 1 where $y\ge\infty$ doesn't make sense. Am I not supposed to substitute the CDF of x with $\frac{1}{y}$ directly? Commented Dec 17, 2022 at 7:36
• You are close, but with a couple of remaining issues. I have updated to give a full answer. You needn't worry about the case $y \geqslant \infty$ since all real numbers are smaller than infinity.
– Ben
Commented Dec 17, 2022 at 9:44