The SIR Model

The SIR model is a simple compartmental model for the spread of a disease through a population. It splits the population into three groups, or compartments:

  • susceptible compartment, containing those who haven't yet caught the disease;
  • infectious compartment, containing those who currently have the disease;
  • recovered compartment, containing those who have had the disease but don't anymore.

The model considers the movement of the population between these compartments: susceptible individuals move to the infectious compartment and then on to the recovered compartment.

Graphical illustration of the SIR model. Source: Wikimedia

The variation of the populations of these compartments over time is dictated by two values: the rate of transmission and the rate of recovery. These define how quickly individuals move from the susceptible comparment to the infectious comparment and from the infectious comparment to the recovered comparment, respectively.

The graph below gives an illustration of how these three populations evolve in response to these parameters. The y-axis should be interpreted as the fraction of the total population. Use the sliders to adjust the transmission and recovery rates and observe how the peak in the infectious population flattens out as the transmission rate is decreased. If the transmission rate is low enough, then the spread of the disease can be slowed to a point where the majority of the population won't be affected. (If the plot isn't showing, make sure you're using a browser that supports WebAssembly, like Chrome or Firefox.)

For more on the SIR model I highly-recommend the introductory videos by Numberphile and 3Blue1Brown.