Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

There are several test suites referenced at designed to test a (pseudo-)random byte sequence for randomness, and discover possible skews, correlations, patterns, or other hidden non-randomness in it.

Are there implementations of any of them or other similar test suites in Mathematica? Or some precompiled libraries (including Java or .NET modules) that can be invoked from Mathematica running on Windows?

share|improve this question
Perhaps this: It's a bit old, but I don't have time to check it out. (Sorry.) – Michael E2 Jul 29 '13 at 21:07
up vote 8 down vote accepted

As far as I know there are no test suites that can be invoked directly from Mathematica. One can of course use the traditional ones such as the one you mention or the NIST or the Marsaglia's diehard tests. I implemented some "toy tests" in this Wolfram Demonstration to illustrate Mathematica's various built-in PRNGs, which fail or succeed the toy tests depending on various factors. There is also this paper that implemented the NIST tests in Mathematica. It is written in Spanish though, although the abstract is in English. Its content is in the context of Elementary Cellular Automata.

share|improve this answer

This page has a download link for Ilja Gerhardt's updated version of Galbreath's notebook:

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.