Behind The Curve
How Interventions “Flatten the Curve”
If you have any problems downloading on Mac, try to find the file and right-click > “Open” twice.
Check out my code here.
What is an SIR Model?
The SIR model is a model that simulates how disease spreads. This is one of the most basic compartmental models in epidemiology.
SIR Stands for, susceptibles, infected and recovered. Susceptibles are all the people who can become infected, infected are all the people who can spread the disease, and recovered are all the people who are immune to this disease and cannot spread it.
Each person, except 1, will start off as susceptible. That 1 person will be infected. As time goes on, people will get infected, but some of the infected will also recover. This simulation will end when everyone is immune and recovered or when the disease has been eradicated.
In this model, the population is constant. That means there will not be any births or deaths. We also assume that everyone is not immune at the beginning, everyone has the same infection rate as everyone else, and recovered people can’t get sick again.
One final note: my model is deterministic. The output of my model is determined by the parameters. There are no randomness unlike the real world. Reality is also extremely messy. It is hard to pinpoint exactly how any interventions change the rate of disease spread. That is why simulations are useful. They can separate specific details from the messiness and test it.
Flattening the Curve
Most people have heard about this term, especially in our on-going pandemic. For those who haven’t heard about this phrase or do not know the meaning, allow me to explain. If you have seen my simulator and even played with it, you might have seen a graph, like this.
The yellow area is the “Curve” people are talking about. That represents the number of people infected at once. Health care services are limited. Machines such as ventilators, which help people breathe when they cannot, are not infinite. There are finite numbers of these machines. If too many people are infected at once, drastic measures will have to take place. We will have to start deciding who gets ventilators and who doesn’t. This is not a situation that we want. That is why we should intervene early, changing the graph from above, into this
Or even better, turn it into this
Equations
How is the SIR Model calculated? We are going to use a system of ordinary differential equations (S, I, R, each as a function of time which becomes this):
It’s alright if you don’t have to know what any of this means because I’ll break it into steps.
To clarify lets state what the variables mean.
S = Number of Susceptibles.
I = Number of Infected.
R = Number of recovered.
N = Population size
d = the change in something
t = time
There are 2 funny-looking symbols:
𝛽 (beta)
γ (gamma)
I’ll talk about this later.
We take the derivative of the variables(S, I, R) which tells us how they change over time. So for every time t, (S, I, R) will be updated.
Let’s look at the Susceptible equation deeper.
On the left side:
dS = change in susceptibles.
dt = change in time.
Every change in time, there will be a change in susceptibles.
How about the right side though?
We go back to this symbol 𝛽 which is Beta.
Beta = Infection Rate.
For every infected person, they will infect Beta number of susceptibles. Because the number of susceptibles decrease, we are getting the fraction of susceptibles.
Why is this negative though?
We are subtracting from the total number of susceptibles because they are becoming infected, not the other way around.
Infected Equation
Again this equation means the change in infected with respect to time.
We see a familiar expression in this equation which is:
We know this is the number of people who will be infected for every time t.
But we also see a different expression as well:
This leads to our next unknown variable which is gamma. In this equation, gamma means the Recovery Rate. For every time t, I infected people will recover.
Recovered Equation
This leads us to our last equation:
How the number of recovered people changes with respect to time t.
This isn’t too hard to understand because we have already seen this expression in the last equation.
For every infected that recovers, we add it to our recovered number.
That’s it!
This is the math on SIR Models.
Infection Rate and Removal Rate
If you have not seen the SIR equations (Scroll up), I would recommend checking that out first as this is an extension of the SIR equations.
Infection Rate
The infection rate can actually be separated.
B (beta) is the Infection Rate.
T is the transmission probability (i.e., the probability of infection given, contact between a susceptible and infected individual).
C is the average rate of contact between susceptible and infected individuals.
The infection rate is also known as the “Effective Contact Rate” because for every contact, there is a probability of infecting someone.
Recovery Rate
If we call, d, the average duration of the disease. Because we assume all the rates or constant, then the v is just the inverse of d. Not to be confused, I used 𝛾 (gamma) as the recovery rate in my previous equations, but they mean the same thing.
R0 (R-naught)
R0 is also known as the Basic Reproduction Number. To sum it up in one sentence, it is the number of new infections per unit of time.
R0 has an equation:
For those who don’t know:
T is the transmissibility (i.e., probability of infection given contact between a susceptible and infected individual).
C is the average rate of contact between susceptible and infected individuals.
d is the duration of infectiousness.
Because of the equations above, this is another way to write R0.
Every unit of time, there will be T * C more infected people, but d number of people will recover.
Different cases of R0
If R0 is less than 1, each existing infection causes less than one new infection. In this case, the disease will decline and eventually be eradicated
If R0 equals 1, each existing infection causes one new infection. The disease will stay alive and stable, until there are no more people to infect, but there won’t be an outbreak or an epidemic.
Finally, If R0 is more than 1, each existing infection causes more than one new infection. The disease will be transmitted between people, and there may be an outbreak or epidemic or even a pandemic.
Interesting fact:
COVID-19’s R0 is estimated to be around 5.7. Every person will infect an average of 5.7 people. The R0 will be different in different countries, because some countries will have better interventions than other countries.
Why is R0 important
Knowing R0 can be important because it allows us to know how contagious the disease is.
The R0 equation is helpful as well. It shows us what we should do. R0 is the transmissibility * contact rate * duration of the disease.
To eradicate diseases, the R0 should be less than 1.
We cannot change the duration of the disease, but we can change our average contact rate and the probability of transmission. That is why interventions such as Social Distancing are crucial to stopping the spread of diseases.
Social Distancing
Social distancing is important. It is one of the major things that everyone needs to do. As previously mentioned, social distancing is a really effective way to reduce the average contact rate. Many people don’t really understand that social distancing is important.
Studies have shown that if we social distance right now, but stop, the disease will start spreading rapidly again. Check this link for more: http://covid-measures.stanford.edu/
The source where I got my information is: https://www.medrxiv.org/content/10.1101/2020.04.16.20068403v1
Wang, Xutong, et al. “Impact of Social Distancing Measures on COVID-19 Healthcare Demand in Central Texas.” MedRxiv, Cold Spring Harbor Laboratory Press, 22 Apr. 2020, www.medrxiv.org/content/10.1101/2020.04.16.20068403v1.
Washing Hands
Washing your hands is important. It will decrease the infection rate. Washing your hands with soap is crucial. Soap has chemical compounds that will help break apart viruses. As you all have heard, the key time is 20 seconds.
Take a look at this video that explains COVID-19 in depth: https://www.youtube.com/watch?v=BtN-goy9VOY
Wearing Masks
COVID-19 is known to spread by respiratory droplets. Wearing masks prevents any droplets from getting in through your nose and mouth. This decreases the chance of spread by quite a lot.
Here is the source which I got my numbers:
https://www.bmj.com/content/336/7635/77.short
Wearing Gloves
Wearing gloves is safe. Pretty much anything that covers your skin will be safer. To be completely honest, if you are washing your hands and not touching your face, there isn’t really a point to wear gloves. Sometimes people touch their faces, but with gloves, it won’t infect you as easily. I can’t say gloves are unnecessary but I also believe there aren’t too useful
Presets
It is fun to play around with the functions, but presets allow players to be able “see” how different diseases such as COVID-19, SARS, or H1N1 spread. Turning on different interventions, you can see how that impacts the spread of diseases.
Covid-19 → R0: was 5.7.
14 days duration.
10% infection risk
Sars → R0: 3.
28 days duration.
3% infection risk
H1N1 → R0: 1.5
1.5. 7 days duration.
5% Infection risk
Sources
COVID-19
https://www.who.int/docs/default-source/coronaviruse/who-china-joint-mission-on-covid-19-final-report.pdf#:~:text=Using%20available%20preliminary%20data%2C,severe%20or%20critical%20disease.
https://wwwnc.cdc.gov/eid/article/26/7/20-0282_article
SARS
https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3323341/
H1N1
https://www.ncbi.nlm.nih.gov/books/NBK513241/#:~:text=The%20known%20incubation%20period%20for,after%20the%20person%20develops%20symptoms.
https://science.sciencemag.org/content/324/5934/1557.long