A test of randomness based on the distance between consecutive random number pairs

One of the most popular methods of generating "random" numbers for use in a computer program employs a Lehmer random number generator. If constructed properly, these generators yield streams of numbers that appear random but can also be easily replicated. However, Marsaglia (1968) discovered a potential flaw in these random number generators, namely, if consecutive n-tuples of the generated numbers are plotted in n-dimensional space, the points may fall into a small number of hyperplanes. In this paper, we compare the theoretical distribution of the distances to the actual distances produced by a specific random number generator in order to devise a statistical test of randomness for the validity of the random number generator.