☰

Poisson Process

Poisson Process and Poisson Distribution: Definition, Formula and Examples

A shop sells about 5 projectors a day. Tomorrow it might sell 3, or 6, or none. A power company says that outages happen about once every 60 days, but you can have two in a week and then go for a year without one. Events that come at random, at a steady average rate, are modelled by the Poisson process.

It is one of the most useful tools for counting data. Call centres use it for calls per hour, websites for hits per minute, hospitals for arrivals per night and factories for defects per batch. Two numbers are enough to work with it: the average rate, and the length of time you care about.

This tutorial explains the Poisson process and the Poisson distribution, how they differ, the conditions, the formula, mean and variance, two worked examples with the correct answers, the waiting time between events, how it relates to the binomial distribution, and how to calculate it in Python.

Definition of a Poisson Process

A Poisson process is a model for events that happen one at a time, at random moments, with a constant average rate. The events are independent, so what happened before does not change what happens next.

The average rate is known, but the exact timing is random. This is why the waiting time between events is described as memoryless: no matter how long you have already waited, the chance of an event in the next minute is the same.

Two related things come from one process:

  • The count of events in a fixed interval follows the Poisson distribution.
  • The waiting time between events follows the exponential distribution.

The live page mixes the two. I keep them apart and show how they link.

Poisson Process Example 1: Power Failures

Poisson process example

A provider says the power goes down about once every 60 days. The failures are random. You could see two in a week, or none for years. The rate is 1 failure per 60 days, or 1 divided by 60 per day. The expected number of failures in t days is t divided by 60.

Expected power failures and chances for different periods
Period Expected failures Chance of none Chance of at least one
30 days 0.500 0.6065 0.3935
60 days 1.000 0.3679 0.6321
120 days 2.000 0.1353 0.8647
365 days 6.083 0.0023 0.9977

Notice that even after a full 60 days, which is the average gap, there is a 36.79 percent chance of having had no failure at all. That is the memoryless random behaviour, and it is the reason why an average of once every 60 days does not mean once every 60 days exactly.

Characteristics of the Poisson Process

  • Independence. One event does not change the chance of another.
  • A constant average rate. The expected number of events per unit of time does not change.
  • No simultaneous events. Two events do not happen at exactly the same moment.
  • Proportional to length. The chance of an event in a short interval is proportional to its length, and it is almost zero for a very tiny interval.

The live page lists no simultaneous events in two different ways, and independence in two different ways. I combined them.

How a Poisson Count Arises?

The live page notes that over about 6,000 days, each day either has an outage or it does not. This is the key idea. Split time into tiny pieces, each with a small chance of an event. The count over all the pieces is a binomial, and when the pieces get tiny and many, the binomial turns into a Poisson.

I tested it: with 6,000 days and a daily chance of 1 in 60, the chance of exactly 100 outages is 0.0402 from the binomial, and 0.0399 from a Poisson with a mean of 100. They nearly match.

When to Use the Poisson Distribution?

A Poisson experiment has these properties:

  • You count how many times something happens in a fixed region of time, area or volume.
  • The average number of events in the region, mu, is known.
  • The chance of an event is proportional to the size of the region.
  • The chance in a tiny region is almost zero, and events are independent.

The live page describes the outcomes as success or failure. Here a success just means that an event occurred, such as a call arriving. The variable counts the events, so it takes the values 0, 1, 2 and so on, with no upper limit.

Good fits: calls per hour, defects per metre of cable, emails per day, accidents per week, typing errors per page.

Importance of the Poisson Distribution

A Poisson random variable counts the events in the region, and its distribution is the Poisson distribution. Its two key facts:

  • Mean = mu.
  • Variance = mu.
    Poisson process tutorial - Variance example

A mean equal to the variance is a useful check. If your count data have a variance much bigger than the mean, a Poisson model is too simple, because the data are overdispersed. In my simulation of 100,000 days with a mean of 5, the sample mean was 5.009 and the variance was 5.008.

Poisson Process Formula

Poisson process formula
P(X = x) = (mu to the power x times e to the power minus mu) divided by x factorial
  • x = the number of events you ask about (0, 1, 2 and so on).
  • mu = the average number of events in the interval.
  • e = 2.71828, the base of natural logs.
  • x factorial = x times (x minus 1) down to 1.

The live page shows the formula only as an image. Here it is in text. If the rate is a per unit of time, then mu = a times the length of time.

Poisson Process Example 2: Projector Sales

Poisson process example

The live page: a shop sells an average of 5 projectors a day. What is the chance of selling exactly 6 tomorrow? The page answers 0.00059. That is wrong. Here is the correct working.

  • mu = 5, x = 6.
  • mu to the power 6 = 5 times itself 6 times = 15,625.
  • e to the power minus 5 = 0.006738.
  • 6 factorial = 720.
  • P(X = 6) = 15,625 times 0.006738 divided by 720 = 0.1462.

Answer: about 14.6 percent. A simulation of 100,000 days gave 6 sales on 14.78 percent of the days, which agrees.

The Full Distribution for a Mean of 5

Poisson probabilities for a mean of 5 projectors a day
Sales x P(X = x) P(X at most x)
0 0.0067 0.0067
1 0.0337 0.0404
2 0.0842 0.1247
3 0.1404 0.2650
4 0.1755 0.4405
5 0.1755 0.6160
6 0.1462 0.7622
7 0.1044 0.8666
8 0.0653 0.9319
9 0.0363 0.9682
10 0.0181 0.9863

Reading the table: the most likely values are 4 and 5, with 17.55 percent each. The chance of selling 8 or more is 0.1334. The chance of selling none is only 0.0067. With this table, a shop can decide how many projectors to keep in stock.

Waiting Time Between Events

If events follow a Poisson process with a rate of 1 per 60 days, the waiting time to the next event follows an exponential distribution with a mean of 60 days. The chance of waiting longer than t days is e to the power minus t divided by 60.

  • The chance of waiting longer than 60 days is 0.3679.
  • The chance of waiting longer than 120 days is 0.1353.

These match the table above, since no failure in 60 days is the same as a wait of over 60 days.

Poisson vs Binomial Distribution

Binomial distribution compared with the Poisson distribution
Point Binomial Poisson
Counts Successes in n trials Events in an interval, with no fixed n
Upper limit n None
Parameters n and p mu only
Mean and variance Mean n times p, variance n times p times (1 minus p) Both equal to mu
Use when A fixed number of trials Events in time or space

When n is large and p is small, the binomial is close to a Poisson with mu = n times p, as the 6,000 day example shows.

Calculate the Poisson Distribution in Python

I ran the code below, and the output is real.

python
import math
import numpy as np
from scipy import stats

# Page example 2: mean 5 projectors a day, P(exactly 6)
mu = 5
by_hand = mu ** 6 * math.exp(-mu) / math.factorial(6)
print("Hand formula P(X=6):", round(by_hand, 5), " scipy:", round(float(stats.poisson.pmf(6, mu)), 5))
for x in range(0, 11):
    print("x", x, " P(X=x):", round(float(stats.poisson.pmf(x, mu)), 4), " P(X<=x):", round(float(stats.poisson.cdf(x, mu)), 4))
print("P(X >= 8):", round(float(stats.poisson.sf(7, mu)), 4), " P(X=0):", round(float(stats.poisson.pmf(0, mu)), 5))
print("Mean:", stats.poisson.mean(mu), " Variance:", stats.poisson.var(mu))

# Page example 1: one power failure every 60 days, rate 1/60 per day
rate = 1 / 60
for days in (30, 60, 120, 365):
    lam = rate * days
    print("days", days, " expected failures:", round(lam, 3), " P(none):", round(float(stats.poisson.pmf(0, lam)), 4), " P(at least 1):", round(float(stats.poisson.sf(0, lam)), 4))
print("P(wait longer than 60 days):", round(float(stats.expon.sf(60, scale=60)), 4), " longer than 120 days:", round(float(stats.expon.sf(120, scale=60)), 4))

# The page's 6000 day idea: each day an outage with chance 1/60, binomial vs Poisson
print("Binomial n=6000 p=1/60, P(X=100):", round(float(stats.binom.pmf(100, 6000, 1 / 60)), 5), " Poisson mean 100:", round(float(stats.poisson.pmf(100, 100)), 5))

# Simulation: 100000 days with mean 5 sales
rng = np.random.default_rng(6)
s = rng.poisson(5, 100000)
print("Simulated mean:", round(float(s.mean()), 3), " variance:", round(float(s.var()), 3), " share equal to 6:", round(float((s == 6).mean()), 4))
output
Hand formula P(X=6): 0.14622  scipy: 0.14622
x 0  P(X=x): 0.0067  P(X<=x): 0.0067
x 1  P(X=x): 0.0337  P(X<=x): 0.0404
x 2  P(X=x): 0.0842  P(X<=x): 0.1247
x 3  P(X=x): 0.1404  P(X<=x): 0.265
x 4  P(X=x): 0.1755  P(X<=x): 0.4405
x 5  P(X=x): 0.1755  P(X<=x): 0.616
x 6  P(X=x): 0.1462  P(X<=x): 0.7622
x 7  P(X=x): 0.1044  P(X<=x): 0.8666
x 8  P(X=x): 0.0653  P(X<=x): 0.9319
x 9  P(X=x): 0.0363  P(X<=x): 0.9682
x 10  P(X=x): 0.0181  P(X<=x): 0.9863
P(X >= 8): 0.1334  P(X=0): 0.00674
Mean: 5.0  Variance: 5.0
days 30  expected failures: 0.5  P(none): 0.6065  P(at least 1): 0.3935
days 60  expected failures: 1.0  P(none): 0.3679  P(at least 1): 0.6321
days 120  expected failures: 2.0  P(none): 0.1353  P(at least 1): 0.8647
days 365  expected failures: 6.083  P(none): 0.0023  P(at least 1): 0.9977
P(wait longer than 60 days): 0.3679  longer than 120 days: 0.1353
Binomial n=6000 p=1/60, P(X=100): 0.0402  Poisson mean 100: 0.03986
Simulated mean: 5.009  variance: 5.008  share equal to 6: 0.1478

Common Mistakes

Common mistakes and fixes
Mistake Fix
Getting 0.00059 for the projector question The answer is 0.1462. Check the arithmetic
Mixing the Poisson process with the distribution The process is events over time, and the distribution counts them
Using the wrong mean for a different interval Scale mu to the length of the interval
Using Poisson when events are clustered Check that the variance is close to the mean
Using Poisson for a fixed number of trials Use the binomial
Forgetting that x can be 0 P(X = 0) is e to the power minus mu
Saying the average gap means a regular gap Events are random, and gaps vary a lot
Using a changing rate The rate must be constant

Practice Questions

  1. A call centre gets 4 calls a minute on average. Find the chance of exactly 2 calls in one minute.
  2. What are the mean and variance of a Poisson variable with mu = 3?
  3. Outages happen once every 60 days. What is the expected number in 120 days?
  4. The shop sells 5 projectors a day. What is the chance of selling none tomorrow?

Answers: 1) 4 squared is 16, e to the power minus 4 is 0.018316, 2 factorial is 2, so 16 times 0.018316 divided by 2 = 0.1465. 2) Both are 3. 3) 2. 4) e to the power minus 5 = 0.0067. These are my own answers, so please recheck them before publishing.

The Poisson process turns random arrivals into numbers you can plan with. Know the average rate, scale it to the interval you care about, and the formula gives the chance of any count. Just check the arithmetic: the right answer for the projector question is 0.1462.

Popular Tags:

definition of poisson process importance of poisson distribution poisson process example poisson process formula Poisson Process tutorial when to use poisson distribution