(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]$?
Best Answer
I hope a quick simulation in R will help you visualize this transformation. For readable graphs, I use only transformed values in $(-10,10).$
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.