PDF of Ratio of Two Uniformly Distributed Discrete Random Variables

48 Views Asked by At

Let $X_1$ and $X_2$ be independent random variable from $\{1,2,3,\dots, n\}$ with PDF $f(x) = 1/n$.

What is the PDF of $Y = X_1/X_2$?

Here's my attempt The CDF of $Y$ is \begin{align*} F(y) &= P(Y\leq y)\\ &= P(X_1 \leq X_2Y)\\ &= \sum_{x_2 = 1}^n \sum_{x_1 = 1}^{x_2y} \frac{1}{n^2}\\ &= \frac{y}{n^2} \sum_{x_2 = 1}^n x_2\\ &= \frac{y}{n^2} \frac{n(n + 1)}{2} = \frac{n + 1}{2n}y \end{align*}

Now I'm stuck on how to get the pdf of $Y$. I know that if we have two consecutive value of $Y$, namely $y_k$ and $y_{k + 1}$ then we have the pdf value at $y_{k + 1}$ is $$F(y_{k + 1}) - F(y_k)$$ But I don't know how to get this. Any suggestion or hint?

There's another question in math SE but with continuous case, which PDF can be obtained by differentiating, but I don't get any idea for this one.