Delay distributions

An epidemiological delay — incubation period, reporting delay, generation interval — is a whole distribution, not a single number. And because we observe events by the day, a continuous delay distribution has to be turned into a discrete daily probability mass function. Doing that honestly means accounting for double interval censoring. This page shows both steps, live.

The big picture

From "about a week" to a probability for every possible delay

In the delay-distributions session we simulate the path from infection to hospital admission as a chain of delays: an incubation period from infection to symptom onset, then a further delay from onset to admission. None of these is a fixed length — they vary between people and are uncertain across the population — so each is described by a probability distribution.

The session models the onset-to-hospitalisation delay as lognormal with meanlog = 1.75, sdlog = 0.5 (a mean of about a week). Throughout this page we work with that same lognormal shape, but parameterised by its more interpretable mean m and standard deviation s in days:

σ² = ln(1 + s²/m²)    μ = ln(m) − σ²/2
F(x) = Φ( (ln x − μ) / σ )  for x > 0,  F(x) = 0 otherwise

Here Φ is the standard Normal CDF, and F is the lognormal CDF. Two things then have to happen before this can meet real surveillance data:

The goal: turn a continuous delay distribution into the daily PMF you can actually convolve with case counts — and do it without quietly shifting the delay. The figures below build that PMF a day at a time, and show what the naive shortcut gets wrong.
StepWhat it producesWhy it matters
Continuous densityf(x) over all x > 0The underlying biology/behaviour of the delay
Naive discretisationF(d+1) − F(d)Quick, but assumes the primary event is at the day boundary
Double-censored PMFP(d) averaged over the primary event's offsetWhat the data actually generate — the honest daily PMF

Continuous density → discrete daily PMF step 1

Overlay the smooth lognormal density with the bars you actually use

The smooth blue density is the lognormal delay. The orange bars are the discretised daily PMF: one number per integer delay d = 0, 1, 2, …, giving the probability that the rounded delay equals exactly d days. Drag the mean and sd and watch the smooth curve and the bars move together. Notice the bar at d = 0: a non-trivial share of "same-day" delays appears whenever the distribution has mass below one day.

The bars here use the double-censored construction (the honest one, derived in the next section). Toggle the naive shortcut on to see how much it differs:

continuous density f(x) double-censored PMF P(d) naive PMF F(d+1)−F(d) mean
continuous mean = discretised mean = Σ P(d) =
The discretised PMF should sum to 1 (we carry enough days to capture the tail). Its mean is not exactly the continuous mean m: rounding to days, plus the censoring offset, nudges it. That small shift is exactly what the double-censoring correction keeps under control — the naive shortcut shifts more.

Double censoring, one individual at a time the generative view

Watch continuous delays get floored into day bins, one person at a time

The PMF above is the average over a whole population. Here is the same thing from the ground up — the generative process for a single individual. Each person carries a true, continuous delay, but we only ever see whole days. Sampling many individuals and tallying their observed delays rebuilds the double-censored PMF, bar by bar.

For one individual:

u ~ Uniform(0, w)    primary event lands somewhere in its window
T ~ Lognormal(mean = m, sd = s)    continuous delay
observed delay d = ⌊u + T⌋ − ⌊u⌋    both events floored to a day

The left panel shows individuals as timeline rows. For each one there are two boxes: the amber box is the primary interval we actually observe (a day, or a week), and the coloured box is the secondary interval (a day). The two dots are the true, unobserved continuous event times — primary at u and secondary at u+T — joined by the continuous delay T. We never see the dots, only which boxes they land in, so the observed delay d is the gap between the boxes — and both events being boxed is what makes it double censoring. The right panel tallies d over all sampled individuals as a density histogram; add individuals and watch the bars settle onto the double-censored PMF — not the smooth continuous curve.

primary interval (the window we observe) secondary interval (the day we observe) ● true event times, joined by the continuous delay realised observed-delay density continuous density f double-censored PMF target
sampled n = 0
realised mean delay = continuous mean = naive single-censored mean =
Double interval censoring = the primary event is uncertain within its interval (it could be anywhere in the day, or week), and the secondary event is floored to a day. So the realised observed-delay distribution — the bars on the right — is the double-censored PMF, not the underlying continuous density. The gap between the bars and the smooth curve is the censoring. Widen the window w to "weekly" and the primary uncertainty grows, smearing the realised PMF further from the continuous shape.

Why double interval censoring? step 1, done right

Both ends of the delay are only known to the day

Suppose the true (continuous) delay is x days. We never see x. We see the day the primary event fell in and the day the secondary event fell in, and report their difference in whole days. Two roundings, not one — hence double censoring.

Picture the primary event landing at a uniformly random time within its day: an offset u ~ Uniform(0, 1) past the start of the day. The continuous delay then runs from that offset, and we record d whole days have elapsed when the secondary event's day boundary is crossed. Averaging the single-censored probability over where the primary event sat gives the double-censored daily PMF:

P(delay = d) = ∫01 [ F(d + 1 − u) − F(d − u) ] du    d = 0, 1, 2, …

We evaluate that integral numerically (a 24-point average over u), clamping F to 0 for any negative argument. The naive single-censored PMF skips the averaging and just fixes the primary event at the day boundary, u = 0:

Pnaive(d) = F(d + 1) − F(d)

The figure overlays the two. Watch the gap below: the naive bars (teal) are systematically shifted relative to the double-censored bars (orange) — most visibly at the short delays where the rounding matters most. Tighten the sd and the discrepancy grows in relative terms; widen the delay and it washes out.

double-censored P(d) naive P(d) = F(d+1)−F(d) means
mean (double) = mean (naive) = naive − double = days
The naive PMF assumes the primary event always sits exactly at the start of its day. Real events sit somewhere in the day, so the naive version over-counts short delays and runs slightly low. The double-censored PMF averages over that hidden offset and gives the daily probabilities the data really imply — the version scoringutils-style discretisation and modern nowcasting/forecasting pipelines use.

Why a distribution, not a point estimate? the spread matters

The mean alone throws away the variation that drives everything downstream

It is tempting to collapse a delay to its mean — "onset to admission is about a week" — and move on. But the spread is doing real work. The panel below fixes the mean at m and lets you change only the sd. The blue density stretches and squashes while its mean marker stays put; the shaded band is the central 90% of the delay (the 5th to 95th percentile), obtained from the lognormal quantile function:

q(p) = exp( μ + σ · Φ−1(p) )    band = [ q(0.05), q(0.95) ]

Two delays can share a mean yet imply very different things: a tight delay means yesterday's onsets almost all show up as admissions within a day or two; a wide delay smears them over a fortnight. When you convolve this PMF with case counts (to go from infections to onsets to admissions), or run it inside a nowcast to fill in not-yet-reported events, it is the whole shape — not the mean — that determines the answer and its uncertainty.

delay density (fixed mean) central 90% band mean (fixed)
mean = days median = days central 90% =
Same mean, different story. A lognormal is right-skewed, so its mean sits above its median — most delays are a bit shorter than the average, with a long tail of slow ones. Reporting only the mean hides both the skew and the spread, and any downstream estimate that uses it inherits a delay that is too certain.

Things to remember