According to this paper,

Ideally, a pseudorandom number generator would produce a stream of numbers that:

  1. are uniformly distributed,
  2. are uncorrelated,
  3. never repeats itself,
  4. satisfy any statistical test for randomness,
  5. are reproduceable (for debugging purposes),
  6. are portable (the same on any computer),
  7. can be changed by adjusting the initial "seed" value,
  8. can easily be split into many independent subsequences
  9. can be generated rapidly using limited computer memory

But, as the paper suggests, it is impossible to satisfy all criteria simultaneously. I'm curious to know how well different PRNG satisfy each criteria. I'd really like to find a reference to a thorough discussion of each PRNG's strengths and weaknesses, but I'm open to any heuristics as well :)

  • $\begingroup$ I presume PRNG = pseudorandom number generator? $\endgroup$ – Geoff Oxberry Apr 14 '12 at 16:01
  • $\begingroup$ In the process of writing a paper, I stumbled across the Wikipedia page for George Marsaglia, who developed a number of PRNGs, along with some tests of their randomness properties. Perhaps searching for his papers might give you a good start? (Unfortunately, he died last year, but perhaps he published something recently.) $\endgroup$ – Geoff Oxberry Apr 14 '12 at 16:05
  • $\begingroup$ @GeoffOxberry: That's not a bad idea... I'll see if I can dig up any cross-comparison works of his. I'm hoping there exists some sort of "table of pro's and con's" for each PRNG (pseudo-random number generator). $\endgroup$ – Paul Apr 14 '12 at 20:56
  • 1
    $\begingroup$ You may be interested in a well-known test suite for random number generators, DieHarder <phy.duke.edu/~rgb/General/dieharder.php> documentation, papers, and actual tests will be be a good starting point to understanding and evaluating the different criteria. (BTW, there is an R interface RDieHarder to this RNG test suite.) $\endgroup$ – Hans W. Apr 16 '12 at 8:13

I think the book Numerical Recipes--The Art of Scientific Computing,William H et al talks about each PRNG's strengths and weaknesses in chapter 7. If you want to test different PRNGs by yourself, you can try the TestU01 suite, which is developed by L'Ecuyer and Richard Simard, this suite contains 3 predefined batteries(SmallCrush, Crush, and BigCrush), provides different levels of thoroughness for testing. Most PRNGs even like LCGs can pass SmallCrush, which is roughly equivalent to the Diehard Battery, some may pass Crush, but very few of them will pass BigCrush. It also summarized the testing result for different popular PRNGs in a table.


I believe one of the Art of Computer Programming books by Knuth is devoted exclusively to random numbers. It's probably not up to date, but it would be the place where I'd start reading.

  • $\begingroup$ It's just one chapter, Chapt. 3, in Vol. 2, "Seminumerical Algorithms", and has been published in 1981. I don't think it should be recommended as a reference for the theory modern random number generators. $\endgroup$ – Hans W. Apr 16 '12 at 7:54

I have had a lot of luck with this package: http://www.phy.duke.edu/~rgb/General/dieharder.php

It is the diehard tests + a large suite of others all ramped up to paranoid levels, and it outputs ACTUAL METRICS! As suggested by the question.

I ran a ways down this rabbit hole sometime during my masters thesis, which addressed how viscous flow was affected by large numbers of random obstructions. During my investigation I discovered that random-sphere packing is actually part of the diehard test-suite, getting good randoms is hard . . . on a related note, I would also reccomend this read, and associated troll Amazon comments: http://www.amazon.com/Million-Random-Digits-Normal-Deviates/dp/0833030477


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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