Hi,

"Dave Thomas" <Dave / thomases.com> wrote in message
news:m2pupalb7m.fsf / zip.local.thomases.com...

> I'm looking for a couple of unit tests for Ruby's random number
> generator. Unfortunately, what stat's I did is now all a blur (largely
> because I skipped the courses, but...)
>
> So, my thinking is to do a T-test on the mean, and a
> Kolmorogov-Smirnov on the distribution. Is this a good approach, or
> can I do better.

I think that brand of vodka is good enough for most practical purposes. :-)

> And if I take this approach, what would be reasonable
> confidence values?
>
> I had a look at the diehard tests, but I don't want to go to town on
> this--I just want a couple of sanity checks.

This probably won't answer you question, but when I looked at the recently
mentioned www.memepool.com site, there was mention of a purportedly first
rate on-line statistics textbook at
http://www.statsoft.com/textbook/stathome.html.

In some fairly recent computing or physics journal, a ran across an article
with some simply generated but fairly striking 2-D plots that were used for
comparing a number of random number generators. Unfortunately I don't recall
where, but maybe this will stimulate someone else's memory.

However, all is not lost. Some probably more useful stuff follows below,
courtesy of http://www.google.com (using "random number generator tests"
gives many additional interesting hits).

Conrad

=========================================================

A Server on the Theory and Practice of Random Number Generation:

    http://random.mat.sbg.ac.at/

"pLab is an object oriented system for generating and testing random numbers
designed by Hannes Leeb. It was implemented in C++ by Thomas Auer, Hannes
Leeb and Otmar Lendl, in Mathematica by Karl Entacher, and in Smalltalk 80
by Hannes Leeb. We use it to for various statistical tests, discrepancy
computations and scatter plots. You can download it to test your generator."

=========================================================

GNU Scientific Library -- Reference Manual
Edition 0.6, for gsl Version 0.6
19 May 2000

    http://sourceware.cygnus.com/gsl/ref/gsl-ref_toc.html

....

References and Further Reading

The subject of random number generation and testing is reviewed extensively
in Knuth's Seminumerical Algorithms.
Donald E. Knuth, The Art of Computer Programming: Seminumerical Algorithms
(Vol 2, 3rd Ed, 1997), Addison-Wesley, ISBN 0201896842.

Further information is available in the review paper written by Pierre
L'Ecuyer, available at
http://www.iro.umontreal.ca/~lecuyer/myftp/papers/handsim.ps.

On the World Wide Web, see the pLab home page (http://random.mat.sbg.ac.at/)
for a lot of information on the state-of-the-art in random number
generation, and for numerous links to various "random" WWW sites.

The source code for the DIEHARD random number generator tests is also
available online.

DIEHARD source code G. Marsaglia http://stat.fsu.edu/pub/diehard/

Acknowledgements

Thanks to Makoto Matsumoto, Takuji Nishimura and Yoshiharu Kurita for making
the source code to their generators (MT19937, MM&TN; TT800, MM&YK) available
under the GNU General Public License. Thanks to Martin L@"uscher for
providing notes and source code for the RANLXS and RANLXD generators.