# Finding CDF and PDF of $Y=20/X$ when $X$ is uniform on $[4,7]$

I have a problem where $$X$$ is uniform on the interval $$[4,7]$$ and $$Y = 20/X$$. I am asked to find $$F_Y(y)$$ and $$f_Y(y)$$ using the CDF and PDF.

This is a uniform distribution, so it's easy enough finding the CDF and PDF $$F_X(x)$$ and $$f_X(x)$$.

I am assuming I found $$F_Y(y)$$ and $$f_Y(y)$$ correctly from the CDF of $$X$$. I am unsure of how to find them from the PDF, though. The PDF in this case is just $$1/3$$ for $$4, correct? How to go from there, I'm not quite sure. Any pointers would be greatly appreciated!

Note

$$y = 20/x$$ is one-to-one while $$x$$ is in the range of $$4$$ to $$7$$.

However, when transforming a continuous variable you need to also consider what is known as the Jacobian of the transformation. This shows up when transforming continuous variables.

In general, for one-to-one transformations, the PDF of $$Y = g(X)$$ will be $$f_Y(y) = f_X(g^{-1}(Y) ) \left| \frac{d}{dy} g^{-1} (Y)\right|$$

For this specific example, $$g^{-1}(Y) = 20/y$$, so it's derivative would be equal to $$-20/y^2$$. Plugging in $$g^{-1}(Y)$$ into the PDF of $$X$$ doesn't change it because the PDF of $$X$$ is constant.

Plugging it all in gives $$f_Y(y) = \frac13 *\frac{20}{y^2}$$ while $$Y$$ is in the range of $$20/7$$ to $$5$$

From this the CDF of $$Y$$ can be found easily from here

Well, you know how to find it through $$F_X(x)$$, and should know how to find that from $$f_X(x)$$.

\begin{align}F_Y(y)&=1-F_X(20/y)\\[1ex]&=\int_{20/y}^\infty f_X(x)~\mathrm d x\\[4ex]f_Y(y)&=\dfrac{\mathrm d ~~}{\mathrm d y}F_Y(y)\\&=\dfrac{\mathrm d ~~}{\mathrm d y}\int_{20/y}^\infty f_X(x)~\mathrm d x\end{align}

So...by using the fundamental principle of calculus...

\begin{align}f_Y(y)&=-\dfrac{\mathrm d (20/y)}{\mathrm dy}\cdot f_X(20/y)\\[3ex] F_Y(y)&= \int_{-\infty}^y f_Y(y)\mathrm d y\end{align}