0
$\begingroup$

(from The Probability Tutoring Book, C. Ash, p. 157)

Find the density of $Y$ if $Y = 1/X$ and $X$ is uniform on $[-1,1]$.

The distribution function given in the answer key is

$$ F(y) = \begin{cases} \frac{-1}{2y} & \text{if }y \leq -1\\ \frac{1}{2} & \text{ if }-1 \leq y \leq 1\\ 1-\frac{1}{2y} & \text{if } y \geq 1 \end{cases} $$

My question is why the first and last cases aren't $0$ and $1$. Doesn't $Y$ only range over $[-1, 0)$ and $(0, 1]$?

$\endgroup$
4
  • $\begingroup$ No, when $X \approx 0,$ you have extreme positive and negative values of $Y.$ $\endgroup$
    – BruceET
    Commented Apr 18, 2020 at 23:17
  • $\begingroup$ Yes, I will adjust my question. I'm really trying to understand the equations for y <= -1 and y >= 1 $\endgroup$
    – planarian
    Commented Apr 18, 2020 at 23:23
  • $\begingroup$ Maybe start with $F_Y(y) = P(Y \le y) = P(1/X \le y) = \cdots,$ for $y$ in each of the three intervals. $\endgroup$
    – BruceET
    Commented Apr 18, 2020 at 23:31
  • $\begingroup$ Similar to stats.stackexchange.com/q/450921/119261 since the distribution of $X$ is symmetric about zero. To derive the pdf from the cdf, it suffices to find the cdf for $y>0$ as the distribution of $1/X$ will also be symmetric about zero. $\endgroup$ Commented Apr 19, 2020 at 18:22

2 Answers 2

2
$\begingroup$

I hope a quick simulation in R will help you visualize this transformation. For readable graphs, I use only transformed values in $(-10,10).$

set.seed(2020)
x = runif(10^5, -1,1)
y = 1/x
Y = y[abs(y) < 10]  # plotted values
length(y)
[1] 100000
length(Y)
[1] 89815
par(mfrow=c(1,2))
 hist(Y, prob=T, col="skyblue2")
 plot(ecdf(Y))
par(mfrow=c(1,1))

enter image description here

Note: The ECDF of a sample plots values of the sample from smallest to largest. It is a stairstep function (with jumps too small to see here). At each value of a sample of size $n$ the ECDF jumps up by $1/n.$ If there are $K$ values tied at a point, then the function jumps by $k/n$ at that point. (No ties here) For a sufficiently large sample the ECDF closely imitates the population CDF.

$\endgroup$
4
$\begingroup$

Observe that $-1\le x\le 1\implies |x|\le 1\implies \frac1{|x|}\ge 1$, so support of $|Y|$ is $[1,\infty)$.

In other words, support of $Y$ is $(-\infty,-1]\cup [1,\infty)$.

For any continuous random variable $X$, distribution function of $Y=\frac1X$ is

\begin{align} P(Y\le y)&=P\left(\frac1X\le y,X<0\right)+P\left(\frac1X\le y,X>0\right) \\&=\begin{cases} P\left(\frac1y\le X<0\right) &,\text{ if }y<0 \\ P(X<0)+ P\left(X\ge \frac1y\right) &,\text{ if }y>0\end{cases} \end{align}

That is,

$$P(Y\le y)=\begin{cases} P(X<0)-P\left(X\le \frac1y\right) &,\text{ if }y<0 \\ 1 + P(X<0)-P\left(X < \frac1y\right) &,\text{ if }y>0\end{cases}$$

As $P\left(\frac1X\le y\right)=P(X\in A)$ where $A=\left\{x: \frac1x \le y\right\}$, drawing a picture of the region $A$ might help in verifying the calculation.

Now if you carefully find $P\left(X \le \frac1y\right)$ from the distribution function of $X$, you will end up with the answer in your post.

Alternatively, you can find the density of $Y$ directly from the change of variables $y=\frac1x$:

$$f_Y(y)=f_X\left(\frac1y\right)\left|\frac{\mathrm dx}{\mathrm dy}\right|$$

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.