# 28.6 Transformations of continuous random variables

Imagine we have a random variable $X$, with probability density function

$f_{X}(x)=\begin{cases}4x^{3}&0 (28.10)

and we want to find the probability density function for the random variable

$Y=\frac{1}{X^{4}}$ (28.11)

The first thing to do is to find the cumulative probability function for $X$, (by integrating)

 $\displaystyle F_{X}(x)$ $\displaystyle=\begin{cases}0&x\leqq 0\\ \int_{0}^{x}4x^{3}dx&01\end{cases}$ (28.12) $\displaystyle=\begin{cases}0&x\leqq 0\\ x^{4}&01\end{cases}$ (28.13)

Then, we can find the cumulative probability function for $Y$ in terms of the cumulative probability function for $X$. From the definition of the cumulative probability function we know that

$F_{Y}(y)=P(Y\leqq y)$ (28.14)

Then as $Y=\frac{1}{X^{4}}$ we can substitute $X$ for $Y$

$P(Y\leqq y)=P(\frac{1}{X^{4}} (28.15)

We can then manipulate this into some function of $P(X (where $g(y)$ is a function we need to determine).

 $\displaystyle P\left(Y\leqq y\right)$ $\displaystyle=P\left(\frac{1}{X^{4}} (28.16) $\displaystyle=P\left(X^{4}>\frac{1}{y}\right)$ (28.17) $\displaystyle=P\left(X>\sqrt[4]{\frac{1}{y}}\right)$ (28.18) $\displaystyle=1-P\left(X<\sqrt[4]{\frac{1}{y}}\right)$ (28.19)

Note that in the second step we flipped the inequality because we took the reciprocal of both functions, and the reciprocal function makes bigger values smaller (and vice-versa) so to keep the inequality true, we had to flip the signs. From here, we plug into $F_{X}(x)$.

 $\displaystyle P\left(Y\leqq y\right)$ $\displaystyle=1-P\left(X<\sqrt[4]{\frac{1}{y}}\right)$ (28.20) $\displaystyle=1-F_{X}\left(\sqrt[4]{\frac{1}{y}}\right)$ (28.21) $\displaystyle=\begin{cases}1-0&x\leqq 0\\ 1-\left(\sqrt[4]{\frac{1}{y}}\right)^{4}&01\end{cases}$ (28.22) $\displaystyle=\begin{cases}1&x\leqq 0\\ 1-\frac{1}{y}&01\end{cases}$ (28.23)

We also need to rewrite bounds in terms of $y$, rather than $x$. As $Y=\frac{1}{X^{4}}$ we can write

$X=Y^{-\frac{1}{4}}$ (28.24)

And thus that

 $\displaystyle P\left(Y\leqq y\right)$ $\displaystyle=\begin{cases}1&y^{-\frac{1}{4}}\leqq 0\\ 1-\frac{1}{y}&01\end{cases}$ (28.25) $\displaystyle=\begin{cases}1&y\geqq\infty\\ 1-\frac{1}{y}&y<\infty\text{ and }y\geqq 1\\ 0&y<1\end{cases}$ (28.26) $\displaystyle=\begin{cases}1-\frac{1}{y}&y\geqq 1\\ 0&y<1\end{cases}$ (28.27)

Note that here it is assumed that $\frac{1}{0}=\infty$ (it makes it nice and easy to work with the bounds).

As we now have the cumulative probability function for $Y$, the final step is to differentiate to get the probability density function.

 $\displaystyle\frac{d}{dx}\left[P\left(Y\leqq y\right)\right]$ $\displaystyle=\begin{cases}\frac{d}{dx}\left[1-\frac{1}{y}\right]&y\geqq 1\\ 0&y<1\end{cases}$ (28.28) $\displaystyle=\begin{cases}\frac{d}{dx}\left[-y^{-1}\right]&y\geqq 1\\ 0&y<1\end{cases}$ (28.29) $\displaystyle=\begin{cases}y^{-2}&y\geqq 1\\ 0&y<1\end{cases}$ (28.30) $\displaystyle=f_{Y}(y)$ (28.31)