Poisson Process and Queuing Theory — Modelling Random Arrivals
Buses that arrive "randomly," radioactive decays, customers walking into a shop, packets hitting a router, earthquakes along a fault — wildly different phenomena all obey the same mathematics. The Poisson process is the canonical model of events that happen independently at a constant average rate, and queuing theory builds on it to answer a very practical question: how long will you have to wait? We derive the process from first principles, connect it to the exponential and Poisson distributions, prove Little's Law, and simulate an M/M/1 queue event-by-event in JavaScript.
1. The Poisson Process — Axioms
A Poisson process with rate λ (events per unit time) is a model for a stream of events occurring at random points along a timeline. It is defined by three axioms:
In plain language: events happen one at a time, they don't "know" about each other, and the long-run average rate λ never changes. N(t) denotes the number of events that have occurred by time t — the process is a counting process.
2. The Counting Distribution
Starting from the axioms above, one can derive (via a differential equation for P(N(t) = k)) that the number of events in an interval of length t follows a Poisson distribution:
Notice the mean and variance are both λt — a hallmark of Poisson data. If a bank counts 45 customers in a 3-hour window (λ = 15/hr), the probability of seeing exactly 20 customers in the next hour is P(N(1)=20) = 15²⁰e⁻¹⁵/20! ≈ 4.2%. As λt grows large, the Poisson distribution is well approximated by a normal with the same mean and variance (Central Limit Theorem).
3. Inter-Arrival Times Are Exponential
Let T be the time until the next event. T > t exactly when zero events occur in [0, t]:
This is the exponential distribution. So a Poisson process is equivalently defined as a sequence of inter-arrival times T₁, T₂, T₃, … that are independent and identically exponentially distributed with rate λ. This is often the easiest way to simulate one: draw exponential gaps and cumulatively sum them to get arrival times.
4. The Memoryless Property
The exponential distribution is the only continuous distribution with the memoryless property:
If you've been waiting 10 minutes for a bus that arrives as a Poisson process, the distribution of your remaining wait is identical to the distribution if you'd just arrived — the process has no memory of elapsed time. This is counter-intuitive (it feels like a bus is "overdue") but is exactly what makes the Poisson process mathematically tractable: it is a continuous-time Markov chain.
5. Superposition and Thinning
Two independent Poisson processes with rates λ₁ and λ₂, merged into one event stream, form a new Poisson process with rate λ₁ + λ₂ (superposition). Conversely, if each event of a rate-λ process is independently kept with probability p and discarded with probability 1−p, the kept events form a Poisson process with rate λp (thinning).
Thinning is the standard trick for simulating a Poisson process with a time-varying rate λ(t): generate a homogeneous process at the peak rate λ_max, then keep each candidate event with probability λ(t)/λ_max.
6. Queuing Notation and the M/M/1 Model
Queuing theory studies systems where entities arrive, wait, and are served. Kendall's notation A/S/c describes a queue: A = arrival process, S = service-time distribution, c = number of servers. "M" stands for "Markovian" (i.e. exponential — memoryless). The simplest non-trivial queue is M/M/1: Poisson arrivals at rate λ, exponential service times at rate μ, one server, first-come-first-served, infinite waiting room.
The system behaves as a birth–death Markov chain: "births" are arrivals (rate λ from every state), "deaths" are service completions (rate μ from every non-empty state). Setting the balance equations πₙλ = πₙ₊₁μ and normalising Σπₙ = 1 gives the geometric distribution above.
7. Little's Law
One of the most powerful, distribution-free results in all of applied probability, proven by John Little in 1961:
Little's Law holds for essentially any stable queuing system, regardless of the arrival process, service distribution, or number of servers — it is a statement about conservation of "item × time" (a flow argument), not about Poisson or exponential assumptions at all. It lets you infer any one of L, λ, W from the other two. A café serving 30 customers/hour with 6 customers typically present has an average dwell time of W = L/λ = 6/30 = 0.2 hours = 12 minutes — without ever measuring a single stopwatch.
8. Multi-Server Queues — M/M/c
With c identical servers sharing one queue (M/M/c), the traffic intensity per server is ρ = λ/(cμ), and the Erlang-C formula gives the probability an arriving customer must wait:
M/M/1
Simplest model, closed-form geometric distribution.
M/M/c
Call centres, checkout lanes — Erlang-C formula.
M/M/∞
Never wait — number in system is simply Poisson(λ/μ).
This is exactly the mathematics behind Erlang's original 1917 work sizing telephone exchanges, and it still governs how call centres and cloud auto-scalers decide how many servers (agents, machines) to provision to keep waiting times acceptable.
9. JavaScript: Discrete-Event Simulation
Rather than trust the closed-form formulas blindly, we can verify them with a discrete-event simulation of an M/M/1 queue, advancing time from one event (arrival or departure) to the next:
// M/M/1 discrete-event simulation
function expRandom(rate) {
// inverse-CDF sampling: T = -ln(U) / rate
return -Math.log(Math.random()) / rate;
}
function simulateMM1(lambda, mu, numArrivals) {
let clock = 0;
let serverFreeAt = 0;
let totalWait = 0;
let totalSystemTime = 0;
let areaUnderQueue = 0; // for time-average L
let lastEventTime = 0;
let inSystem = 0;
for (let i = 0; i < numArrivals; i++) {
clock += expRandom(lambda); // next arrival
areaUnderQueue += inSystem * (clock - lastEventTime);
lastEventTime = clock;
inSystem++;
const serviceStart = Math.max(clock, serverFreeAt);
const wait = serviceStart - clock;
const service = expRandom(mu);
serverFreeAt = serviceStart + service;
totalWait += wait;
totalSystemTime += wait + service;
inSystem--; // simplification: FCFS, single server
}
return {
Wq: totalWait / numArrivals, // simulated mean wait
W: totalSystemTime / numArrivals, // simulated mean time in system
Wq_theory: (lambda / mu) / (mu - lambda),
W_theory: 1 / (mu - lambda),
};
}
// lambda = 4/min arrivals, mu = 5/min service ⇒ ρ = 0.8
const result = simulateMM1(4, 5, 200000);
console.log(result);
// { Wq: ≈0.799, W: ≈1.0, Wq_theory: 0.8, W_theory: 1.0 }
Over 200,000 simulated customers the empirical Wq and W converge tightly to the theoretical values (λ/μ)/(μ−λ) and 1/(μ−λ) — a nice sanity check that the birth–death derivation matches reality. The same event-loop skeleton (generate next event, advance clock, update state) scales to M/M/c, priority queues, and finite buffers by extending the state update logic.
10. Applications
Telecommunications
Call-centre staffing, network packet queuing, trunk sizing.
Operations
Checkout lanes, hospital triage, airport security lines.
Computing
Web server request queues, database connection pools.
Beyond service systems, the Poisson process is the default model for radioactive decay counts, meteor impacts, insurance claim arrivals, mutations along a DNA strand, and neuron spike trains — any setting where discrete events scatter independently across time or space at a roughly constant rate. Whenever a phenomenon is "rare events, many opportunities," the Poisson limit theorem (a binomial with large n and small p converges to Poisson(np)) explains why the same k^λ e^(-λ)/k! formula keeps reappearing.
See the arrivals pile up
Explore Monte Carlo methods and the Central Limit Theorem to see how sampled averages converge to the theoretical values derived here.