If rand() is a function which produces a linearly distributed random number over a range not containing zero, then what type of distribution would rand() / rand() produce?
I know it would center at 1, and there would be a few extreme values very close to zero or very large.
Does this type of random distribution have a name?
Let $U_1$ be a uniform random variable with domain $[a,b]$ for $b>a>0$, and let $U_2$ be another identically distributed independent uniform variable.
Let $X= \frac{U_1}{U_2}$. It is clear that $\frac{b}{a} \geqslant X \geqslant \frac{a}{b}$ with probability 1. Let $x$ be from such an interval. Then $$ \begin{eqnarray} F(x) &=& \mathbb{P}\left( X \leqslant x\right) = \mathbb{P}\left( U_1 \leqslant U_2 x \right) = \mathbb{E}\left( \min\left(1, \max\left(0, \frac{x U_2 - a}{b-a} \right) \right) \right) \\ & = & \int_0^1 \min\left(1, \max\left(0, \frac{x (a+(b-a) u) - a}{b-a} \right) \right) \mathrm{d} u \\ &=& \int_0^1 \min\left(1, \max\left(0, u \cdot x + \frac{a}{b-a} (x-1) \right) \right) \mathrm{d} u \\ \end{eqnarray} $$ Consider now two cases, $\frac{b}{a} \geqslant x \geqslant 1$ and $1 > x \geqslant \frac{a}{b}$.
$$ \begin{eqnarray} F(x) &=& \int_0^1 \min\left(1, \max\left(0, u \cdot x + \frac{a}{b-a} (x-1) \right) \right) \mathrm{d} u \\ &=& \int_0^1 \min\left(1, u \cdot x + \frac{a}{b-a} (x-1) \right) \mathrm{d} u \\ &=& \int_0^{u^\ast} \left( u \cdot x + \frac{a}{b-a} (x-1) \right) \mathrm{d} u + \int_{u^\ast}^1 \mathrm{d} u \\ &=& \left(\frac{u^\ast}{2} x - \frac{b - a x}{ x(b-a)}\right) u^\ast + 1 \\ &=& 1 - \frac{1}{2 x} \left( \frac{b-a x}{b-a} \right)^2 \end{eqnarray} $$ where $u^\ast$ solves $u x + \frac{a}{b-a} (x-1) = 1 $, i.e. $u^\ast = \frac{b-a x}{x (b-a)}$.
Given $F(x)$ computed above, the probability density follows by differentiation.