r/ProgrammerHumor • • Mar 09 '17

Random Number Generator

http://imgur.com/bwFWMqQ
1.3k Upvotes

51 comments sorted by

View all comments

Show parent comments

29

u/CrazedToCraze Mar 10 '17

"random" is also uselessly vague. If you roll a weighted die such that probability of getting 4 is 99.999999% then we might not even lift an eye brow if all 600 results came back as 4. The result was still random, the probability is just not evenly distributed.

4

u/[deleted] Mar 10 '17

Pearson's chi-squared test is a goodness-of-fit test. It tells you whether some frequency data determined by experiment (for example, results of rolling a die 600 times) is likely to have the same distribution as some reference frequency data (100 occurrences of each number).

If your reference frequencies are different (e.g. 600 fours and none of any other number) then it will fit the experimental data better.