For the stochastic SIR model, the state is a continuous-time Markov chain on nonnegative integer triples summing to , initially . Its only transitions are
Rates vanish when a proposed transition would leave the state space. Equivalently, with independent unit-rate Poisson processes , the Poisson time-change representation of a Markov chain is
The left limits describe the state immediately before each jump. In the Gillespie algorithm, wait an exponential distribution time with rate , then choose infection or recovery in proportion to these two rates.