Probability – New Probability Density Function from Reciprocal of Uniform Random Number

calculusprobabilityprobability distributions

I have a random number generator which can generate a random number between $0$ and $1$.

I attempt to generate a random number between 1 and infinity, by using that random number generator, but taking the reciprocal of that result.

Is the new generator uniform? Certainly not. Then what is the probability density function of the new generator?

Best Answer

Let the old probability density function be $f_1(x)$, and the new one be $f_2(x)$.

We have:$$ \int_1^af_2(x)\mathrm dx=\int_\frac1a^1f_1(x)\mathrm dx $$where $a>1$.

We also know that $f_1(x)$ is uniform, and spans from $0$ to $1$. Therefore, $f_1(x)=1$ in that interval.

Therefore:$$ \int_1^af_2(x)\mathrm dx=\int_\frac1a^1\mathrm dx=1-\frac1a $$

Differentiating both sides with respect to $a$:$$ \frac{\mathrm d}{\mathrm da}\int_1^af_2(x)\mathrm dx=\frac{\mathrm d}{\mathrm da}\left(1-\frac1a\right) $$

Simplifying both sides:$$ f_2(a)=\frac1{a^2} $$ $\blacksquare$