http://www.perlmonks.org?node_id=349864


in reply to Re: Re: How do we find statistical distribution of a given set of numbers?
in thread How do we find statistical distribution of a given set of numbers?

Be careful!

Generating random numbers is hard. The chi-squared test is of very limited value. Numbers which fail, are likely not usefully random, but numbers which pass might be pretty useless as well.

As with many things in life it depends what you want. If you're rolling dice in D&D, almost any RNG will do fine. If you are simulating a time series model with high dimensional data, only the very best RNG's will be any use at all.

Testing randomness is not trivial. I wouldn't like to do it in Perl, though I'm sure it's possible. George Marsaglia has a useful page on his Diehard tester.

Other resources include :-

Good luck

-- Anthony Staines