12
Extinction probability and outbreak probability
Stochastic models are valuable because identical initial conditions can lead to early extinction or a large epidemic. Monte Carlo simulation estimates how often each clearly defined event occurs.
Define the event before estimating its probability
Start an SIR epidemic with one infectious person in a population of 200. We define a major outbreak as reaching at least 20 people ever infected. If the epidemic becomes extinct before that threshold is reached, we call it early extinction.
Major outbreak
Early extinction
Under this stopping experiment, these events are complementary, so \(\Pr(A)+\Pr(A^c)=1\).
Monte Carlo estimator
For run \(r\), define \(Y_r=1\) if a major outbreak occurs and \(Y_r=0\) otherwise. For \(M\) independent simulations:
This is an estimate, not the exact probability. Repeating the whole Monte Carlo experiment with a different seed produces a slightly different value.
Quantify simulation uncertainty
An estimated Monte Carlo standard error is
A simple approximate 95% Monte Carlo interval is \(\widehat p\pm1.96\operatorname{SE}(\widehat p)\). Increasing \(M\) reduces simulation error at the slow rate \(1/\sqrt M\).
Interactive Python laboratory
Run 3,000 independent threshold experiments. Each simulation stops as soon as it reaches the major-outbreak threshold or becomes extinct, because later events cannot change its classification.
Output
Run the code to see the result.
Why waiting times are omitted here
This specific question asks which boundary is reached first, not when it is reached. In a CTMC, the next event type depends on rate proportions, while the exponential waiting time only places that event on the clock. Omitting waiting times makes this classification experiment faster without changing the boundary reached.
Early-phase analytical reference
When the population is large and susceptible depletion is negligible, an SIR epidemic starting with \(I_0\) infectious people is approximately a birth–death branching process. If \(\beta>\gamma\), its eventual fade-out probability is approximately
This is not exactly the same as extinction before a finite threshold in a finite SIR population. Use it as early-phase intuition, not as a replacement for the stated Monte Carlo event.
Interpretation and sensitivity to definitions
- Increasing the threshold usually reduces the estimated probability of crossing it.
- Starting with more infectious people usually reduces early fade-out probability.
- A probability estimate applies only to the parameter values and initial state used.
- Monte Carlo uncertainty is different from uncertainty in biological parameters.
What this lesson adds
You can now define complementary epidemic events, estimate their probabilities from independent CTMC simulations, report counts as well as proportions, calculate Monte Carlo standard error, and distinguish a finite-threshold estimate from an early branching-process approximation. The next lesson measures continuous outcomes such as size, duration and peak.