Stellar Grove · Concrete Mathematical Modelling
Random arrivals at the checkout
If customers arrive at random at 1.8 a minute, how lumpy is the flow, and can we tell from a day's data?
Chapter 5 · Birth and death: probabilistic dynamics. A worked example rebuilt from the chapter's topic in Mike Mesterton-Gibbons, *A Concrete Approach to Mathematical Modelling*; the scenario and numbers are our own illustration, not the book's text. The day of arrivals on this page is simulated from a Poisson process with a known rate, so the estimate and the goodness-of-fit test can be checked against the truth.
Headline: Even at a steady average of 1.8 a minute, 17% of minutes see nobody and 4% see five or more. One simulated day pins the rate to 1.84 (1.72–1.96), and the Poisson shape fits (p = 0.65).
- 17%of minutes with no arrivals (e^(−λ))
- 4%of minutes with a burst of 5 or more
- 1.84/minrate estimated from 882 arrivals (truth 1.8)
The problem
A store manager plans checkout staffing. Customers don't coordinate: each arrival is independent of the others, and the chance of one in any short instant is the same all day. What does that imply about how many arrive per minute and about the gaps between them?
The model
Assume that in a short interval one arrival happens with probability , independently of the past. The probability of arrivals by time then satisfies a pure-birth chain of forward equations:
Solving them one after another gives the Poisson distribution, and the time to the next arrival is exponential:
The maximum-likelihood rate from gaps is , with an exact interval from . A χ² test then compares observed minute-counts with the fitted Poisson.
Try it
Arrivals per interval
Drag the sliders; hover the chart to read values.
Key findings
- Randomness is lumpy. The variance of a Poisson count equals its mean, so a minute expecting 1.8 customers has a standard deviation of 1.34: idle minutes (17%) and bursts (4% with 5+) are normal, not signs of a problem. In the simulated day, 16% of minutes were idle.
- A day of data is enough for the rate: 882 arrivals give , 95% interval 1.719–1.961, which covers the true 1.8.
- The Poisson shape passes the χ² test (χ² = 4.2, p = 0.65)
- Because gaps are memoryless, a cashier who has been idle for 3 minutes is no more likely to see a customer in the next minute than one who just finished; the queueing models of Chapter 6 build on exactly this.
Truth checks
| Check | Result |
|---|---|
| 95% interval for the rate covers the true 1.8 | pass |
| χ² test does not reject the (true) Poisson model at 5% | pass |
import numpy as np
from books.concrete_mathematics import birth_death as bd, estimation as es
times = bd.poisson_process(rate=1.8, t_max=480, rng=2024)
gaps = np.diff(np.concatenate([[0.0], times]))
print(len(times), [round(x, 3) for x in es.exponential_rate_ci(gaps)])
print(round(bd.prob_no_event(1.8, 1.0), 3))
# → 882 [1.838, 1.719, 1.961]
# → 0.165
Assumptions and extensions
- Constant rate. Real stores have lunchtime peaks; a non-homogeneous Poisson process lets vary by hour (estimate it hour by hour with
estimation.poisson_rate_ci). - Independent arrivals. Families arriving together make counts more variable than Poisson; the variance-to-mean ratio is the quick check.
- Pure death (customers leaving, atoms decaying) is the mirror image:
birth_death.pure_death_pmfgives the binomial survivors.