Okay, we're going to start week four,
and with our first look at continuous model
with a very short video.
This would be, you know, super simple
but there are a lot of key steps.
So simple isn't quite the right word.
I think the idea is that we want to do something
that is straightforward in theory.
We just want to take discrete models
where we evolve a system, one step at a time,
using a given set of rules and mechanisms.
And then we want to say that those steps occur
over progressively smaller timescales, right?
So we could have models, we've discussed models,
where we have changes of the order of each day.
All right, so we update the rules.
What happens on campus today
determines what's going to be on campus tomorrow.
Now let's say that our rules are over one hour.
So what happens on campus this hour
is determining the state of campus in one hour.
We could say that our time steps are of the order of minutes
or seconds, and as we shrink those time steps,
we want to ask, "What is the limit
of our model in continuous time?"
The idea of continuous time
is that continuous dynamical systems,
calculus and differential equations,
are going to be a incredibly useful toolbox to unlock.
So that's what we want to do in those video
is take the limit of very short timescale.
So I'll be repeating a lot of what we saw.
I'll use the SIS model as an example,
so from discrete to continuous.
I like using the SIS model as an example
because we've discussed, you know,
what approximations are made to go from the reality
of disease spread to a model like this.
It's also a single variable model.
So even though we have two different states,
two boxes, as we saw, the fact that our population
is conserved in the classic case
means that we really only have one degree of freedom.
Give me S, I know how many N people.
I know how many I people there are.
So it's N minus S, right, for all times.
So the fact that it's only one key variable
makes it a little easier to play with.
Now there's two steps we're going to take.
So in the discrete form we add S of t plus 1
or S of t plus delta t.
I know I haven't been clear with that.
Depends on whether we're counting our time
in sort of units or in time steps.
That doesn't matter too much, so that's equivalent.
And I wrote, in a previous video,
that it's proportional to everyone
that's currently susceptible,
are going to stay susceptible if they don't get infected,
and we add 1 minus beta times delta t
or beta times delta t.
Remember, if we're simulating this process, let's say,
for every contact with an infectious individual,
beta times delta t is my transmission rate
times the duration.
So my transmission rate might be, you know,
0.01 transmission per hour.
If my delta t is one day,
If my delta T is one day
And I applied this as a discrete probability
for every one of my infectious contact.
Everyone that can infect me, we ask,
"Do you infect me? Yes or no?"
And I'm only going to remain susceptible
if they all answer no.
So they answer no
with probability 1 minus the transmission probability,
and I have I of t potential infectious people infecting me.
Then we had an average term here I of t for recoveries,
so flow of individuals back from I to S.
And then I don't need to write I of t plus 1
or I of t plus delta t
'cause I know it's N, my total population,
minus whoever's in susceptible.
So the system is fully fixed by this.
We saw in the bonus video for Taylor series
that one thing you can do is develop this probability
as a Taylor series,
meaning we're going to make the approximation
that beta times delta t is really, really small.
And that's going to give us something
like 1 minus beta delta t times I of t,
and then plus some terms,
whoops, that go as beta times delta t,
the whole thing squared,
so beta squared times delta t squared.
The key part is that, if that probability,
beta times delta t, is very small,
we can ignore those other terms.
So that's one thing we can do when delta t
becomes really, really small.
And that's going to be super useful.
So if this is a little confusing right now, what's in red,
I invite you to go and rewatch the bonus video
for a formal definition of Taylor series
in this particular example.
But now what we're going to want to do is remember
that that simple result for small probabilities,
and we're going to ask, "As delta t goes to zero,"
so as my windows get smaller and smaller,
"what is the instantaneous change
between a time step t and a time step t plus delta t?"
That's what we care about.
So let's assume that we now know the result that was in red.
We have that stored in memory forever.
That's going to be useful often.
So let's just store that in memory.
And now I'm going to expand my terms a little bit.
I'm going to have S of t.
I'm using the result that I just erased,
and that's going to give me this delta t times beta
times I of t times S of t.
Let me do something to help me write here more clearly.
'cause I have a lot of terms.
I'm just going to omit the explicit dependency on times.
I'm just going to use I times S
instead of I of t for everything.
That's delta t gamma I.
I was missing a delta t here in my previous equation.
The probability of recovery, again, was gamma terms delta t.
Good thing I have notes.
Okay, so that's this whole thing over delta t.
You know, bonus point for those who corrected my term here,
initially, the same way I add beta times delta t here,
I needed gamma times delta t times I of t.
Well now I have some terms that cancel out.
So this limit is actually going to be
pretty straightforward to do.
I have a minus S and a plus S,
and then everything that's left is proportional to delta t.
So really what I have is delta t over delta t,
and then gamma I minus beta IS.
So then I can easily take the limit.
The two delta t's cancel out and it doesn't matter.
And then I simply have gamma I of t.
This is my final result,
so I'll put the time dependency back on there,
I of t, S of t.
And then this, we'll say, is equal to the time derivative
of S of t.
Because if you remember from your calculus courses,
this instantaneous change that we just calculated,
that's the, you know, purest definition of a derivative.
So this last thing here is essentially just by definition,
which we've calculated is the differential equation
governing the continuous time evolution
of this S of t variable.
And it looks a little funny here,
and if you wanted to make it a little more explicit, again,
everything here we have to remember that I of t
is equal to N which is just a constant,
number of people in the model, minus S of t.
So I could replace both my I of t's here
by this N minus S of t form,
and I would have a complete differential equation
or continuous time model for the SIS process.
So we're going to look into how to solve this model
and analyze this model, simulate this model,
a little further in the subsequent video.
So I'll see you all in the next one.