From: "M. Edward (Ed) Borasky" Date: 2008-08-17T13:32:20+09:00 Subject: Re: Generating Normally Distributed Random Numbers? On Sun, 2008-08-17 at 13:19 +0900, hadley wickham wrote: > On Sat, Aug 16, 2008 at 11:01 PM, Phlip wrote: > > steve wrote: > > > >> If I remember my basic stats correctly from the dim distant past, isn't > >> the mean of a series of N random numbers normally distributed? > > > > There's "normal" and then there's "normal". (-: > > > > (One is your casual meaning - evenly distributed numbers - and the other is > > numbers that occupy the geometric "normal" of some function...) > > A quick and dirty way of generating a normally distributed random > number is to take the average of 6 uniformly distributed numbers > (because of the central limit theorem). It's by no means perfect, but > it's an old and useful trick. Only if you're pressed for CPU time, like in an embedded environment. IIRC it's 12, not 6. But the "standard" way with transcendental functions is much more accurate. > > Hadley > -- M. Edward (Ed) Borasky ruby-perspectives.blogspot.com "A mathematician is a machine for turning coffee into theorems." -- Alfr��d R��nyi via Paul Erd��s