SIR MODEL

Modelling Infectious Diseases

Using mathematics to model the spread of diseases is an incredibly important part of preparing for potential new outbreaks.  As well as providing information to health workers about the levels of vaccination needed to protect a population, it also helps govern first response actions when new diseases potentially emerge on a large scale (for example, Bird flu, SARS and Ebola have all merited much study over the past few years).

The basic model is based on the SIR model – this is represented by the picture above (from Plus Maths which has an excellent and more detailed introduction to this topic).  The SIR model looks at how much of the population is susceptible to infection, how many of these go on to become infectious, and how many of these go on to recover (and in what timeframe).

SIR MODEL2

Another important parameter is R0, this is defined as how many people an infectious person will pass on their infection to in a totally susceptible population.  Some of the R0values for different diseases are shown above.  This shows how an airbourne infection like measles is very infectious – and how malaria is exceptionally hard to eradicate because infected people act almost like a viral storage bank for mosquitoes.

One simple bit of maths can predict what proportion of the population needs to be vaccinated to prevent the spread of viruses.  The formula is:

VT = 1 – 1/R0

Where VT is the proportion of the population who require vaccinations. In the case of something like the HIV virus (with an R0 value of between 2 and 5), you would only need to vaccinate a maximum of 80% of the population.  Measles however requires around 95% vaccinations.  This method of protecting the population is called herd immunity

SIR MODEL 3
This graphic above shows how herd immunity works.  In the first scenario no members of the population are immunised, and that leads to nearly all the population becoming ill – but in the third scenario, enough members of the population are immunised to act as buffers against the spread of the infection to non-immunised people.

 \frac{dS}{dt} = - \beta I S
 \frac{dI}{dt} = \beta I S - \nu I
 \frac{dR}{dt} = \nu I

The equations above represent the simplest SIR (susceptible, infectious, recovered) model – though it is still somewhat complicated!

dS/dt represents the rate of change of those who are susceptible to the illness with respect to time.  dI/dt represents the rate of change of those who are infected with respect to time.  dR/dt represents the rate of change of those who have recovered with respect to time.

For example, if dI/dt is high then the number of people becoming infected is rapidly increasing.  When dI/dt is zero then there is no change in the numbers of people becoming infected (number of infections remain steady).  When dI/dt is negative then the numbers of people becoming infected is decreasing.

The constants β and ν are chosen depending on the type of disease being modelled.  β represents the contact rate – which is how likely someone will get the disease when in contact with someone who is ill.  ν is the recovery rate which is how quickly people recover (and become immune.

ν can be calculated by the formula:

D = 1/ν

where D is the duration of infection.

β can then be calculated if we know R0 by the formula:

R0 = β/ν

Modelling measles

So, for example, with measles we have an average infection of about a week, (so if we want to work in days, 7 = 1/ν and so ν = 1/7).   If we then take R0 = 15 then:

R0 = β/ν
15 = β/0.14
β = 2.14

Therefore our 3 equations for rates of change become:

dS/dt = -2.14 I S

dI/dt = 2.14 I S – 0.14 I

dR/dt = 0.14 I

Unfortunately these equations are very difficult to solve – but luckily we can use a computer program to plot what happens.   We need to assign starting values for S, I and R – the numbers of people susceptible, infectious, recovered (immune) from measles.  Let’s say we have a total population of 11 people – 10 who are susceptible, 1 who is infected and 0 who are immune.  This gives the following outcome:

SIR model 5

This shows that the infection spreads incredibly rapidly – by day 2, 8 people are infected.  By day 10 most people are immune but the illness is still in the population, and by day 30 the entire population is immune and the infection has died out.

SIR model 6

An illustration of just how rapidly measles can spread is provided by the graphic above.  This time we start with a population of 1000 people and only 1 infected individual – but even now, within 5 days over 75% of the population are infected.

SIR model 7

This last graph shows the power of herd immunity.  This time there are 100 susceptible people, but 900 people are recovered (immune), and there is again one infectious person.  This time the infection never takes off in the community – those who are already immune act as a buffer against infection.

If you enjoyed this post you might also like:

Differential Equations in Real Life – some other uses of differential equations in modelling predator-prey relationships between animal populations.

Screen Shot 2018-03-19 at 5.29.06 PM

IB Revision

Screen Shot 2018-03-19 at 4.35.19 PM

If you’re already thinking about your coursework then it’s probably also time to start planning some revision, either for the end of Year 12 school exams or Year 13 final exams. There’s a really great website that I would strongly recommend students use – you choose your subject (HL/SL/Studies if your exam is in 2020 or Applications/Analysis if your exam is in 2021), and then have the following resources:

Screen Shot 2018-03-19 at 4.42.05 PM.pngThe Questionbank takes you to a breakdown of each main subject area (e.g. Algebra, Calculus etc) and each area then has a number of graded questions. What I like about this is that you are given a difficulty rating, as well as a mark scheme and also a worked video tutorial.  Really useful!

Screen Shot 2019-07-27 at 10.02.40 AM

The Practice Exams section takes you to ready made exams on each topic – again with worked solutions.  This also has some harder exams for those students aiming for 6s and 7s and the Past IB Exams section takes you to full video worked solutions to every question on every past paper – and you can also get a prediction exam for the upcoming year.

I would really recommend everyone making use of this – there is a mixture of a lot of free content as well as premium content so have a look and see what you think.