Skip to main content

Automation of Statistical Tests on Randomness to Obtain Clearer Conclusion

Abstract

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.

This is a preview of subscription content, access via your institution.

Buying options

Chapter
USD   29.95
Price excludes VAT (Canada)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   129.00
Price excludes VAT (Canada)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   169.99
Price excludes VAT (Canada)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info
Hardcover Book
USD   169.99
Price excludes VAT (Canada)
  • Durable hardcover edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Learn about institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. G. S. Fishman. Monte Carlo. Springer Series in Operations Research. Springer-Verlag, New York, 1996. Concepts, algorithms, and applications.

    MATH  Google Scholar 

  2. G. S. Fishman and L. R. Moore, III. An exhaustive analysis of multiplicative congruential random number generators with modulus 231−1. SIAM J. Sci. Statist. Comput., 7(3):1058, 1986.

    CrossRef  MathSciNet  Google Scholar 

  3. F. James. RANLUX: a Fortran implementation of the high-quality pseudorandom number generator of Lüscher. Computer Physics Communications, 97:357–357(1), September 1996.

    CrossRef  Google Scholar 

  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 

  6. P. L’Ecuyer. Tables of maximally equidistributed combined LFSR generators. Math. Comput., 68(225):261–269, 1999.

    CrossRef  MATH  MathSciNet  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 

  8. P. L’Ecuyer, J. F. Cordeau, and R. Simard. Close-point spatial tests and their application to random number generators. Operations Research, 48(2):308–317, 2000.

    CrossRef  MATH  MathSciNet  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 

  10. P. L’Ecuyer and R. Simard. On the interaction of birthday spacings tests with certain families of random number generators. Mathematics and Computers in Simulation, 55:131–137, 2001.

    CrossRef  MATH  MathSciNet  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 

  12. P. L’Ecuyer, R. Simard, and S. Wegenkittl. Sparse serial tests of uniformity for random number generators. SIAM Journal on Scientific Computing, 24(2):652–668, 2002.

    CrossRef  MATH  MathSciNet  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 

  14. M. Lüscher. A portable high-quality random number generator for lattice field theory simulations. Comput. Phys. Comm., 79(1):100–110, 1994.

    CrossRef  MATH  MathSciNet  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 

  18. G. Marsaglia, B. Narasimhan, and A. Zaman. A random number generator for PCs. Comput. Phys. Comm., 60(3):345–349, 1990.

    CrossRef  MATH  MathSciNet  Google Scholar 

  19. M. Matsumoto and Y. Kurita. Twisted GFSR generators. ACM Trans. Model. Comput. Simul., 2(3):179–194, 1992.

    CrossRef  MATH  Google Scholar 

  20. M. Matsumoto and Y. Kurita. Twisted GFSR generators II. ACM Trans. Model. Comput. Simul., 4(3):254–266, 1994.

    CrossRef  MATH  Google Scholar 

  21. M. Matsumoto and T. Nishimura. Mersenne twister: a 623-dimensionally equidistributed uniform pseudo-random number generator. ACM Trans. Model. Comput. Simul., 8(1):3–30, 1998.

    CrossRef  MATH  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/.

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Hiroshi Haramoto .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and Permissions

Copyright information

© 2009 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Haramoto, H. (2009). Automation of Statistical Tests on Randomness to Obtain Clearer Conclusion. In: L' Ecuyer, P., Owen, A. (eds) Monte Carlo and Quasi-Monte Carlo Methods 2008. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-04107-5_26

Download citation