[SciPy-dev] Box-Muller considered slow.

Robert Kern robert.kern at gmail.com
Thu Dec 8 17:44:28 CST 2005

Charles R Harris wrote:

> How does one test the normal distribution ?

It should pass the test in scipy.stats for the normal distribution. That
should just be the Kolmogorov-Smirnov test. The Anderson-Darling test
would be nice because it has greater power in the tails; however, the
tables are distribution-specific for that test, but you may be able to
find appropriate values for the normal distribution somewhere online.
There may be some more normality tests one could apply, but they won't
add much value.

But most important in this case would be the tests outlined by Doornik
in section 3 of the paper David pointed out. Basically, you generate
normally-distributed values, pass them through the inverse CDF, and
apply the usual tests for uniform random numbers. I haven't read through
it all and tracked down licenses for the code he has in the paper, but
it looks like an ACM TOMS paper, and the ACM TOMS non-commercial use
license would probably be the applicable one.

Robert Kern
robert.kern at gmail.com

"In the fields of hell where the grass grows high
 Are the graves of dreams allowed to die."
  -- Richard Harter

More information about the Scipy-dev mailing list