How to generate geometric random numbers?

Gerhard Fiedler gelists at gmail.com
Sun Jul 23 16:36:22 EDT 2006


On 2006-07-23 17:12:20, MyInfoStation at gmail.com wrote:

> I am a newbie to Python and would like to genereate some numbers
> according to geometric distribution. However, the Python Random package
> seems do not have implemented functionality. I am wondering is there
> exist any other libraries that can do this job? 

The usual way is to generate standard random numbers (linear distribution)
and then apply whatever transformation you need to generate the desired
distribution.

Gerhard




More information about the Python-list mailing list