Automation of Statistical Tests on Randomness to Obtain Clearer Conclusion
Statistical testing of pseudorandom number generators (PRNGs) is indispensable for their evaluation. A common difficulty among statistical tests is how we consider the resulting probability values (p-values). When we observe a small p-value such as 10−3, it is unclear whether it is due to a defect of the PRNG, or merely by chance. At the evaluation stage, we apply some hundred of different statistical tests to a PRNG. Even a good PRNG may produce some suspicious p-values in the results of a battery of tests. This may make the conclusions of the test battery unclear. This paper proposes an adaptive modification of statistical tests: once a suspicious p-value is observed, the adaptive statistical test procedure automatically increases the sample size, and tests the PRNG again. If the p-value is still suspicious, the procedure again increases the size, and re-tests. The procedure stops when the p-value falls either in an acceptable range, or in a clearly rejectable range. We implement such adaptive modifications of some statistical tests, in particular some of those in the Crush battery of TestU01. Experiments show that the evaluation of PRNGs becomes clearer and easier, and the sensitivity of the test is increased, at the cost of additional computation time.
Unable to display preview. Download preview PDF.
- 4.D. E. Knuth. The art of computer programming, volume 2 (3rd ed.): seminumerical algorithms. Addison-Wesley Longman Publishing Co., Inc., Boston, MA, USA, 1997. Google Scholar
- 5.P. L’Ecuyer. Testing random number generators. In WSC ’92: Proceedings of the 24th conference on Winter simulation, pages 305–313, New York, NY, USA, 1992. ACM. Google Scholar
- 7.P. L’Ecuyer. Software for uniform random number generation: distinguishing the good and the bad. In WSC ’01: Proceedings of the 33nd conference on Winter simulation, pages 95–105, Washington, DC, USA, 2001. IEEE Computer Society. Google Scholar
- 9.P. L’Ecuyer and P. Hellekalek. Random number generators: selection criteria and testing. In Random and Quasi-Random Point Sets, volume 138 of Lecture Notes in Statistics, pages 223–266. Springer, 1998. Google Scholar
- 11.P. L’Ecuyer and R. Simard. TestU01: a C library for empirical testing of random number generators. ACM Trans. Math. Software, 33(4):Art. 22, 40, 2007. Google Scholar
- 13.P. C. Leopardi. Testing the tests: using pseudorandom number generators to improve empirical tests. Talk in MCQMC 2008, July 2008. Google Scholar
- 15.G. Marsaglia. A Current View of Random Number Generators. In Computer Science and Statistics, Sixteenth Symposium on the Interface, pages 3–10. Elsevier Science Publishers, 1985. Google Scholar
- 16.G. Marsaglia. DIEHARD: A battery of tests of randomness. 1996. See http://stat.fsu.edu/~geo/diehard.html.
- 17.G. Marsaglia. Xorshift RNGs. Journal of Statistical Software, 8(14):1–6, 2003. Google Scholar
- 22.M. Matsumoto and T. Nishimura. A nonempirical test on the weight of pseudorandom number generators. In Monte Carlo and quasi-Monte Carlo methods, 2000 (Hong Kong), pages 381–395. Springer, Berlin, 2002. Google Scholar
- 23.W. H. Press and S. A. Teukolsky. Numerical recipes in C (2nd ed.): the art of scientific computing. Cambridge University Press, New York, NY, USA, 1992. Google Scholar
- 24.A. Rukhin, J. Soto, J. Nechvatal, M. Smid, E. Barker, S. Leigh, M. Levenson, M. Vangel, D. Banks, A. Heckert, J. Dray, and S. Vo. A Statistical Test Suite for Random and Pseudorandom number Generators for Cryptographic Applications. NIST Special Publication 800-22, National Institute of Standards and Technology (NIST), Gaithersburg, MD, USA, 2001. See http://csrc.nist.gov/rng/.