Random Number Generation
Random Number Generation
A random or pseudorandom number generator (RNG) is a computational or physical device designed to generate a random sequence of numbers. There are many different methods for generating random bits and testing their quality. This Demonstration shows all the Mathematica algorithms for producing random binary sequences and random real number sequences (between 0 and 1) with other examples (for binary sequences) that clearly fail as RNGs, such as a repetitive sequence and the Thue-Morse example.
For binary sequences, the Demonstration also includes a sample segment of random bits that was produced by a hardware device whose randomness relies on a quantum physical process and another whose randomness relies on atmospheric noise. It can be seen that all of them succeed or fail the oversimplified tests to detect the lack of randomness, either by changing the seed or by shifting the threshold of the statistical tolerance. All comparisons are made over groups of 10000 bits each (one group per seed) even when only 3000 bits are displayed.