Math Behind Producing Uniform Distribution

60 Views Asked by At

I am familiar that if one can produce a uniform distribution, doing so, one can then produce random numbers for other types of distributions. I have tried reading some articles online but I am still confused as to how is one to produce random numbers from a uniform distribution?

1

There are 1 best solutions below

3
On

One doesn't really produce uniform values in a continuous interval -- if only because this would (with probability $1$) result in a number that cannot even be written down in finite space. Instead one can approximate such a distribution. For example as an uniform choice of numbers from the discrete set $$ \{ n\cdot 2^{-53} \mid 0 < n \le 2^{53} \} $$ will approximate a uniform distribution on $[0,1]$ well enough for many purposes.

Such a number can be produced by flipping a coin 53 times to produce 53 binary digits, or by any other source of random bits you have available.

Producing random bits is a nontrivial engineering challenge if you want them to be truly random. For many purposes a pseudo-random number generator (whose output isn't really random but can look at lot like it) will suffice. For information about creating true randomness, random.org would be a good place to start.