Lecture #3 ---
Monday November 2, 1998
Stochastic models involve randomness. To simulate the model you need random numbers. On the computer screen in lab, trees are drawn at random on the screen with a given density. To accomplish this we use a pseudo-random number generator that produces a string of numbers, all between 0 and 1. If the probability density is p=0.7, then at each site in the lattice we take one of these random numbers (call it x) and if x<0.7, we go ahead a draw a tree, otherwise leave the spot blank. Then go to the next site in the lattice and do it again. When you’re done you have a random distribution of trees. Then you choose where to start the fire. In the computer lab, the fire starts all across one side of the forest; in the classroom, I started it at one point. But once the fire is started, for then on the model is deterministic—you don’t need any random numbers to decide which way the fire will propagate.
We could make the propagation process random by changing the rules. E.g. we could let the "trees" walk around on the screen while the fire is propagating. Or we could let the wind blow the fire in one direction but not others, and we could let the wind change directions randomly.
When we ran the model epidemic in the classroom, we also used random numbers. We used the last digit of your social security number. When you were assigned a SS# the chances of having it end in any digit are even for all digits. Thus if I say "everyone whose SS# ends with the digit 4" I will get about 10% of you chosen at random.
Aside…This does not work if I use the first digit of your SS# because that is correlated with the location of the SS office where it was assigned. Since many of you are from the same geographic region, the first digit of your SS# might not be evenly distributed (ask the class to see.) So be careful—not all numbers are random numbers!
So stochastic models require random numbers. Deterministic models don’t. They always run the same way with no input from a random number generator, no coin flipping. The model we wrote down for your bank account
S(0)=$100 S(n+1)=S(n) (1+r)
is a deterministic model—no randomness, assuming the daily interest rate r is constant.
(r = annual interest rate/365.)
But a model of the type
S(n+1)=S(n) + r S(n)(1-S(n))
Here S(n) is the fraction of people in the group that are sick so 0 < S(n) < 1. Let’s assume that once you are exposed you are immediately infected and contagious, and you never become uninfected, on the time scale we are following the model no one is born or dies or moves in or moves away.
Our model says that on day n, S(n)*10,000 people are sick, doesn’t say where they are spatially located or who is next to whom at any given time.
This is a kind of mixing bowl model and it is the same kind of kinetics as in chemical reactions.
The underlying assumption is that people who are infected S(n) and people who are not infected (1-S(n)) are well mixed in the population, and that the number of contact/transmissions between a contagious person and a susceptible person is just the product S(n) (1-S(n)) times a factor r.
In fact, this number is a statistical estimate describing the most probably outcome from a process which is in fact a random one.
From one of these equations, how can we guess how a system behaves in the long run?
To start with you can choose a value of r and an initial state S(0), and use your calculator or computer to see how S(n) evolves over time.
Now, people do get better eventually. How to add that to the model?
Let’s talk about quarantine:
In the case where people are contagious long before they show symptoms, quarantining those with symptoms isn’t necessarily going to stop the epidemic (AIDS).
In the case where people are not contagious until they show symptoms, quarantine can be an effective tool against an epidemic.
Quarantine does not necessarily mean the police locking people up or confining them in house arrest!
Quarantine is also what families do when they keep their kids home from school until the chicken pox have dried up and scabbed over (even though the worst of the illness itself is over much more quickly and the child is likely bored sitting indoors for a week or two.)
Next time: an introduction to Stella and thinking about dynamical systems!
Mathematical models come in various flavors: stochastic vs. deterministic, and spatially distributed vs. spatially homogeneous ("mixing bowl")
Stochastic vs. deterministic
Another distinction: mathematical models can be spatially distributed or homogeneous. That is, in the percolation model we had a bunch of individuals sitting at specific locations laid out in a two-dimensional plane. (Aside: you can do percolation models in 3 dimensions by putting the "trees" on a 3-d lattice. Believe it or not, you can do 4-dim and 5-dim if you want…the computer is a powerful tool for simulating phenomena in higher dimensions!)
Another way: COBWEBS
Concepts about discrete dynamical systems
What else do we need to include in our model?
Lecture #4 ---
Friday, November 6, 1998
S(n+1) = S(n) + r S(n) [1 – S(n)] - b S(n)
Sick tomorrow = Sick today + new cases - recoveries
Basic mathematical model of an epidemic:
Improving public health measures can reduce the contact rate. Frequent travel increases it!
b = getting better rate (describes the fraction of sick people that recover each day
New cases = r S(n) [ 1 - S(n) ] …mixing infected and uninfected people
Recoveries = b S(n) ...a fraction b get better each day
Assumptions that are used in building this model:
What else can we put into the model?
Herd immunity
3. Quarantine
How does an epidemiologist make predictions about the course of an ongoing epidemic?
1. Collect data about how many people are infected vs. time
2. Build a mathematical model, including basic model only or perhaps with more details, e.g. subgroups with different contact rates
3. Fit parameters in the model to match historical data
4. Use your fitted parameters to run the model forward in time to make predictions about the future.
This is the same basic technique used for mathematical modeling of just about anything !
What else can we imagine?
Can imagine setting up a model of S(n,x,y) which has spatial variation as well as simple dynamics!
Stella is a software tool for studying dynamical systems.
You will study:
Your job: figure out how to make predictions about the course of an epidemic!