Computational Science Stack Exchange is a question and answer site for scientists using computers to solve scientific problems. 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

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 :)

share|improve this question
I presume PRNG = pseudorandom number generator? – Geoff Oxberry Apr 14 '12 at 16:01
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.) – Geoff Oxberry Apr 14 '12 at 16:05
@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). – Paul Apr 14 '12 at 20:56
You may be interested in a well-known test suite for random number generators, DieHarder <>; 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.) – Hans Werner Apr 16 '12 at 8:13
up vote 3 down vote accepted

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.

share|improve this answer

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.

share|improve this answer
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. – Hans Werner Apr 16 '12 at 7:54

I have had a lot of luck with this package:

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:

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.