The pains of epidemiology

In my blog post “Disease Dynamics Distilled” I explain — without equations — the Susceptible-Infectious-Removed (SIR) compartmental model. This is the simplest model there is that still captures the basic dynamics of the spread of disease in a population without immunity. The model, and I hope the article, explain among other things exponential growth, peak infection and herd immunity.

But where that blog post was all about how a very simple model can provide enormous insight, this one is about how what enormous models are needed to provide even very simple insights.

Using the implicit assumptions and shortcomings of the SIR model as a starting point, I will describe some developments of SIR that form the basis of the models people are using to try to predict the spread of COVID-19 in the world today, with links to examples and foundational articles.

These posts were inspired by Professor Julia Gog’s excellent advice in Nature on how we armchair epidemiologists can help with COVID-19 modelling, which I wrote about in my defence of armchair epidemiology . With so many of the public at large at the mercy of the mandates of these models, public understanding has never been more essential. My hope is, as Professor Gog puts it, to “amplify the signal of serious science” and to help people judge the quality of the plethora of models released in to the wilds of modern media.

This article is then both a layman’s introduction to the models that are so influencing our lives and a checklist of things to look for in assessing the amateur and ad-hoc models currently abounding in the media.

A (very) brief recap of SIR

“Here’s our Graeme with a quick reminder”

(Older, British readers may recognize the reference)

If you’re not already familiar with SIR then read my blog post “Disease Dynamics Distilled”. Briefly, this is the model:

Nearly everyone starts out susceptible, i.e. not yet infected and not immune. People become infected and thus infectious (but see shortcoming #1) at a rate proportional to the number of people already infected and the number of people left to infect, then they’re removed, i.e. they recover or die. The only parameters are how quickly infected people infect susceptible people and how quickly they recover.

Shortcoming #1: “Infected” covers a multitude of misery”

As well as the actual period people are infectious, the infectious compartment covers incubation, where you’re infected but not yet infectious, and it doesn’t differentiate between symptomatic or asymptomatic cases. Removed includes both recovery, leading (hopefully) to immunity, but also death. We clearly need more boxes.

The addition of an Exposed compartment for the infected, not yet infectious phase brings us to the SEIR model, which is the basis for many quick and dirty calculators, like Gabriel Goh’s influential “ Epidemic Calculator”, a favourite of many Medium luminaries like Tomas Pueyo.

My starting point for the following is exactly this version of S(E)IR that models the transition of people between compartments with a deterministic set of differential equations.

Shortcoming #2: SIR is a deterministic model of a stochastic process

This is strictly speaking a shortcoming of the deterministic differential form of SIR, like the one used in the Epidemic Calculator above.

A stochastic process is a time evolution that is inevitably random. How many times an infected person comes into contact with someone uninfected is variable and unpredictable and whether they pass on the infection when they do is also uncertain.

For a small population — for example a school or a workplace — this is enormously important. The figure below shows the evolution of a COVID-like illness in a population of 100, comparing simple SIR to a fully stochastic version of the model with a random number of contacts between individuals, random transmission and random time infectious time.

The light grey lines are different realizations of the same process with the same parameters (for cognoscenti, R0=1.4 here, mean generation time is 7 days). There is quite a remarkable range of final outcomes with flock immunity kicking in everywhere between around 20 and 100%, The dark blue line is the mean of 1000 realizations like these. The red line is simple SIR, which does quite well at getting the mean, though neither the mean nor SIR do terribly well at getting any of the realizations.

Simple SIR is consciously designed to be a deterministic model of a stochastic process. As the population increases random fluctuations begin to average out in the wash. How big a population depends on the dynamics. Here is a plot at a population of 1000, which is still a bit of a mess though. Even at this population where the underlying stochastic process is beginning to come under control, other assumptions start looking decidedly suspect.

Shortcoming #3: Generation time is not exponentially distributed

This is a little technical, but it’s a key vulnerability of many of the homemade and ad-hoc models in use.

Simple SIR assumes that the rate at which people move from one compartment to the next after they’ve been infected (i.e. exposed to infectious and infectious to recovered) is proportional to the number of people in that compartment and that the constant of proportionality is one over the mean time spent in that compartment.

This only works if the probability of a person leaving a compartment is independent from how long they’ve been lingering there. The only distribution that has this “memoryless” property is the exponential distribution, which is what we used in the comparisons above.

Unfortunately, this is not borne out by observation and different distributions give quite different results. The figure here, for example, compares exponential distributions with the more realistic gamma distributions.

S(E)IR models can take account of this with a differential-integral formulation. This article by Champredon and Dushoff in Proc Roy Soc B (open access) gives an admirably clear exposition of the theory, comparing the extended SEIR model to a stochastic model, similar to the ones I’ve used here.

Shortcoming #4: Population homogeneity — age response

SIR requires well mixed, homogeneous populations. We’ll get back to clustering and networks in a second, but we’ll quickly address another complication that is rather easier to address. In a real population, infection rates and times are not the same throughout the population — in particular they vary with age.

Age stratification — dividing the population into age tranches — is not a fundamental development on the basic dynamics of SIR; it’s mostly a question of book-keeping. The definition of some of the basic parameters — in particular the reproduction number — is a little more nuanced.

This Nature Medicine article by Wu et al , scientists at the WHO centre in Hong Kong, uses a stratified SIR model, with Gamma-distributed Generation Time to infer the basic parameters (by age) from the initial Wuhan data. Of course those data have been called in to question since the article was published, but the methodology is sound.

Shortcoming #5: Population homogeneity — clustering and network

The narrative that leads to SIR implicitly assumes that everyone who is infectious has equal chance of bumping into everyone who isn’t — the population is perfectly mixed, always. In reality, we know that infection dynamics are much more complicated than that and this is one of the fundamental differences between simple models and the models used by groups like that at Imperial College, who have been so influential in UK government policy.

As a small illustration, the red SIR curves here correspond to a population of 1000 with a probability of transmission of 2% and an average number of contacts per person per day of 10. The other curves are generated using a stochastic model (with exponential generation time, so the simple SIR can be compared) where I can specify the interactions each of the 1000 people in my population have with each other.

I am modelling something like a school with 20 kids in each class, 5 classes per year and 10 years in the school. The kids in classes interact 10 times more with each other than with the other kids in the year, and the kids in each year interact 10 times more with each other than the rest of the kids in the school. Nonetheless, the average number of interactions is the same 10 as used to generate the SIR curves.

In the first figure, both SIR and the contact model are started with 50 infectious kids — in the contact model they are distributed randomly throughout the school. In the second figure, the models are started with 5 infected kids and in the contact model, they’re all in one class.

Here we have classic “Flaw of Averages”. The prediction based on the average of the contact rates does not correspond to the average of the predictions based on the contact rates.

The paper in Epidemics by Klepac, Kissler and Gog brings both age stratification and geographical clustering together in an admirably clear and thorough exposition.


While simpler models have their place in understanding the evolution of epidemics — and indeed make reasonable predictions when contagion is raging and nothing is being done to stop it — the level of detail of models such as Klepac et al. (link above) and its broadly similar counterparts at Imperial and the London School of Hygiene and Tropical Medicine is essential if we are to assess the value of interventions.

But even these models struggle and are fraught with uncertainty. Our challenge is that we can model small numbers of interactions directly and we can use bulk models and simplifying assumptions to model large, well mixed populations, but these phenomena — especially when we are trying to control them — lie somewhere in between.

As such the focus of an interested observer moves from the models themselves to how we might reasonably debate and make informed decisions on the basis of these models — with all their reservations and contingencies.

Originally published at on May 1, 2020.

Mathematical modelling for business and the business of mathematical modelling. See for a categorized list of all my articles on medium.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store