Biases in delay distributions

When you estimate a delay in real time, the naive estimate is biased. The headline problem is right truncation: at the moment you look, long delays simply haven't had time to be observed, so the delays you can see are systematically too short — and the mean delay comes out under-estimated. This page builds that bias from the ground up, then previews the knock-on effect on epidemic curves and a note on interval censoring.

The setup: events, delays, and "now"

A primary event, a delay, then a secondary event — observed only once it has happened

Most epidemiological delays connect two events: a primary event (say a symptom onset) and a secondary event a little later (a hospital admission). The delay d between them is what we want to estimate. In this session we model it as a lognormal distribution with mean m and standard deviation s:

σ² = ln(1 + s²/m²)    μ = ln(m) − σ²/2
f(d) = 1d√σ² φ( ln d − μ√σ² )    F(d) = Φ( ln d − μ√σ² )

where φ and Φ are the standard Normal density and CDF. The crucial real-time twist: a secondary event at time t+d only enters your data once it has actually happened. If you look at the world at time "now" = T, every pair with t+d > T is invisible. The longer delays are the ones still in flight.

Two distinct biases live in this single picture, and the course treats both:
  • Right truncation — not enough time has passed, so long delays are missing. This shortens the observed delay distribution.
  • Interval censoring — events are recorded by date, not exact time, so each delay is only known to the day.

Right truncation the headline bias

Look too early, and the delays you can see are the short ones

Primary events arrive over calendar time with an intensity that follows the epidemic. Take exponential dynamics with growth rate r: the rate of primary events at time t is ∝ e rt (growing if r > 0, declining if r < 0). Each primary event at time t carries a delay d ~ lognormal(m, s) and produces its secondary event at t+d. We look at the world at "now" = T, and we observe a pair only if its secondary event has already happened: t+dT, equivalently dTt. Everything else is right-truncated — still in flight, invisible.

The picture on the left is the raw process: one dot per individual, plotted by its primary event time t and its delay d. The descending line d = Tt is the truncation boundary. Dots below it are observed; dots in the shaded wedge above it are not yet seen. The picture on the right collapses the observed dots onto the delay axis as a density and compares it with the true lognormal.

primary rate(t) ∝ e rt,   d ~ lognormal(m, s),   observed ⇔ t + d ≤ T
// fast growth ⇒ most primaries are recent (t near T) ⇒ only short d fits under the boundary

Crank r up and the dots pile toward the right edge (recent primaries); for those, only short delays clear the boundary, so the observed cloud is squashed downward and the observed mean delay falls below the true mean m. Push the observation time T earlier and the boundary line drops, cutting off more long delays. Slow the epidemic or wait longer, and older primaries with their full range of delays re-enter the observed set.

observed individual (d ≤ T−t) right-truncated (not yet seen) truncation boundary d = T−t true density f(d) true mean m observed mean

Left: each dot is one individual at (primary time t, delay d); the red line is the boundary d = T−t and the shaded wedge above it is not yet observed. Right: the observed delays (orange histogram) sit left of the true lognormal (blue), and the observed mean falls short of the true mean.

true mean = observed mean = under-estimate = observed = of N

The bias, side by side

The bars make the gap between the true and observed mean delay impossible to miss. With a growing epidemic and an early look it can be severe; with a declining epidemic and a late look it nearly vanishes — most primary events are old enough to have completed.

Right truncation biases real-time delay estimates short: at the moment you look, the long delays simply have not had time to be observed. The bias grows with the epidemic growth rate — a faster-growing outbreak packs most primary events into the recent past, where only short delays can already have completed. That is why fast-growing outbreaks are the hardest to estimate delays for in real time, and exactly when an unadjusted mean delay misleads you most.

The knock-on effect why nowcasts dip

Right truncation doesn't just bias the delay — it bends the recent epidemic curve

The same incompleteness distorts the secondary-event curve itself. Build the expected number of secondary events on day τ by spreading each day's primary events forward through the delay distribution:

C(τ) = Σt≤τ I(t) · g(τ − t)   // g = discretised delay pmf

That is the final curve — what you would see once everything has reported. But near "now", the most recent days are still filling in: a secondary event due on day τ is only counted if it has happened, and the cohorts that feed those recent days are dominated by short delays. The observed-so-far curve therefore dips below the truth in the last few days before T, then is blank afterwards. Mistake that dip for a real downturn and you call a peak that isn't there.

true final secondary curve observed by time T "now" = T

The shaded wedge near T is the secondary events that will occur on those days but haven't been observed yet. This is exactly the gap a nowcast sets out to fill.

last day observed = % of its eventual total

Interval censoring a second bias

Dates, not times — every event is only known to the day it fell on

Real line lists record dates, not exact times. An onset "on 20 June" could have been at 00:01 or 23:59; an admission "on 22 June" likewise. The recorded delay is the difference of two floored days, so a true delay of 2.0 days might be logged as anything from 1 to 3. Because both events are censored, the course calls this double interval censoring.

Below, a continuous lognormal delay (blue line) is rounded the naive way — flooring the delay — versus the proper double-censored process that floors both event times. Watch the discrete pmf shift relative to the truth, especially when the delay is short relative to the one-day grid.

true continuous density f(d) double-censored pmf (by day) true mean
true mean = censored mean =

The flooring drops every delay by up to one interval on average, so the censored mean tends to fall below the truth, and the effect is largest when the interval is big relative to the delay — exactly why the session switches to short delays to make censoring visible. A wider interval (try weekly reporting) magnifies it.

The fix for both biases is the same idea: model the observation process. Treat the exact event times as unknown parameters constrained to their recorded day (censoring), and normalise the likelihood by the probability of having been observed by "now" (truncation). The course does this with the censored-delay-model and truncated-delay-model Stan models; the primarycensored and epidist packages handle both together with analytical solutions.

Things to remember