Random Number Generators: Metrics and Tests for Uniformity and Randomness

E. A. Yfantis1, J. B. Pedersen1
1Image Processing, Computer Vision and Machine Intelligence Lab School of Computer Science College of Engineering University of Nevada, Las Vegas 4505 Maryland Parkway Las Vegas, NV, 89154-4019

Abstract

Random number generators are a small part of any computer simulation project. Yet they are the heart and the engine that drives the project. Often times software houses fail to understand the complexity involved in building a random number generator that will satisfy the project requirements and will be able to produce realistic results. Building a random number generator with a desirable periodicity, that is uniform, that produces all the random permutations with equal probability, and at random, is not an easy task. In this paper we provide tests and metrics for testing random number generators for uniformity and randomness. These tests are in addition to the already existing tests for uniformity and randomness, which we modify by running each test a large number of times on sub-sequences of random numbers, each of length \( n \). The test result obtained each time is used to determine the probability distribution function. This eliminates the random number generator misclassification error. We also provide new tests for uniformity and randomness, the new tests for uniformity test the skewness of each one of the subgroups as well as the kurtosis. The tests for randomness, which include the Fourier spectrum, the phase spectrum, the discrete cosine transform spectrum, and the orthogonal wavelet domain, test for patterns not detected in the raw data space. Finally we provide visual and acoustic tests.