4

What is the most important test for a uniform random number generator ? Is there a single most important test or a set? I am a using some analytically arrived at answers to probability problems and checking the simulation answers obtained through a random generator. For all the probability problems that I analysed and simulated and checked, they are coming pretty close to the analytical results.

1 Answers1

1

Any single test is inadequate. A single test will find failures of randomness of one kind, but the generated numbers might still be very orderly in other respects. So it's best to use a bunch of different tests that look for different patterns.

I'm not sure I understand your use case (and by now you may no longer have the same need), but if you really want to test the quality of a uniform random number generator, you should use a high-quality, up to date test suite such as Pierre L'Ecuyer's TestU01. A random number generator that passes all of the tests might still exhibit systematic nonrandom patterns (and if it's a pseudorandom number generating algorithm, it's guaranteed to do so), but the chance that they'd make a difference to your application would be small.

The papers linked at the TestU01 page are very informative, too, as is Melissa O'Neil's PCG paper. Good books include:

(Some partially-similar questions I've answered on another site:

Mars
  • 1,338