# Division of two random variables of uniform distributions

Having X ~ Uniform(0,1), Y ~ Uniform(1,3) independent what's the pdf of Z = X/Y.

This means I can write the PDFs as follows $$f_X(x) = 1$$ for $x \in \left(0,1\right)$ and 0 otherwise $$f_Y(y) = \frac{1}{2}$$ for $x \in \left(1,3\right)$ and 0 otherwise.

Using the following formula for division of independent random variables:

$$f_Z(u) = \int_0^{\infty}f_Y(y)f_X(yu)dy$$

$f_x(uy)$ is non-zero when $uy \in \left(0,1\right)$ so $y \in \left(0,\frac{1}{u}\right)$. The maximum $u$ is then $\frac{1}{3}$. What would be the right domain of integration in the formula above? Should the resulting PDF be then parameterized by $u$?

-
Just to try out Mathematica's probability framework: D[Probability[ x/y <= z, {x [Distributed] UniformDistribution[{0, 1}], y [Distributed] UniformDistribution[{1, 3}]}], z] yields (for the pdf) 2 if z<1/3, (6-2z)/(4z)-(-z^2+6z-1)/(4z^2) if 1/3<z<1 and 0 elsewhere. –  PeterR Jan 23 '13 at 15:46
@PeterR It would be more direct to try PDF[TransformedDistribution[x/y,{Distributed[x,UniformDistribution[]], Distributed[y, UniformDistribution[{1,3}]]}], z] –  Sasha Jan 23 '13 at 16:04
Perhaps it is time to refer to Isaac Asimov's story The Feeling of Power again. –  Dilip Sarwate Jan 23 '13 at 16:08
But I'd like to know how to do this in hand. I don't get the integration of the Iverson bracket in the answer below. –  NumberFour Jan 23 '13 at 17:35
Actually, probability density functions for $X$ and $Y$ include indicator function (using Iverson bracket notation) $$f_X(x) = [ 0 < x < 1] \qquad f_Y(y) = \frac{1}{2} [ 1 < y < 3]$$ Now: $$\begin{eqnarray} f_Z(z) &=& \int_0^\infty y f_Y(y) f_X(z \, y) \mathrm{d} y = \frac{1}{2} \int_1^3 y [ 0 < z \, y < 1 ] \mathrm{d} y \\ &=& [0<z<1] \int_1^3 \frac{y}{2} [z \, y < 1 ] \mathrm{d} y \\ &=& [0<z<1] \frac{1}{4} \left( \min\left(3^2,\frac{1}{z^2}\right) - 1 \right)\\ &=& [0<z<1] \min\left(2,\frac{1}{4}\left(\frac{1}{z^2}-1\right)\right) \end{eqnarray}$$
@NumberFour For $0<z<1$ the Iverson bracket becomes zero for $y>\frac{1}{z}$. That is the effect of having the Iverson bracket in the integral is that the upper bound depends on $z$: $$\int_1^3 \frac{y}{2} [ z y < 1] \mathrm{d} y = \int_1^{\min\left(3,z^{-1}\right)} \frac{y}{2} \mathrm{d} y$$ –  Sasha Jan 23 '13 at 20:50