Solution (source code)

= Solution

The <expected values> of early and late new diagnosis counts at step $k$ are
$$
e_k=\delta_Eh_{k-1}(\theta),\qquad
n_k=\delta_N(1-\delta_E)\sum_{i=1}^{k-2}
 h_i(\theta)(1-\delta_N)^{k-i-2}.
$$
Each summand in $n_k$ corresponds to an infection that avoids early diagnosis, enters the non-early state one step later, remains there for the intervening steps and is then diagnosed. Define $h_j=0$ for $j\leq0$, and take an empty sum as zero. \b[The early share of diagnosis intensity is]
$$
\boxed{p_{Ek}=\frac{e_k}{e_k+n_k}
=\frac{\delta_Eh_{k-1}(\theta)}{\delta_Eh_{k-1}(\theta)
+\delta_N(1-\delta_E)\sum_{i=1}^{k-2}h_i(\theta)(1-\delta_N)^{k-i-2}}.}
$$
It is defined only when $e_k+n_k>0$; in particular there are no diagnoses at step 1 under the initial condition. With infection counts following a <Poisson distribution> and independent marking, early and late diagnosis counts in a fixed interval are <independent> <Poisson random variables>. Conditional on a positive total, the early count has a <binomial distribution> given the total with probability $p_{Ek}$, so this ratio also equals the <expectation> of the observed early fraction conditional on a nonzero total. Without that conditioning a sample fraction at zero diagnoses is undefined.