You are on page 1of 17

Mathematical Modeling and Simulation of Epidemic

By Aditya Naravane

Grade 6

Foxborough Regional Charter School


MATHEMATICAL MODELING AND SIMULATION OF EPIDEMIC 2

Abstract

For this year’s science project I studied the SIR model and simulations meant to predict

the spread and trend of an epidemic. The SIR model is a mathematical model and the simulations

were created in Scratch™ using different conditions to represent different situations. For

research I used sources such as Worldometers[2], AJMC[4], Mass.gov[8], CDC.gov[9] and

others to gather information. I also attended webinars by scientists from MIT Lincoln lab[1] and

Museum of Science[3] to gather relevant information. My hypothesis is that if I change the

variables and conditions in my model such as population, percentage of population wearing

masks, percentage of people in lockdown, quarantine, etc then I would be able to accurately

estimate the numbers and/or the trend. In the simulation I made using Scratch™ [10], there are

100 dots representing people (so as to represent percentages of population). They are

programmed to move around in random directions. I put them in 5 different simulation

situations/conditions, which are: No corrective measures, Masks, Quarantine, Undocumented

Cases and Lockdown. Each of these had features such as probability of infection implemented.

In conclusion, from the simulations I learnt a couple things. I learnt that if you do not implement

any measures to slow the spread, then the epidemic gets out of control and the numbers increase

exponentially and that measures such as lockdown or quarantine are very effective measures but

they are not practical over a long period of time, whereas measures such as masks are easier to

implement over time.


MATHEMATICAL MODELING AND SIMULATION OF EPIDEMIC 3

Introduction 4
Objective 4
Research 5
Mathematical model 5
Equations 6
Graphical representation 7
Hypothesis 8
Method and Tools 8
Scratch Simulations 8
Epidemic Simulation Conditions 8
No measures implemented 8
Masks 9
Quarantine 9
Lockdown 10
Undocumented cases 10
Vaccinated cases 11
Simulation programs in Scratch 12
No measures implemented 12
Masks 13
Code for plotting graphs 13
Conclusion 14
Keywords/Glossary 15
Flatten the curve 15
Quarantine 15
Herd immunity 15
Exponential growth 15
Contact tracing 15
Super spreaders 15
References 16
MATHEMATICAL MODELING AND SIMULATION OF EPIDEMIC 4

1. Introduction

The year of 2020 was an unprecedented time, everyone and everything was affected by

the pandemic. If we closely follow the number of infected cases, recovered, and unfortunately

the number of fatalities for the State of Massachusetts, the United States and the world in general

on the worldometer [2], it is easy to understand that it’s not merely the number of cases that’s

threatening but the alarming nature of daily surge and overall trend. It is now well known that

COVID-19 is not a deadly virus, it may not kill a large population, but the rate of change in

number of infections was always alarming [2]. Only a very small percentage of the infected

population actually needs routine care like in hospitals and even smaller percentage actually

needs critical care for ex. in Intensive Care Units (ICUs). However, data shows that there are less

than 1 percent of hospital beds in proportion to the total population size [1][8], it is very

important to keep track of the rising number of infections and trends to avoid overwhelming the

healthcare system. Hence it is evident why all experts suggest flattening the curve. All the data

collected in COVID-19 pandemic is intriguing and that data can tell a compelling story. This

documented data can then be used to predict and project the next wave of cases. Epidemiologists

have the most important job during such pandemic to make accurate predictions based on

available data.

2. Objective

Objective of this paper is to study one such mathematical model namely the SIR model

used for modeling an epidemic.


MATHEMATICAL MODELING AND SIMULATION OF EPIDEMIC 5

3. Research

I followed the daily COVID-19 cases on worldometer [2] for the United States,

Massachusetts and Rhode Island. I also looked at the number of hospital beds available on

mass.gov [8] and compared to the total population size. I did my research by reading articles that

were published in the Huffington post. By listening to NPR’s daily show Boston Public Radio,

when Jim and Margorie interview epidemiologists, policy makers and many other people

affected by this. I also attended a stellar webinar by Dr. Larry Candell and Dr Alan Hsu of MIT

Lincoln Labs[1]. I learned a lot about exponential growth, herd immunity, and Ro at that

webinar. I attended another webinar by the Museum of Science, this was geared toward data and

research on vaccination[3].

3.1. Mathematical model

The SIR model divides the total population into 3 buckets: Susceptible, Infected and

Removed. Susceptibles are people who are susceptible to the disease, Infected are people who

are infected and the removed category is for people who have either recovered or died which

means they can't get disease and they can't spread it either. It is an assumption that at all times S

+ I + R = the total population and that is constant, that means no one is born and no one flies out

or in or this model would be incorrect. Next, the amount of people that move from the S bucket

to the I bucket is proportional to the interaction between of susceptible and infected population

(S * I), in short ​aSI ​where ​a is probably of transmitting the disease​. ​Then, The amount of people

that move from the I bucket to the R bucket is proportional to the number of infected ​bI , where ​b

is rate of recovery. We can calculate S, I and R over time t. S(t) is equal to -aSI because whoever

is moving from S to I is decreasing S’s value. I(t) is equal to aSI(same as before) - bI(the amount
MATHEMATICAL MODELING AND SIMULATION OF EPIDEMIC 6

that recovered or died). Lastly R(t) is equal to bI as before. Epidemiologists are usually

interested in I(t) at the start of an epidemic, if aS 0 I 0 − bI 0 is more than 0 then we are in

an active epidemic.

3.2. Equations

S (t) = − aSI
I (t) = aSI − bI
R(t) = bI

aS 0 I 0 − bI 0 > 0
aS 0 − b > 0
aS0
b >1

aS0
R0 = b

aS0
The number b is also called R 0 . R 0 is very important quantity for epidemiologist

because it shows how fast an active epidemic will spread. If R 0 was 3, then one person would

infect 3, they would infect 3 each and repeat, so now you will have exponential growth.
MATHEMATICAL MODELING AND SIMULATION OF EPIDEMIC 7

3.3. Graphical representation

Green is Susceptible when the epidemic starts, it is almost every one and at the end it is

almost no one, orange is infected, it curves up, exponentially and eventually curves down, blue is

removed, it takes a while for people to start recovering but at the end it is almost everyone.
MATHEMATICAL MODELING AND SIMULATION OF EPIDEMIC 8

4. Hypothesis

My hypothesis is that if I change the variables and conditions in my model such as

population wearing masks, lockdown, quarantine, etc then I would be able to accurately predict

the numbers and/or the trend.

5. Method and Tools

5.1. Scratch Simulations

To show how a illness spreads, I created a simulation of the spread using scratch and

showing different conditions

5.2. Epidemic Simulation Conditions

For the scratch simulations I used several different conditions. I created simulation for

free for all, masks, quarantine, lockdown, and undocumented cases. I added recovery time,

probability of infection for normal and masks and probability to infect for masks.

5.2.1. No measures implemented


MATHEMATICAL MODELING AND SIMULATION OF EPIDEMIC 9

5.2.3. Masks

5.2.4. Quarantine
MATHEMATICAL MODELING AND SIMULATION OF EPIDEMIC 10

5.2.5. Lockdown

5.2.6. Undocumented cases


MATHEMATICAL MODELING AND SIMULATION OF EPIDEMIC 11

5.2.7. Vaccinated cases

On 2/27, the percentage of vaccinated cases in MA is 17%, so I have set Vaccinated

people variable to 17%.

For predicting the spread when 50% of the population will be vaccinated, here I set the

vaccination variable to 50%.


MATHEMATICAL MODELING AND SIMULATION OF EPIDEMIC 12

5.3. SEIR Model

Block Diagram of SEIR Model


MATHEMATICAL MODELING AND SIMULATION OF EPIDEMIC 13

5.4. Simulation programs in Scratch

5.4.1. No measures implemented


MATHEMATICAL MODELING AND SIMULATION OF EPIDEMIC 14

5.4.3. Masks

5.4.4. Code for plotting graphs

Susceptible Recovered Infected


MATHEMATICAL MODELING AND SIMULATION OF EPIDEMIC 15

6. Conclusion

My hypothesis was right, by changing variables such as probability of infection and

conditions such as lockdown or quarantine I was able to predict numbers and I was able to learn

how to use the SIR model. Here’s what I learnt: I learnt that Quarantine and Lockdown are the

most effective but impractical solutions for the long term. Masks are slightly less effective but

can be maintained over a longer duration. Cases with mild symptoms end up undocumented and

are responsible for spread.


MATHEMATICAL MODELING AND SIMULATION OF EPIDEMIC 16

7. Keywords/Glossary

7.1. Flatten the curve

To avoid overloading our community's health care systems because of elevated

rates of people needing to be hospitalized, flattening the curve means slowing the

spread of this virus over time using social distancing, which looks like a lower,

smoother curve on the chart.

7.2. Quarantine

Isolating so to not spread the illness

7.3. Herd immunity

Herd immunity is when enough people become immune to a disease to make its

spread unlikely

7.4. Exponential growth

Growth whose rate becomes ever more rapid in proportion to the growing total

number or size.

7.5. Contact tracing

Contact tracing will be conducted for close contacts (any individual within 6 feet

of an infected person for at least 15 minutes) of laboratory-confirmed or probable

COVID-19 patients

7.6. Super spreaders

A person who transmits an infectious disease or agent to an unexpectedly or

unusually large number of other people.


MATHEMATICAL MODELING AND SIMULATION OF EPIDEMIC 17

8. References

1. Science on Saturday​ Webinar titled “Curious about COVID” by Alan Hsu and Dr.

Larry Candell MIT Lincoln Labs (December 12, 2020)

2. World-o-Meters​: Coronavirus live update

3. Museum of Science​ Webinar titled “Race to the vaccine”

4. American Journal of Managed Care​ article on COVID-19 developments timeline

in 2020

5. MedMastery​ series of videos by Dr Franz Weisbauer, MD, MPH

6. Dr Trevor Bazett - SIR model​ (University of Toronto) series of videos on

explanation of SIR model

7. The Providence Journal

8. Mass.gov

9. Centers for Disease Control and Prevention

10. anaravane on Scratch (mit.edu)

You might also like