Simulating the Poisson process

Simulating poisson

A simulation of the Poisson process, built using Processing.

The process models random events occuring in continuous time given that:

  1. Events occur on their own
  2. The average rate of events happening remains constant
  3. Future events have nothing to do with ones which have happened

A process has average rate such as \lambda = \frac{1}{4} per minute. Number of events in t minutes is the discrete random variable X, where X \sim Poisson(\lambda t). The time you have to wait between events follows an exponential distribution T \sim M(lambda).

The simulation works by obtaining a waiting time between each event, through making independent observations on the random variable T \sim M(\lambda). We can do this by solving:

F(t) = u

where u is a random observation on the uniform distribution U(0,1). With the exponention distribution this means solving

1-e^{-\lambda t}=u

which ends up with

t=-\frac{1}{\lambda} log(1-u)

Each time an event is fired, t is recalculated.

This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>