Re: how to generate random numbers that satisfy certain distribution

2010-01-24 Thread Robert Kern
On 2010-01-23 21:30 , Steven D'Aprano wrote: On Sat, 23 Jan 2010 14:10:10 -0800, Paul Rubin wrote: Steven D'Aprano writes: The Box-Muller transform is reasonably simple, but you can't be serious that it is simpler than adding twelve random numbers and subtracting six! If you want a normal d

Re: how to generate random numbers that satisfy certain distribution

2010-01-23 Thread Steven D'Aprano
On Sat, 23 Jan 2010 14:10:10 -0800, Paul Rubin wrote: > Steven D'Aprano writes: >> The Box-Muller transform is reasonably simple, but you can't be serious >> that it is simpler than adding twelve random numbers and subtracting >> six! > > If you want a normal distribution, using the Box-Muller t

Re: how to generate random numbers that satisfy certain distribution

2010-01-23 Thread Paul Rubin
Steven D'Aprano writes: > The Box-Muller transform is reasonably simple, but you can't be serious > that it is simpler than adding twelve random numbers and subtracting six! If you want a normal distribution, using the Box-Muller transform is simpler because it spares you the complication of fig

Re: how to generate random numbers that satisfy certain distribution

2010-01-23 Thread Steven D'Aprano
On Sat, 23 Jan 2010 12:29:22 -0800, Paul Rubin wrote: > Peter Chant writes: >> I remeber being told that adding up 12 random numbers in the range 0-1 >> (which is what most computer random number genertors at the time >> chucked out) and subtracted 6 gives a pretty good normal distribution. >> I

Re: how to generate random numbers that satisfy certain distribution

2010-01-23 Thread Steven D'Aprano
On Sat, 23 Jan 2010 11:10:52 -0800, thinke365 wrote: > of course i have tried random package, but can this package generate > random sequence that satisfy possion distribution , normal distribution > and uniform distribution Please don't talk garbage. If you had really tried the random module, yo

Re: how to generate random numbers that satisfy certain distribution

2010-01-23 Thread Paul Rubin
Peter Chant writes: > I remeber being told that adding up 12 random numbers in the range 0-1 > (which is what most computer random number genertors at the time chucked > out) and subtracted 6 gives a pretty good normal distribution. I think I > did try it once and it failed, but I must have do

Re: how to generate random numbers that satisfy certain distribution

2010-01-23 Thread Paul Rubin
thinke365 writes: > of course i have tried random package, but can this package generate random > sequence that satisfy possion distribution , normal distribution and uniform > distribution Did you look at the documentation? -- http://mail.python.org/mailman/listinfo/python-list

Re: how to generate random numbers that satisfy certain distribution

2010-01-23 Thread Arnaud Delobelle
thinke365 writes: > such as uniform distribution, Normal distribution or poisson distribution. > is there any package that can be used to generate such random numbers. It's all in the standard library, the module is called -surprisingly- 'random'. - use random.uniform for the uniform distributi

Re: how to generate random numbers that satisfy certain distribution

2010-01-23 Thread Peter Chant
thinke365 wrote: > > such as uniform distribution, Normal distribution or poisson distribution. > is there any package that can be used to generate such random numbers. > I remeber being told that adding up 12 random numbers in the range 0-1 (which is what most computer random number genertors

Re: how to generate random numbers that satisfy certain distribution

2010-01-23 Thread thinke365
> > of course i have tried random package, but can this package generate random sequence that satisfy possion distribution , normal distribution and uniform distribution -- View this message in context: http://old.nabble.com/how-to-generate-random-numbers-that-satisfy-certain-distribution-

Re: how to generate random numbers that satisfy certain distribution

2010-01-23 Thread Ravi
On Jan 23, 10:37 pm, thinke365 wrote: > such as uniform distribution, Normal distribution or poisson distribution. > is there any package that can be used to generate such random numbers. > > -- > View this message in > context:http://old.nabble.com/how-to-generate-random-numbers-that-satisfy-cer

how to generate random numbers that satisfy certain distribution

2010-01-23 Thread thinke365
such as uniform distribution, Normal distribution or poisson distribution. is there any package that can be used to generate such random numbers. -- View this message in context: http://old.nabble.com/how-to-generate-random-numbers-that-satisfy-certain-distribution-tp27288180p27288180.html