What is SIR model?

A model that splits a population into susceptible, infected, and recovered groups to show how an infection spreads and fades.

SIR model diagram example

Public diagram from the Machinations Community. Open it on its own page

The SIR model is a simple model of an infectious disease that divides people into three groups: Susceptible, Infected, and Recovered. People move from S to I when they catch the disease and from I to R when they recover. It matters because it shows why outbreaks rise and fall by themselves, and what level of immunity or contact reduction is needed to stop one.

How it works

Two rates drive the model. The transmission rate, beta, sets how fast infected people infect susceptible ones: new infections per period equal beta × S × I / N. The recovery rate, gamma, is the share of infected people who recover per period, so recoveries equal gamma × I. The ratio beta / gamma is the basic reproduction number, R0. If R0 is above 1, the infection grows at first. It later falls because the susceptible stock is depleted.

The model is a continuous simulation of three stocks and two flows, a classic case of stock and flow. It assumes everyone mixes equally and recovers at the same rate. More detailed versions add exposed groups, ages, or vaccination, and agent-based models can add networks of contacts. The same structure is also used for rumors and product adoption.

Example

Say a town has 1,000 people and 10 are infected. Beta is 0.3 per day and gamma is 0.1 per day, so R0 is 3. On day one, new infections are 0.3 × 990 × 10 / 1,000, which is about 3, and 1 person recovers. The infection grows, peaks when about one third of the population has been infected or recovered, then declines. This is an illustration with round numbers.

How to model it in Machinations

Draw S, I, and R as three Pools. A Converter from S to I has a rate set by a Register using beta and the Pool sizes, and a Converter from I to R moves a share of I each step. Chart all three Pools and Play. Use a Lever to cut beta, as if people reduced contacts, and compare the peaks.

See SIR model in a system you can Play

Build the rules in a Machinations diagram, change a value and Play it to watch how the system responds.