| ??? 12/19/07 17:04 Read: times |
#148518 - how random is "Random"? Responding to: ???'s previous message |
The chi-square test is one type of statistical test used to determine how well the distribution of a set of generated numbers matches the theoretical distribution. If there are k categories, and numbers are equally distributed across the categories, then the theoretical distribution is 1/k for each category. This test will tell you if the pseudo-random number generator (PRNG) is biased toward a aprticular range of numbers.
BUT! it's not the only randomness test. There are also non-parametric statistical test (check for "runs tests") to see if the PRNG is biased toward certain subtle combinations (i.e. a 23 will follow a 76 over 50% of the time...which ain't good). In the particular locale where Alan and I live (Nevada, USA) a good PRNG is a valuable company asset and a carefully guarded trade secret. PRNGs in commercial equipment are regulated by a state government body and have to pass numerous tests before being certified for use. Jack Peacock |



