How to test a random number generator

by John on October 27, 2009

Random number generators are challenging to test.

  • The output is supposed to be unpredictable, so how do you know when the generator working correctly?
  • Your tests will fail occasionally, but how do you decide whether they’re failing too often?
  • What kinds of errors are most common when writing random number generation software?

These are some of the questions I address in Chapter 10 of Beautiful Testing.

Beautiful Testing: Leading Professionals Reveal How They Test

The book is now in stock at Amazon. It is supposed to be in book stores by Friday. All profits from Beautiful Testing go to Nothing But Nets, a project to distribute anti-malarial bed nets.

{ 2 comments… read them below or add one }

1

Daniel Lemire 10.27.09 at 22:22

What a great subject!!!

(And closely related to a current interest of mine… random hashing…)

Lucky you to contribute to such a great book. I envy you.

2

Mark 10.28.09 at 15:01

Congrats, John, on your book contributions!

Leave a Comment

You can use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>