# PDF and CDF of Ratio distribution in specific cases

Consider two random variables $$X$$ and $$Y$$. I would like to derive the PDF and CDF of $$Z=\frac{X}{\max(X,Y)}.$$ The direct method would be to derive distributions for the numerator and denominator and then the ratio. But I am trying to do this slightly differently.

The way I see it there are two cases: $$Z_1=X/X$$ and $$Z_2 = X/Y$$. For $$Z_1$$ the CDF is $$F_{Z_1}(z) = P(X/X \le z) = \begin{cases} 0 ,& \text{if } z < 1\\ 1, & z \ge 1. \end{cases}$$ For $$Z_2 = X/Y$$ the CDF is less straightforward but assume the PDF $$f_{Z_2}(z)$$ is known. Then $$F_{Z_2}(z) = \int_{-\infty}^{z}f_{Z_2}(x)dx.$$ How can I stitch these pieces together into a CDF and PDF for the original $$Z$$?

My guess: $$F_Z(z) = \begin{cases} F_{Z_2}(z) ,& \text{if } z < 1\\ 1, & z \ge 1 \end{cases}$$ There is likely a discontinuity at $$z=1$$ but we differentiate to obtain $$f_Z(z) = \begin{cases} f_{Z_2}(z) ,& \text{if } z < 1\\ \delta(z-1), & z \ge 1 \end{cases}$$

• Are $X$ and $Y$ independent? May 16, 2020 at 2:12

I'll assume that you know how to calculate $$P(X\leq zY)$$ for any $$z$$...
Following your logic, $$Z=\begin{cases} 1, & X>Y\\ \frac{X}{Y}, & X\leq Y. \end{cases}$$ Then using conditional probability, for any $$z\in\mathbb{R}$$, $$P(Z\leq z)=P(Z\leq z|X>Y)P(X>Y)+P(Z\leq z|X\leq Y)P(X\leq Y)\quad (1)$$ For the first part in the right-hand side of (1) we have that $$P(Z\leq z|X>Y) = P(1\leq z|X>Y) = P(1\leq z) = \mathbb{1}_{[1,\infty)}(z).$$ For the second part of (1) we have that \begin{align*} P(Z\leq z|X\leq Y) &= P(X\leq zY|X\leq Y)\\ &=\begin{cases} \frac{P(X\leq zY)}{P(X\leq Y)}, & z\leq 1\\ 1, & z>1. \end{cases} \end{align*}