Poisson Distribution & the Poisson Process
Why do rare, independent events — radioactive decays, server requests, typos on a page — follow the same simple formula? We derive the Poisson distribution as a limit of the Binomial, build the continuous-time Poisson process from exponential waiting times, and simulate both in JavaScript.
1. The Poisson distribution
A discrete random variable X follows a Poisson distribution with rate parameter λ > 0 if it counts the number of events occurring in a fixed interval, when events happen independently at a constant average rate:
λ is simultaneously the mean and the variance of X — a distinctive fingerprint of Poisson-distributed data. If you count something and the sample variance is close to the sample mean, Poisson is a natural first model.
2. From Binomial to Poisson: the limit
Split the interval into n tiny sub-intervals, each so short that at most one event can occur in it, with probability p = λ/n. The count of events is then Binomial(n, p):
Take the limit as n → ∞ while λ = np stays fixed. Expanding the binomial coefficient and using the standard limit (1 − λ/n)ⁿ → e−λ:
= (λᵏ/k!) · [n(n−1)···(n−k+1)/nᵏ] · (1−λ/n)ⁿ · (1−λ/n)⁻ᵏ
// as n→∞: the middle bracket → 1, (1−λ/n)ⁿ → e⁻λ, (1−λ/n)⁻ᵏ → 1
→ (λᵏ/k!) · e−λ
This is the law of rare events (Poisson limit theorem, formalised by Siméon Denis Poisson in 1837): a Binomial with many trials and small per-trial probability, but a fixed product np = λ, converges to Poisson(λ). In practice, the approximation is already excellent for n ≥ 20, p ≤ 0.05.
3. The Poisson process and waiting times
The Poisson process extends the distribution to continuous time. It is a counting process N(t) satisfying three axioms:
- N(0) = 0, and increments over disjoint intervals are independent.
- The number of events in an interval of length t is Poisson(λt).
- Events cannot occur simultaneously (orderliness): P(2+ events in [t, t+h]) = o(h).
A remarkable consequence: the time between consecutive events — the inter-arrival time — is exponentially distributed with the same rate λ.
P(T > t) = e−λt ⟹ T ~ Exponential(λ), f(t) = λe−λt
Because the exponential distribution is memoryless — P(T > s+t | T > s) = P(T > t) — the process has no "memory" of how long it has already waited. This is exactly what makes the Poisson process the canonical model for arrivals that are truly random and uncorrelated.
Δt = −ln(U) / λ (U ~ Uniform(0,1)) and accumulating arrival times. This is exact and avoids
discretisation error.
4. Properties: mean, variance, superposition, thinning
| Property | Formula | Interpretation |
|---|---|---|
| Mean | E[X] = λ | Expected count per interval |
| Variance | Var[X] = λ | Equidispersion — mean = variance |
| Skewness | 1/√λ | Right-skewed for small λ, ≈ Normal for large λ |
| MGF | M(t) = exp(λ(eᵗ−1)) | Generates all moments |
Superposition
If two independent Poisson processes with rates λ₁ and λ₂ are merged (e.g. arrivals from two independent servers into the same queue), the combined process is Poisson with rate λ₁ + λ₂. This follows directly from the additivity of independent Poisson random variables: X₁ ~ Poisson(λ₁), X₂ ~ Poisson(λ₂) ⟹ X₁ + X₂ ~ Poisson(λ₁ + λ₂).
Thinning
Conversely, if each event of a Poisson(λ) process is independently kept with probability p (e.g. only 10% of incoming requests are errors), the kept events form a Poisson process with rate λp, and the discarded ones form an independent Poisson process with rate λ(1−p). This "splitting" property is unique to Poisson processes and is heavily used in queueing network analysis.
5. Applications
| Domain | λ represents | k counts |
|---|---|---|
| Radioactive decay | Decay rate | Particles detected per second |
| Call centre / web server | Requests per minute | Requests in a given minute |
| Typos in a manuscript | Average errors per page | Errors on a given page |
| Insurance claims | Claims per year | Claims filed in a year |
| M/M/1 queueing theory | Arrival rate λ, service rate μ | Customers in system |
Queueing theory's simplest model, M/M/1 ("Markovian arrivals, Markovian service, 1 server"), assumes both arrivals and departures follow Poisson processes — which is precisely why the Poisson process is the starting point for capacity planning of servers, call centres, and traffic intersections.
6. JavaScript implementation
Sampling from Poisson(λ) — Knuth's algorithm
// Knuth (1969): exact for small-to-moderate λ. O(λ) time per sample.
function samplePoisson(lambda) {
const L = Math.exp(-lambda);
let k = 0, p = 1;
do {
k++;
p *= Math.random();
} while (p > L);
return k - 1;
}
Simulating the process natively via exponential gaps
// Generates arrival times over [0, T] using exact exponential inter-arrivals.
function simulatePoissonProcess(lambda, T) {
const arrivals = [];
let t = 0;
while (true) {
const u = Math.random();
const gap = -Math.log(u) / lambda; // exponential inter-arrival
t += gap;
if (t > T) break;
arrivals.push(t);
}
return arrivals;
}
// Sanity check: bin arrivals into unit intervals — counts should be ~Poisson(lambda)
function countsPerUnitInterval(arrivals, T) {
const bins = new Array(Math.ceil(T)).fill(0);
for (const t of arrivals) bins[Math.floor(t)]++;
return bins;
}
const arrivals = simulatePoissonProcess(4.5, 1000); // λ=4.5 events/unit time
const counts = countsPerUnitInterval(arrivals, 1000);
const mean = counts.reduce((a,b)=>a+b,0) / counts.length;
const variance = counts.reduce((s,x)=>s+(x-mean)**2,0) / counts.length;
console.log(mean, variance); // both should be close to 4.5
7. Non-homogeneous processes
Real-world arrival rates rarely stay constant — traffic peaks in rush hour, calls spike after an outage announcement. A non-homogeneous Poisson process (NHPP) replaces the constant λ with a time-varying rate function λ(t). The number of events in [0,t] is Poisson with mean equal to the integral of the rate:
The simplest simulation technique is thinning (Lewis-Shedler algorithm): simulate a homogeneous Poisson process at the maximum rate λ_max, then keep each candidate event independently with probability λ(t)/λ_max. This reduces the non-homogeneous case to ordinary Poisson thinning, which we already derived in section 4.
🎯 Explore Monte Carlo simulations
Run thousands of stochastic trials in the browser and watch the law of large numbers in action.