Quant Memo
Foundational

The Inspection Paradox and the Waiting-for-a-Bus Trap

Why the average wait for a randomly-timed bus feels longer than half the average gap between buses — because arriving 'at a random moment' makes you more likely to land inside a long gap than a short one.

Prerequisites: Conditional Probability

The problem. Buses arrive with gaps between them that average 10 minutes. You show up at the bus stop at a uniformly random time. Naive intuition says your average wait should be half the average gap, 5 minutes. If the gaps are all exactly 10 minutes (a perfectly regular schedule), that's exactly right. But if the gaps are variable — some short, some long, averaging 10 minutes — your expected wait is actually longer than 5 minutes, sometimes much longer. This is the inspection paradox.

Why variability makes your wait worse, not just noisier

Arriving at a "random moment" doesn't mean you're equally likely to land in any gap — it means you're more likely to land in a long gap, because long gaps occupy more clock time. A gap that's twice as long as average is twice as likely to be the one you happen to arrive during. So your experience over-samples the long gaps relative to how often they actually occur among all gaps. This is the same mechanism behind "the class you're in always feels more crowded than average" (you're more likely to be enrolled in a class that has more students, if class sizes vary) and "your friends have more friends than you, on average" (popular people show up in more people's friend lists).

you arrive here one long gap
A random arrival time is more likely to land inside the one long gap than any of the short ones, simply because the long gap occupies more of the timeline — this is length-biased sampling.

The formula: length-biased sampling

If gaps have mean μ\mu and variance σ2\sigma^2, the expected wait time at a random moment is:

E[wait]=μ2+σ22μ.E[\text{wait}] = \frac{\mu}{2} + \frac{\sigma^2}{2\mu}.

In plain English: the naive half-the-mean-gap term is still there, but it's inflated by a second term proportional to the variance of the gaps — the more irregular the schedule, the worse your expected wait, even though the average gap length hasn't changed at all.

Worked example: comparing a regular and an irregular schedule

Regular schedule: every gap is exactly 10 minutes, so μ=10,σ2=0\mu=10, \sigma^2=0. Expected wait: 102+0=5\frac{10}{2} + 0 = 5 minutes, matching naive intuition exactly.

Irregular schedule: gaps alternate between 2 minutes and 18 minutes (still averaging μ=10\mu=10). Variance of a two-point distribution at {2,18}\{2,18\} each with probability 12\frac12: σ2=12(210)2+12(1810)2=12(64)+12(64)=64\sigma^2 = \frac12(2-10)^2+\frac12(18-10)^2 = \frac12(64)+\frac12(64)=64. Expected wait: 102+6420=5+3.2=8.2\frac{10}{2}+\frac{64}{20} = 5+3.2 = 8.2 minutes — nearly double the naive answer, purely from the irregularity, with the mean gap unchanged.

The general technique: length-biased vs uniform sampling

Whenever you're sampling "the interval containing a random point in time" rather than "a random interval from a list," you're doing length-biased sampling — longer intervals are over-represented in what you actually observe, proportional to their length. The fix is always the same: don't average over the list of intervals; weight each interval by its own length before averaging, or equivalently use the variance-inflated formula above. This shows up constantly in operational and market contexts: the average time between trades you happen to observe is longer than the true average inter-trade time, because you're more likely to be "looking" during a long quiet gap.

Arriving at a random moment in time over-samples long gaps in proportion to their length, so the expected wait exceeds half the mean gap whenever gaps are variable: E[wait]=μ2+σ22μE[\text{wait}] = \frac{\mu}{2}+\frac{\sigma^2}{2\mu}. More irregular schedules produce worse expected waits even with an unchanged average gap.

The classic mistake is assuming "average wait = half of average gap" always holds. That's only true for a perfectly regular (zero-variance) schedule. The moment gaps become irregular, length-biased sampling inflates the expected wait — and real-world schedules (buses, trades, system events) are almost never perfectly regular.

Related concepts

Practice in interviews

Further reading

  • Feller, An Introduction to Probability Theory, vol. 2, ch. 1
ShareTwitterLinkedIn