← Continuous-Time Markov Chains

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

\[A=\{N-S(t)\ge20\text{ for some }t\}.\]

Early extinction

\[A^c=\{I(t)=0\text{ before }N-S(t)\ge20\}.\]

Under this stopping experiment, these events are complementary, so \(\Pr(A)+\Pr(A^c)=1\).

The threshold is part of the question. “Outbreak probability” is incomplete unless the model, initial state, time window and outbreak criterion are stated.

Monte Carlo estimator

For run \(r\), define \(Y_r=1\) if a major outbreak occurs and \(Y_r=0\) otherwise. For \(M\) independent simulations:

\[\widehat p=\frac{1}{M}\sum_{r=1}^{M}Y_r=\frac{\text{number of major outbreaks}}{M}.\]

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

\[\operatorname{SE}(\widehat p)=\sqrt{\frac{\widehat p(1-\widehat p)}{M}}.\]

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.

Interactive PythonExtinction and outbreak probabilities

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.

Do not generalise this omission. Waiting times are essential for duration, peak time, probability by a specified date, intervention timing and time-dependent rates. Those questions require the full Gillespie clock.

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

\[q^{I_0}\approx\left(\frac{\gamma}{\beta}\right)^{I_0}.\]

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

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.