Throughout history infectious diseases have had a huge impact on society. While my main modelling interest is that of biochemical reaction networks I will today introduce a simple model of the spread of an infectious disease. This model has the advantage that it is simple and easy to understand. It serves as a good example to give some additional familiarity with models. Also, while I will not go into detail on how in this post, this model actually have many similarities in its structure to the biochemical reaction models I usually work with.
The SIR model of an infectious disease
The model I will introduce is the Susceptible, Infected and Recovered (SIR) model. It is so named for the three variables of the model, the number of people in a populations who are susceptible to infection, are already infected, or have recovered from infection. All with respect to a certain infectious disease. Over time t the model describes how large each of these three sub-populations are.
Our model describe how some system changes with time. In this case how disease spreads through a population. It consists of a few different components:
- A time, t. Our model will describe how the system changes with t.
- A set of variables. Our model will describe how these changes with time. For every value of t these variables will have corresponding values.
- Some initial conditions, these state what the state of our model is at the beginning of time (t=0).
- A rule, which says how the state of the model develops with time.
Generally (2) is unknown for t>0. However, we usually do know what our state is for t=0 (3), and then we can use the rule (4) to predict how the system will evolve as t increases.
Lets formulate our model according to these rules. We assume that we have a small town, mostly isolated from the rest of the world. It contains 1000 citizens, all who are healthy. At some day (lets call it day 0) a visitor arrives to the town. The visitor is carrying an infectious disease and we want to model how the disease spreads throughout the town.
Time in this case is simple, the value of t corresponds to the number of days that have passed since the visitor arrived. The variables of the model were already mentioned briefly in the beginning. We want to keep track on the number of persons in the population who are either susceptible to the disease (i), infected by the disease (i), or who have recovered from the disease (r). Persons who have recovered are immune to the disease and no longer susceptible. The value of these states on day zero (t=0), when the visitor arrive is known. None of the towns people have ever encountered the disease before and hence are all susceptible (s0=1000). Only the visitor is carrying the disease (i0=1). Finally no one have had and recovered from the disease yet so r0=0.
Next we need to write down a rule for how the state of the system changes with time. What kind of events can happen that would change the state of the system? There are two different ones:
- A previously susceptible individual becomes infected due to contact with an infected individual.
- A previously infected individual recovers from disease.
The first event will move people from the susceptible category (s) to the infected category (i). The second one will move people from the infected category (i) to the recovered category (r). Next we wonder at which rate these events happen, and on what these rates depends on. The number of infection events will depend on the number of susceptible and infected people in the population (the number of interactions between an infected and a susceptible individual will increase as these two sub-populations grow larger). It also depends on some constant factor representing how likely an infection is during an encounter (as well as other factors, such as how sociable to population of this particular town is). We will set this rate to a·s·i (so if we were to double the number of susceptible persons in the population we also double the number of persons getting infected every day). Next we look at the rate of recovery. Here we simply say that every infected person have a small chance to recover every day, denoted by the constant b. The rate of recovery is then b·i (so if we were to double the amount of infected people we also double the number of people that recover in one day). What is important with these two expressions (a·s·i and b·i) is that they only depends on the state of the system, (s,i,r), and some constants.
Now we will phrase this in mathematics. We will write down a set of ordinary differential equations, each describing how the rate of change in one specific variable depends on the current state of the system. We have:
Here we can see how the number of susceptible people in the population will decrease as they get infected, according to the term a·s·i. The number of infected people will increase at the same rate, but also decrease at the rate b·i as they recover. Since we know the value of (s,i,r) at time t=0, (s0,i0,r0)=(1000,1,0), we can use the rule for how (s,i,r) changes depending on its current values to calculate the value of (s,i,r) at some time slightly after t=0. We can then use that value to calculate the state in the model for another time, slightly further into the future. Using this approach we can use some numerical method to calculate the state of the model for all future times.
By designating some values for or two constants (in this case a=0.0005 and b=0.05) and then using some numerical solver method we calculate the values s, i, and r, all as functions of the time, t. Next we can show this time development of the system in a graph, see below.
Here we can see how the number of susceptible individuals start of at 1000 and the quickly drops of as the disease spreads. It reaches a peak around 20 days into the simulation with almost 700 infected individuals. From that the epidemics dies down as people recover and after 150 days it is entirely over.