[Tutor] Exponentially distributed random number generation

Danny Yoo dyoo@hkn.eecs.berkeley.edu
Sat Feb 1 13:52:08 2003


On Wed, 1 Jan 1997, zywy wrote:

> Does anyone know whether there is a python function to generate
> exponentially distributed random numbers?

Hi Zywy,

Yup: you'll probably want to use the 'random' module's "expovariate()"
function: here's a link to its documentation:

    http://www.python.org/doc/lib/module-random.html

If you have more questions, please feel free to ask.  Good luck!