Exponential arrival distribution in Python

Paul Rubin no.email at nospam.invalid
Thu Nov 29 00:25:59 CET 2012


Ricky <rakkitha263 at gmail.com> writes:
> I am doing a project on traffic simulation. I want to introduce
> exponential arrival distribution to precede this task. Therefore I
> want write a code in python for exponential arrival distribution.

I've never heard of an "exponential arrival distribution" and googling
fails.  Do you mean an exponential distribution, that describes the
expected arrival times in a Poisson process?  Python's "random" module
has the random.expovariate function for that:

  http://docs.python.org/3/library/random.html

If you want an actual (discrete) Poisson distribution, see:

http://en.wikipedia.org/wiki/Poisson_distribution#Generating_Poisson-distributed_random_variables




More information about the Python-list mailing list