Discrete distribution
Poisson distribution
The number of events in a fixed stretch of time or space when they happen independently at a constant average rate : calls to a help desk in an hour, typos on a page, radioactive decays in a second, bomb strikes on a square of a city. Its mean and variance are both , which is the first thing to check in real count data.
Poisson probability calculator
P(X ≤ 4) = 0.628837
At the parameters set by the sliders. The shaded region on the plot is the probability; the dots on the CDF mark F at its ends. For a discrete distribution, < and ≤ differ.
PMF
CDF
mean 4 · variance 4 · sd 2 · mode 4
Formulas
| Parameters |
|
|---|---|
| Support | |
| PMF | |
| CDF | |
| Mean | |
| Variance | |
| Mode | |
| MGF |
is the regularized upper incomplete gamma function.
Worked example
In R. D. Clarke's 1946 study of flying-bomb hits on south London, an area was divided into 576 squares of a quarter square kilometre, and 537 bombs fell on it. If the bombs fell at random, how many squares would you expect to be hit exactly once?
The average per square is . The expected number of squares with one hit is Clarke counted 211. The whole table fitted a Poisson distribution closely, which is evidence the bombs were not aimed at particular squares. answer checked by code
How it relates to others
- Limit← Binomial: If and with fixed, Binomial() tends to Poisson(): the law of rare events. checked by code
- Limit← Negative binomial: If with the mean fixed, Negative binomial() tends to Poisson(). checked by code
- Limit→ Normal: For large , Poisson() is approximately Normal(). checked by code
- SumThe sum of independent Poisson() and Poisson() variables is Poisson(). checked by code
- Conjugate prior← Gamma: A Gamma() prior on a Poisson rate and counts give a Gamma() posterior. checked by code
- Special case← Zero-inflated Poisson: A zero-inflated Poisson with is Poisson(). checked by code
- Mixture→ Zero-inflated Poisson: Mixing Poisson() with weight and a point mass at 0 with weight gives the zero-inflated Poisson(). checked by code
- Transformation→ Skellam: If are independent Poisson() and Poisson(), is Skellam(). checked by code
All the relationships, as a diagram →
In Python
from scipy import stats
import numpy as np
X = stats.poisson(mu=4)
X.pmf(3) # P(X = 3) = 0.1954
X.cdf(3) # P(X ≤ 3) = 0.4335
X.mean(), X.var() # 4, 4
X.ppf(0.95) # 95th percentile
X.rvs(size=10, random_state=0)
rng = np.random.default_rng(0)
rng.poisson(lam=4, size=10)Choosing between this and its neighbours? Which distribution for count data? · Which prior distribution should I use?