Testing Random Numbers
Department of Computer Science
Florida State University
A reliable random number generator is obviously a key requirement
for any serious stochastic simulation. However what is a "good" RNG?
Since there does not exist a test (or test suite), which if a RNG passes it,
identifies a RNG as good, we seek to design various tests to detect a
RNG's defects so that we can tell which RNGs might be sufficiently random --
or at least avoid using an unsuitable RNG.|
What is a test? Any function of elements of an i.i.d. random sequence
may serve as a test, if its distribution is known, or even if its
distribution is merely compared with that of other RNGs. Anyone with
a knowledge of probability theory should be able to create his own tests
to test RNGs.
The game of designing and testing RNG is somewhat like detecting drug use in sports. On the one hand, new tests are developed to catch a different generator's defects and, on the other hand, new generators are built which would pass all the current statistical tests, and so on.
Here we are trying to build a state-of-art test suite so that it is easy
for anyone who wants to test their RNGs.
We have two parts of this test suite: Knuth's Empirical tests and
Marsaglia's Stringent tests.
- Knuth's Empirical tests ( Mild tests)
- Collisions test.
- Gap Test
- Parallel Statistical tests
- Blocking test
- Fourier Transform test
- Marsaglia's Stringent tests.
- Overlapping M-tuple tests
- Overlapping-Permutation tests
- The OPSO test (Overlapping-pairs-sparse-occupancy)
- Parking lot, lattice and related tests.
- The Birthday-spacings test
- Ranks of random binary matrices