How Computers Generate Random Numbers - Chapter 6

Chapter 5          die6          Chapter 7
index
Back to Deley's Homepage



6.0    THE SPECTRAL TEST

As stated earlier, for a linear congruential random number generator, a 2-D plot will show that all the points lie on parallel lines, and a 3-D plot will show that all the points lie on parallel planes. In general, an n-D plot would show that all the points lie on (n-1) dimensional hyperplanes.

One test of a linear congruential random number generator is to see how far apart these parallel planes are for each dimension. The spectral test calculates the distances between these parallel planes for a linear congruential random number generator given the modulus M and the multiplier A of the generator. A good random number generator would need to have the planes closely spaced for each dimension so that the individual planes do not become apparent early on. RANDU, having only 16 widely spaced parallel planes in the 3-D unit cube, fails the spectral test quite horribly.

We will not discuss further the spectral test here. Further information on the spectral test can be found in the book by Knuth.



Chapter 5          die6          Chapter 7
index
Back to Deley's Homepage