Gillespie SSA Epidemic

Exact stochastic SIR · Next-reaction method · Ensemble trajectories
200
0.40
0.15
8
Susceptible
Infected
Recovered
Gillespie: τ ~ Exp(a₀), reaction k chosen ∝ aₖ
Rates: a₁=βSI/N, a₂=γI
R₀ = β/γ — threshold: R₀>1 → epidemic