From: Joel VanderWerf Date: 2008-08-18T07:07:31+09:00 Subject: Re: Generating Normally Distributed Random Numbers? Michael Craig wrote: > Does anybody know of a good method in Ruby to generate normally distributed > random numbers? The application I have in mind at the moment is trivial, but > I can think of a number of statistics-oriented applications. Sounds like you got plenty of answers already, but here's one more (also includes log normal and exponential): http://redshift.sourceforge.net/sci/ Example: require 'sci/random' seq = Random::Normal.new( # :generator => MyGenerator # above is optional, if you want it to work with a generator # other than ruby's built in one. MyGenerator must support # MyGenerator.new(seed) and #next() :mean => 10, :stdev => 2, :seed => 8732548 ) p seq.next p seq.next p seq.next -- vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407