IDEAS home Printed from https://ideas.repec.org/a/jss/jstsof/v007i03.html
   My bibliography  Save this article

Some Difficult-to-pass Tests of Randomness

Author

Listed:
  • Marsaglia, George
  • Tsang, Wai Wan

Abstract

We describe three tests of randomness-- tests that many random number generators fail. In particular, all congruential generators-- even those based on a prime modulus-- fail at least one of the tests, as do many simple generators, such as shift register and lagged Fibonacci. On the other hand, generators that pass the three tests seem to pass all the tests in the Diehard Battery of Tests. Note that these tests concern the randomness of a generator's output as a sequence of independent, uniform 32-bit integers. For uses where the output is converted to uniform variates in [0,1), potential flaws of the output as integers will seldom cause problems after the conversion. Most generators seem to be adequate for producing a set of uniform reals in [0,1), but several important applications, notably in cryptography and number theory-- for example, establishing probable primes, complexity of factoring algorithms, random partitions of large integers-- may require satisfactory performance on the kinds of tests we describe here.

Suggested Citation

  • Marsaglia, George & Tsang, Wai Wan, 2002. "Some Difficult-to-pass Tests of Randomness," Journal of Statistical Software, Foundation for Open Access Statistics, vol. 7(i03).
  • Handle: RePEc:jss:jstsof:v:007:i03
    DOI: http://hdl.handle.net/10.18637/jss.v007.i03
    as

    Download full text from publisher

    File URL: https://www.jstatsoft.org/index.php/jss/article/view/v007i03/tuftests.pdf
    Download Restriction: no

    File URL: https://www.jstatsoft.org/index.php/jss/article/downloadSuppFile/v007i03/tuftests.c.zip
    Download Restriction: no

    File URL: https://libkey.io/http://hdl.handle.net/10.18637/jss.v007.i03?utm_source=ideas
    LibKey link: if access is restricted and if your library uses this service, LibKey will redirect you to where you can use your library subscription to access this item
    ---><---

    Citations

    Citations are extracted by the CitEc Project, subscribe to its RSS feed for this item.
    as


    Cited by:

    1. Vladimir K. Kaishev & Dimitrina S. Dimitrova, 2009. "Dirichlet Bridge Sampling for the Variance Gamma Process: Pricing Path-Dependent Options," Management Science, INFORMS, vol. 55(3), pages 483-496, March.
    2. repec:jss:jstsof:21:i01 is not listed on IDEAS
    3. Ilija Tanackov & Feta Sinani & Miomir Stanković & Vuk Bogdanović & Željko Stević & Mladen Vidić & Jelena Mihaljev-Martinov, 2019. "Natural Test for Random Numbers Generator Based on Exponential Distribution," Mathematics, MDPI, vol. 7(10), pages 1-14, October.
    4. Doyle, John R. & Chen, Catherine H., 2013. "Patterns in stock market movements tested as random number generators," European Journal of Operational Research, Elsevier, vol. 227(1), pages 122-132.
    5. Dlugosz, Stephan & Müller-Funk, Ulrich, 2012. "Ziffernanalyse zur Betrugserkennung in Finanzverwaltungen: Prüfung von Kassenbelegen," Arbeitsberichte des Instituts für Wirtschaftsinformatik 133, University of Münster, Department of Information Systems.
    6. Altman, Micah & Gill, Jeff & McDonald, Michael P., 2007. "accuracy: Tools for Accurate and Reliable Statistical Computing," Journal of Statistical Software, Foundation for Open Access Statistics, vol. 21(i01).
    7. Madiha Khalid & Umar Mujahid & Muhammad Najam-ul-Islam, 2018. "Cryptanalysis of ultralightweight mutual authentication protocol for radio frequency identification enabled Internet of Things networks," International Journal of Distributed Sensor Networks, , vol. 14(8), pages 15501477187, August.
    8. Castro, Julio Cesar Hernandez & Sierra, José María & Seznec, Andre & Izquierdo, Antonio & Ribagorda, Arturo, 2005. "The strict avalanche criterion randomness test," Mathematics and Computers in Simulation (MATCOM), Elsevier, vol. 68(1), pages 1-7.
    9. Ben Moews, 2023. "On random number generators and practical market efficiency," Papers 2305.17419, arXiv.org, revised Jul 2023.
    10. Almaraz Luengo, Elena & Leiva Cerna, Marcos Brian & García Villalba, Luis Javier & Hernandez-Castro, Julio, 2022. "A new approach to analyze the independence of statistical tests of randomness," Applied Mathematics and Computation, Elsevier, vol. 426(C).

    More about this item

    Statistics

    Access and download statistics

    Corrections

    All material on this site has been provided by the respective publishers and authors. You can help correct errors and omissions. When requesting a correction, please mention this item's handle: RePEc:jss:jstsof:v:007:i03. See general information about how to correct material in RePEc.

    If you have authored this item and are not yet registered with RePEc, we encourage you to do it here. This allows to link your profile to this item. It also allows you to accept potential citations to this item that we are uncertain about.

    We have no bibliographic references for this item. You can help adding them by using this form .

    If you know of missing items citing this one, you can help us creating those links by adding the relevant references in the same way as above, for each refering item. If you are a registered author of this item, you may also want to check the "citations" tab in your RePEc Author Service profile, as there may be some citations waiting for confirmation.

    For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: Christopher F. Baum (email available below). General contact details of provider: http://www.jstatsoft.org/ .

    Please note that corrections may take a couple of weeks to filter through the various RePEc services.

    IDEAS is a RePEc service. RePEc uses bibliographic data supplied by the respective publishers.