Quantcast
Channel: Understanding "randomness" - Stack Overflow
Viewing all articles
Browse latest Browse all 29

Answer by Juliet for Understanding "randomness"

$
0
0

It might help to think of this in more discrete numbers. Consider want to generate random numbers between 1 and 36, so you decide the easiest way is throwing two fair, 6-sided dice. You get this:

     1    2    3    4    5    6  -----------------------------1|   1    2    3    4    5    62|   2    4    6    8   10   123|   3    6    9   12   15   184|   4    8   12   16   20   24   5|   5   10   15   20   25   306|   6   12   18   24   30   36

So we have 36 numbers, but not all of them are fairly represented, and some don't occur at all. Numbers near the center diagonal (bottom-left corner to top-right corner) will occur with the highest frequency.

The same principles which describe the unfair distribution between dice apply equally to floating point numbers between 0.0 and 1.0.


Viewing all articles
Browse latest Browse all 29

Trending Articles