1 / 22

# The Most Important Diagram - PowerPoint PPT Presentation

The Most Important Diagram. The Most Simple Model(?). r. S. S. The Most Simple Model(?). r. S. S. This model characterizes how S(t) is changing. The Most Simple Model(?). r. S. S. How many people are susceptible at time = t?

I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.

## PowerPoint Slideshow about 'The Most Important Diagram' - clarke-stephenson

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

r

S

S

This model characterizes how S(t) is changing

r

S

S

How many people are susceptible at time = t?

What is S(t) = ? There are a number of approaches…

• Discrete / Numerical

• Analytical

• Simulation of stochastic events

• Bonus: scheduling events via a stochastic algorithm

Approach #1

r

S

We know that:

Approach #1

r

S

S

Approach #1

r

S

S

Approach #1

r

S

S

Discrete

(aka “Numerical”)

Approach #2

r

S

S

Differential equation

This one is not that difficult to solve

Approach #2

r

S

S

Solving for S(t)

yields:

Analytic

Approach #3

In each time step, each individual “leaves” S with probability = r

S

S

I2

I3

I1

I4

I5

A population of 10 susceptible

Individuals at T0

I10

I6

I8

I9

I7

Approach #3

In each time step, each individual “leaves” S with probability = r

S

• - Generate a random number, U, between

• 0 and 1 for each individual

• If U > r, individual stays in S

• If U < r, individual leaves S

• Suppose r = 0.05

S

I2

I3

I1

I4

I5

I10

I6

I8

I9

I7

U ~ Uniform on the interval [0, 1]

Approach #3

In each time step, each individual “leaves” S with probability = r

S

S

I2

I3

I1

I4

I5

I10

I6

I8

I9

I7

Approach #3

In each time step, each individual “leaves” S with probability = r

S

S

S

S

I2

I2

I3

I3

I1

I1

I4

I4

I5

I5

I10

I10

I6

I6

I8

I8

I9

I7

I9

Approach #3

Using indicator variables to denote if an individual is still in “S”

S

S

S

S

1

1

1

1

1

1

1

1

1

1

1

1

1

1

1

1

1

0

1

1

Approach #3

Repeat for the desired number of time steps to determine S(t)

S

S

S

S

?

1

?

1

?

1

?

1

?

1

?

1

?

1

?

1

?

0

1

0

Stochastic

• If events are happening at a constant rate, l, we can model the time to the next event using an exponential distribution

• Recall that the mean of an exponential distribution is 1/l

• The c.d.f. is:

• F = P(T < t) = 1 – e –lt

• Solving for t gives:

• t = -ln(1 – P) / l = F-1

Lets see a visual….

Suppose l = 2

We can see, for example, that the probability that we’ll wait more than one unit of time is about 0.2. The probability that we’ll have to wait less than one unit is about 0.8.

• P(T < t) = 1 – e –lt

Suppose l = 2

• We can generate a exponentially distributed r. v.’susing the following algorithm:

• Generate a uniform r.v. (U) using a random number generator (e.g. in R)

• Plug in U in for P in F-1 (U) = -ln(1 – U) / l

• The result is a exponentially distributed waiting time

• Repeat

Suppose l = 2

• F-1 = -ln(1 – P) / l

Mean = 1/2

• More than one type of event can occur in most models (e.g. birth, death, infection, recovery)

• We can add up the rates of each of these to find out the overall rate that events occur

• Use our algorithm to determine the time to the next event (stochastically!)

• Randomly select which event occurred (proportional to it’s rate)