13 · Poisson: rare events over a fixed interval
Poisson(λ) models the count of independent events arriving at constant rate over a fixed window — the go-to distribution for clicks, requests, defects, and mutations.
Poisson(λ) models the count of independent events arriving at constant rate over a fixed window.
Without this:
Without it, you can't model click counts, server requests per second, or any 'rare events per period' problem.
The Poisson distribution answers: "How many times will an event occur in a fixed interval, if events happen independently at a constant average rate λ?"
Probability Mass Function: P(X = k) = (λ^k · e^(−λ)) / k! for k = 0, 1, 2, …
The single parameter λ (lambda) is simultaneously the rate (events per interval), the mean, and the variance.
Mean and variance:
- E[X] = λ
- Var(X) = λ
This mean = variance property is the Poisson's hallmark — and the first diagnostic check when deciding whether to use it. If your count data has sample variance much larger than its mean, the Poisson is misspecified (more on this below).
Classic examples:
- Emails received per hour (λ = 3)
- Server HTTP requests per second (λ = 100)
- Mutations per genome per generation (λ = 2)
- Defects per square meter of fabric (λ = 0.5)
- Cosmic ray hits on a detector per minute (λ = 0.1)
In all cases: events are independent, arrive at roughly constant rate, and cannot occur simultaneously.
The Poisson process: The continuous-time model underlying the Poisson distribution is the Poisson process — events arrive randomly, the waiting time between consecutive events is Exponential(λ), and the count in any fixed interval of length t is Poisson(λt).
Python (in browser)
Poisson(λ=3): mean = variance = 3. P(X=2) ≈ 0.224 (22.4% of intervals see exactly 2 events). CDF(5) ≈ 0.916 means the event count exceeds 5 only about 8.4% of the time — rare but not negligible.
Python runs entirely in your browser via Pyodide (~6 MB on first Run, cached after).
Python (in browser)
Three Poisson PMFs with λ=1, 4, 10. As λ grows: the distribution spreads (std = √λ), shifts right, and becomes progressively more symmetric, approaching the bell shape of a Normal(λ, λ). Open /tmp/poisson.png to view.
Python runs entirely in your browser via Pyodide (~6 MB on first Run, cached after).
Python (in browser)
1000 simulated hours of Poisson(λ=3) email arrivals. Both the empirical mean and variance converge to λ=3 — confirming the Poisson's hallmark property. The empirical histogram closely matches the theoretical PMF.
Python runs entirely in your browser via Pyodide (~6 MB on first Run, cached after).
The Binomial(1000, 0.003) and Poisson(λ=3) PMFs differ by at most ~0.18% at any k. For practical purposes they are the same distribution. The Poisson is preferred because it has no large combinatorial term that strains numerical precision.
If X ~ Poisson(λ=4), what is Var(X)?
- **PMF**: P(X=k) = (λ^k · e^(−λ)) / k!. **Mean = Variance = λ** — the hallmark property. If empirical mean ≠ empirical variance, Poisson is likely wrong.
- **Poisson = limit of Binomial** when n is large and p is small (λ = np). Use Poisson for rare-event counting — it is numerically simpler and avoids combinatorial overflow.
- Real count data is often **overdispersed** (variance >> mean). When this happens, switch from Poisson to the Negative Binomial distribution.
Poisson regression models count targets (visits per day, defects per part). YouTube's recommendation loss has Poisson components. Server load forecasting is fundamentally Poisson-distributed.
If you remove it: You'd use MSE on count targets — wrong likelihood, bad uncertainty, and underestimates the right tail.