Inspection Paradox
Compare ordinary mean with stationary time-average inspected gap and residual wait.
By Riano · Published · Updated · Report a correction
Inspection Paradox
Concept Overview
The Inspection Paradox (also known as length-biased sampling) arises in renewal processes when sampling is proportional to duration rather than discrete event counts. If gaps between events have variable lengths, an observer arriving at a uniformly random time is more likely to fall into a longer gap. Consequently, the mean length of the gap containing the arrival time is strictly greater than the ordinary average length of all gaps.
Worked Example
Consider a process with two types of gaps: a short gap of length 1 (probability 1-p) and a long gap of length b (probability p). When measuring over the complete sequence of consecutive gaps, these structural parameters dictate the difference between event-based statistics and time-sampled ones.
- With b = 5 minutes and p = 0.5, E[L] = (0.5)(1) + (0.5)(5) = 3 minutes.
- E[L2] = (0.5)(12) + (0.5)(52) = 13 square minutes.
- The inspected gap has mean 13/3 = 4.333333 minutes; the residual wait is 13/(2·3) = 13/6 = 2.166667 minutes.
- The long-label time probability is (0.5·5)/3 = 5/6 = 0.833333, a dimensionless probability.
Even though half of all gaps are length 5, a random time uniformly selected in the long run will fall in a length 5 gap 83.33% of the time, dramatically inflating the average wait. You can imagine looking at a timeline from far away; the long periods naturally take up more space.
Experiment
This analytic module computes these stationary probabilities without running a finite-horizon random simulation. Try the following sequence to observe the paradox dynamically by interacting with the parameters on the main screen:
- Set Long gap b to 9 and Long-gap fraction p to 0.1.
- Observe that the Ordinary Mean E[L] is small (1.8), since 90% of gaps are length 1.
- Notice that the Time Observed Mean E[L2]/E[L] is 5. Because the length 9 gaps are so massive, they take up 50% of the overall timeline (Time Observed Long Prob is 1/2), inflating the time-sampled mean far above the ordinary mean.
- Change Long gap b down to 1. Notice the ordinary and time-observed metrics become perfectly equal (1 and 1). At b=1, the variance is zero and no length bias exists.
You can return to the module using this link: Inspection Paradox. It remains an excellent way to see the distinction between time-average and event-average metrics dynamically computed in the browser.
Limitations
Like many theoretical models, this tool relies on a few key assumptions that must be taken into account when generalizing to real-world scenarios or continuous mathematics.
- Analytic Two-Gap Model: This module explicitly calculates expectations for a simple two-value discrete distribution. In reality, inspection paradoxes apply to continuous distributions (like Exponential or Gamma) where the gap length is a continuous random variable that can take on any positive real value, altering the algebraic derivations slightly.
- Infinite Horizon: The formulas E[L2]/E[L] rely on the limit theorem for renewal processes as time goes to infinity. A finite simulation with a hard time cutoff introduces boundary effects not captured by this stationary mathematical model. The inspection must be independent stationary/time sampling; an event-based observation or a specially chosen inspection time need not follow these probabilities.
- Fixed Mathematical State: The visualization draws proportional bars strictly matching the expected proportions, not a truly random stochastic trajectory. It is meant for structural intuition rather than statistical hypothesis testing. Values are rounded to 6 decimal places for display purposes while keeping unrounded arithmetic internally.
References
The concept forms a cornerstone of queueing and renewal theory, often taught alongside advanced probability topics like Markov processes. It is essential for accurately interpreting data gathered by polling individuals about their ongoing experiences rather than measuring the completed events.
- Gallager, R. G. (2011). Discrete Stochastic Processes. MIT OpenCourseWare. Chapter 4: Renewal Processes.View PDF
Experience it interactively
Adjust parameters, observe in real time, and build deep intuition with Riano’s interactive Inspection Paradox module.
Try Inspection Paradox on Riano →