# Let $Y=1/X$. Find the pdf $f_Y(y)$ for $Y$.

The Statement of the Problem:

Let $X$ have pdf

$$f_X(x) = \begin{cases} \frac{1}{4} & 0<x<1 \\ \frac{3}{8} & 3<x<5 \\ 0 & \text{otherwise} \end{cases}$$

(a) Find the cumulative distribution function of $X.$

(b) Let $Y=1/X$. Find the pdf $f_Y(y)$ for $Y$. Hint: Consider three cases: $1/5 \le y \le 1/3, 1/3 \le y \le 1,$ and $y \ge 1.$

Where I Am:

I think I did part (a) correctly. I did the following:

$$F_X(x) = \begin{cases} \frac{1}{4}x +c_1 & 0<x<1 \\ \frac{3}{8}x + c_2 & 3<x<5 \\ 0 & \text{otherwise} \end{cases}$$

$$F(0)=0=\frac{1}{4}(0)+c_1 \implies c_1 = 0$$ $$F(5)=1=\frac{3}{8}(5)+c_2 \implies c_2 = -\frac{7}{8}$$

Therefore:

$$F_X(x) = \begin{cases} \frac{1}{4}x & 0<x<1 \\ \frac{1}{4} & 1<x<3 \\ \frac{3}{8}x - \frac{7}{8} & 3<x<5 \\ 1 & x > 5 \end{cases}$$

If that's not right, however, please let me know.

Now, for part (b), I got a little lost. Here's what I did:

$$\text{Let } g(x) = \frac{1}{x} \implies g'(x) = -\frac{1}{x^2}$$

Then:

$$f_Y(y)=\frac{f_X(x)}{\lvert g'(x) \rvert} = \frac{f_X(\frac{1}{y})}{\lvert g'(\frac{1}{y})\rvert}$$

Therefore:

$$f_Y(y) = \begin{cases} \frac{1}{4} & 0<\frac{1}{y}<1 \\ \frac{3}{8} & 3<\frac{1}{y}<5 \\ 0 & \text{otherwise} \end{cases}$$

and taking reciprocals and flipping inequalities...

$$f_Y(y) = \begin{cases} \frac{1}{4} & y \ge 1 \\ \frac{3}{8} & \frac{1}{5} \le y \le \frac{1}{3} \\ 0 & \frac{1}{3} \le y \le 1 \end{cases}$$

This, however... doesn't seem right. For example, what is $f_Y(y)$ when $y \in [0, \frac{1}{5}]$? Is it just $0$? I know I did something wrong here, but I can't quite figure out what exactly. If anybody could help me out, I'd appreciate it.

EDIT: "Second" Attempt...

$$F_X \left( \frac{1}{y} \right) = \begin{cases} \frac{1}{4}\left( \frac{1}{y} \right) & y \ge 1 \\ \frac{1}{4} & \frac{1}{3} \le y \le 1 \\ \frac{3}{8}\left( \frac{1}{y} \right) - \frac{7}{8} & \frac{1}{5} \le y \le \frac{1}{3} \\ 0 & \text{otherwise} \end{cases}$$

Therefore:

$$f_Y(y)=\frac{d}{dy}F_X \left( \frac{1}{y} \right)= \begin{cases} -\frac{1}{4}\left( \frac{1}{y^2} \right) & y \ge 1 \\ -\frac{3}{8}\left( \frac{1}{y^2} \right) & \frac{1}{5} \le y \le \frac{1}{3} \\ 0 & \text{otherwise} \end{cases}$$

• For a start, check the CDF of X: for example, $F_X(2) = ?$ and $F_X(7) = ?$Remember that the CDF is nondecreasing. – BruceET Jul 12 '15 at 21:22
• Ah, yes. It's $0$. The CDF definitely can't be discontinuous like that. I'll work on that. Thanks. – thisisourconcerndude Jul 12 '15 at 21:29
• Also, the PDF of Y is constant only over the intervals where it is 0. Think carefully about what intervals for Y inherit probability from X. Maybe for a preliminary problem, consider $V \sim Unif(0,1)$ and $W = 1/V$. – BruceET Jul 12 '15 at 22:04
• Well, $W$ should have the pdf of $\frac{1}{w^2}$ because it's just the inverse uniform distribution. – thisisourconcerndude Jul 12 '15 at 22:37
• You recall correctly that $f_Y(y)=f_X(x)/\lvert g'(x) \rvert = f_X(1/y)/\lvert g'(1/y)\rvert$ but then you apply $f_Y(y)= f_X(1/y)$, why is that? – Did Jul 12 '15 at 23:06

Crude sketch of CDF of Y based on a simulation. Perhaps helpful as a check on your work.

• Hmm. Well, qualitatively, the function appears to be $0$ for $y < 1/5$, some linear function of $y$ for $1/5 < y < 1/3$, some constant function (around, say, $3/4$) for $1/3 < y < 1$, and then some sort of logarithmic function for $y > 1$. It appears that I was way off... – thisisourconcerndude Jul 12 '15 at 22:28
• Semi-nasty problem. Go step by step, not backwards from this graph. – BruceET Jul 12 '15 at 22:33
• This may be the CDF, but the PDF was what the question called for. – Michael Hardy Jul 12 '15 at 22:48
• @MichaelHardy; Right, intended as encouragement to get PDF via CDF. Trying lead to answ without giving it. Works sometimes, sometimes not. Your approach successful. – BruceET Jul 13 '15 at 2:04

$$f_X(x) = \begin{cases} \frac{1}{4} & 0<x<1 \\ \frac{3}{8} & 3<x<5 \\ 0 & \text{otherwise} \end{cases}$$

\begin{align} f_Y(y) & = \frac d {dy} F_Y(y) = \frac d {dy} \Pr(Y\le y) = \frac d {dy} \Pr\left( \frac 1 X \le y \right) \\[10pt] & = \frac d {dy} \Pr\left( X\ge \frac 1 y \right) \text{ (if }y>0) \\[10pt] & = \frac d {dy} F_X\left(\frac 1 y \right). \end{align} Now notice that when $3<x<5$ then $\dfrac 1 5 <\dfrac 1 x < \dfrac 1 3$, or $\dfrac 1 5 < y < \dfrac 1 3$ and similarly for other intervals.

In part $(a)$ I'd use definite integrals. Since $f_X(x)=0$ when $x<0$, you have for $x\ge 0$, $$F_X(x) = \int_0^x f_X(w) \, dw.$$ If $x>1$, this becomes $$F_X(x) = \int_0^x f_X(w) \, dw = \int_0^1 f_X(w)\,dw + \int_1^x f_X(w)\,dw$$ and if $x>3$ then $$F_X(x) = \int_0^x f_X(w) \, dw = \int_0^1 f_X(w)\,dw + \int_1^3 f_X(w)\,dw + \int_3^x f_X(w)\,dw.$$

• So, for part (a), that's what I tried at first, but: The first interval is given by the integral $\int_{0}^x \frac{1}{4}dt$ giving $\frac{1}{4}x$. The second interval is given by $\int_{0}^1 \frac{1}{4}dt +\int_{1}^x \frac{1}{4}dt$ giving $\frac{1}{4}x$, as well. But, shouldn't this be simply $\frac{1}{4}$ because the pdf is $0$ there, so the CDF doesn't "pick up" any more probability? And then the third interval is given by $\int_{0}^1 \frac{1}{4}dt + \int_{1}^3 \frac{1}{4}dt + \int_{3}^x \frac{3}{8}dt$ which gives $\frac{3}{8}(x-1)$ which, evaluated at $x=5$ doesn't equal $1$, as it should. – thisisourconcerndude Jul 12 '15 at 23:21
• Your definition said "$0$ otherwise". That would mean the density is $0$ between $1$ and $3$, so if $x$ is between $1$ and $3$, then you'd have $\displaystyle \int_0^1 \frac 1 4 \, dt + \int_1^x 0\,dt$. ${}\qquad{}$ – Michael Hardy Jul 13 '15 at 0:50
• Right. But, then, in consideration of that, the CDF becomes what I have up in the OP. – thisisourconcerndude Jul 13 '15 at 0:56
• Which, actually, shouldn't be a CDF because it decreases around $x=3$. Sigh... – thisisourconcerndude Jul 13 '15 at 0:58
• @thisisourconcerndude : It is the density that decreases. The CDF for values of $x>3$ but $<5$ would be $\displaystyle \int_0^1 \frac 1 4 \, dt + \int_1^3 0\,dt + \int_3^x \frac 3 8\, dt$. No decreasing is happening. ${}\qquad{}$ – Michael Hardy Jul 13 '15 at 1:04