Re: Generating normally distributed randoms in CL



Is there a simple way to generate normally distributed random data in
CommonLisp? I'm looking for a package, that can handle this, and maybe
also other statistical stuff

Depending on you needs, the following might be good enough (passes
general normality tests for a few hundreds of numbers):
(- (loop for i from 1 to 12 sum (random 1d0)) 6)

From there you can go as far as you want to obtain the desired
accuracy (including tail corrections if needed). There is a recent
review of algorithms here:
http://www.cse.cuhk.edu.hk/~phwl/mt/public/archives/papers/grng_acmcs07.pdf

Personally I find methods based on the inverse normal cumulative
function simpler to understand and safer to use. Transformation and
rejection methods are clever, but they are sensible to problems with
the pseudo-random sequence (and using them with low-discrepancy
sequences is difficult, when possible at all).

Carlos
.