13
Outbreak size, duration, peak size and peak time
Probability classifies whether an event occurred. Outcome analysis keeps the numerical result from every complete trajectory, revealing how large, long and intense epidemics can be.
Define each trajectory-level outcome
Final outbreak size
Total number ever infected, including people infectious initially.
Duration
Time from the initial state until the final recovery.
Peak size
Largest number simultaneously infectious.
Peak time
First time the maximum infectious count is reached.
Why definitions need small details
- State whether initial infectious people are included in final size; this lesson includes them.
- A maximum may be reached more than once; this lesson records its first occurrence.
- Duration requires the full continuous-time clock and cannot be obtained from event types alone.
- All simulations must finish at extinction before their final sizes are compared.
Mixtures can hide biological structure
With few initial infections, outcomes often split into early fade-outs and major epidemics. A single overall mean may fall between these groups and describe neither group well.
Interactive Python laboratory
Run 1,000 complete SIR epidemics. Each simulation returns exactly one row containing its four outcomes. The program then compares all runs with major-outbreak runs and explores dependence between size and peak.
Output
Run the code to see the result.
Understand the outcome programming
| Code | Purpose |
|---|---|
if I > peak_I | Updates the peak only for a strictly larger value, preserving the first peak time. |
return {...} | Returns one labelled outcome record from one trajectory. |
pd.DataFrame(rows) | Creates a table with one row per simulated epidemic. |
.quantile([0.05, 0.50, 0.95]) | Reports the middle and tails without assuming a normal distribution. |
.corr(...) | Measures linear association; it does not prove causation. |
Interpret outcomes together
Final size measures total burden, while peak size measures maximum simultaneous prevalence and is more directly related to pressure on limited services. Duration measures how long transmission persists. Peak time affects how much preparation time may be available.
These summaries are related but not interchangeable. Two trajectories can have similar final sizes but different peaks or durations.
Avoid misleading summaries
- Do not report only the mean when the distribution separates into fade-outs and large epidemics.
- Do not condition on major outbreaks without saying so.
- Do not treat a 5th–95th percentile range as a confidence interval for the mean.
- Do not calculate duration from a simulation stopped at an arbitrary horizon.
What this lesson adds
You can now extract well-defined outcomes from each completed trajectory, construct an outcome table, report empirical quantiles, distinguish unconditional and conditional summaries, and examine dependence between epidemic burden and peak pressure. The final CTMC lesson concentrates on choosing and interpreting plots and tables correctly.