Distribution of concatenating two uniform random numbers

180 Views Asked by At

Suppose I have two indepent random number generators $RNG_1$ and $RNG_2$, each output random numbers of range $[0, 2^{31}-1]$ with equal probability. I shall make a new random number generator of uniform distribution $[0, 2^{63}-1]$ by sampling two random numbers $r_1$ and $r_2$ from $RNG_1$ and $RNG_2$ respectively, then concatenating them together:

  1. Sample a random number $r_1$ from $RNG_1$
  2. Sample a random number $r_2$ from $RNG_2$
  3. return a new random number $r = 2^{32} r_1 + r_2$

I see there are already a lot of such idea, like

https://math.stackexchange.com/a/965010/86492

https://math.stackexchange.com/a/593271/86492

https://math.stackexchange.com/a/179066/86492

However, they don't give a reason why it works.

So I'd like to see a formal proof... Thanks~

========================================

Edit

Suppose $RNG_1$ and $RNG_2$ have perfect uniform distribution (i.e., they output numbers with equal probability)