+ All Categories
Home > Documents > Epidemic Modelling

Epidemic Modelling

Date post: 27-May-2017
Category:
Upload: jason-whalley
View: 223 times
Download: 0 times
Share this document with a friend
75
MATH3752: Project in Statistics Epidemic Modelling Investigating the different mathematical models employed in Epidemiology Jason Whalley 200617509 December 13, 2013
Transcript
Page 1: Epidemic Modelling

MATH3752: Project in Statistics

Epidemic Modelling

Investigating the different mathematical models

employed in Epidemiology

Jason Whalley

200617509

December 13, 2013

Page 2: Epidemic Modelling

Abstract

This project investigates the mathematical models and their relevant approaches to Epi-

demiology. Each model will be identified, explained and applied in order to ensure clarity

throughout the report and maximise understanding, accordingly.

Evaluation of each epidemic models explored in this report will include comparison to

other mathematical models and potential applications to real-life situations in order to

maintain effectiveness in assessment.

Page 3: Epidemic Modelling

Contents

1 Introduction 1

1.1 Terminology and Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . 2

2 Simple Deterministic Epidemic 4

2.1 Properties of the simple deterministic epidemic . . . . . . . . . . . . . . . 5

2.2 Infectives and Susceptibles . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

2.3 Analysis of the simple deterministic epidemic . . . . . . . . . . . . . . . . . 9

2.4 End of an epidemic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

2.5 Epidemic Curve . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

2.6 Explaining the epidemic curve . . . . . . . . . . . . . . . . . . . . . . . . . 22

2.7 Example of a simple deterministic epidemic . . . . . . . . . . . . . . . . . 25

2.8 R Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

3 General Deterministic Epidemic 29

3.1 Notation for general deterministic epidemics . . . . . . . . . . . . . . . . . 31

3.2 Infectives, Susceptibles and Removals . . . . . . . . . . . . . . . . . . . . . 33

3.3 Relative Removal Rate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36

3.4 Approximate Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42

3.5 R Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47

4 Simple Stochastic Epidemic 48

4.1 Notation for simple stochastic epidemics . . . . . . . . . . . . . . . . . . . 49

4.2 Markov chains . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50

4.3 Randomness in stochastic models . . . . . . . . . . . . . . . . . . . . . . . 54

4.4 R Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56

5 General Stochastic Epidemic 58

5.1 Notation for general stochastic epidemics . . . . . . . . . . . . . . . . . . . 58

5.2 Markov Chains . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59

5.3 Modelling the general stochastic epidemic . . . . . . . . . . . . . . . . . . 62

i

Page 4: Epidemic Modelling

5.4 R Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66

6 Discussion 68

6.1 Simple models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68

6.2 General models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69

6.3 Other models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70

ii

Page 5: Epidemic Modelling

1 Introduction

This report investigates mathematical models used in Epidemiology; the corresponding

equations that enable each model to function and explains the necessity of the relevant

mathematics.

The main source for this project is Daley and Gani (1999), though the content is

outlined and evaluated in significantly more detail. The fundamentals of Epidemiology

and the stages an epidemic model traverses are explained in order to ensure greater

understanding.

Chapter 2 and Chapter 3 introduce the simple and general deterministic models of

Epidemiology, respectively. The deterministic approach uses differential equations which

are solved to model the epidemics.

The first model introduced in the report is the simple deterministic model, which

assumes that individuals do not recover from an epidemic and classifies all individuals in

the population as either infectives or susceptibles.

The next model introduced in the report is the general deterministic model, which

assumes that individuals can recover - but are not added back into the population as

they develop immunity. This epidemic model classifies all individuals in the population

as either infectives, susceptibles and removals. Furthermore, those classified as removals

can be labeled as dead, isolated or immune individuals.

After the discussion of the deterministic models, Chapter 4 and 5 of the report intro-

duce the simple and general stochastic models of Epidemiology. The stochastic approach

uses Markov processes to model the epidemics.

Introducing the stochastic approach to Epidemiology allows for direct comparisons to

the deterministic approach; as such, the simple and general models use similar examples

in order to discuss the comparisons.

In Chapter 6, the final chapter in this report, the fundamentals of other epidemic

models are examined, their complexity in terms of mathematics employed is outlined and

potential approaches this report could have taken - given more time - are discussed.

The software package entitled R was used throughout the report to simulate data and

1

Page 6: Epidemic Modelling

create graphs for the relevant epidemic models. Though not all of the R code employed

in this project will be present in the report, code that is determined as unique will be at

the end of each chapter with reference to how and where it was applied. Furthermore, all

images in the report are original and, as stated before, the graphs were created using the

software package R. [9]

Multiple examples are present throughout this report, these examples will be marked

with a relevant title and a small white box will signify the end of the example, as shown

below.

1.1 Terminology and Definitions

There is a range of terminology employed throughout this report. Though the terms will

be defined at the time that they occur in the report the first time, knowledge of them will

be assumed thereafter. Hence, the report will list some of the key terms applied at the

start in order to comply with the aim of complete clarity.

Susceptible: An individual who is not infected but is capable of becoming an infective.

Infective: An individual who is infected and capable of spreading the infection to other

individuals.

Immune: An individual who can not be infected by the infection.

Infective State: The state an individual enters once being infected. The time length of

the state and any induced effects to the individual are dependent upon the infection.

Infection Parameter: The rate at which the infection spreads throughout the popula-

tion, denoted by β.

Alpha Infective: The first infective in the population. If there are multiple infectives

in the population at t = 0 then this term will not be used.

Epidemic Curve: The curve that measures the number of occurrences of new infectives

at time t.

2

Page 7: Epidemic Modelling

Removal Parameter: The rate at which infectives are removed from the population,

denoted by γ.

Relative Removal Rate: This determines whether there will be an epidemic or if the

infection will die out, denoted by ρ.

Markov Chain: A Markov chain is a system that uses processes to transition from one

state to another.

Absorbing State: An absorbing state is a state in a Markov chain which causes the

Markov chain to remain in that state indefinitely.

3

Page 8: Epidemic Modelling

2 Simple Deterministic Epidemic

This is an epidemic where the population consists of only Infectives and Susceptibles.

Individuals designated as infectives are capable of infecting individuals designated as

susceptibles, and once a susceptible is infected they become an infective. Furthermore,

there will be no births or deaths in this model, hence the population will remain closed.

In a simple deterministic epidemic infectives remain infected and do not change from

this state. Furthermore, the infectives continue to spread the infection until the end

of the epidemic, where all individuals in the population are infected and there remains

no susceptibles. Since the infection parameter is fixed throughout the epidemic, the only

outcome possible in the simple deterministic model is for all individuals to become infected

by the epidemic - no matter how long this takes.

A simple epidemic may represent an infection that is very infectious, but does not

cause any serious afflictions to those infected by it. This would allow infectives and

susceptibles to mix if infectives showed little or no symptoms of the infection and, as a

result, the infection would spread.

However, it is difficult to compare the simple deterministic model to any real infection

as real people do not follow the main principles of the epidemic.

• This model assumes that individuals continue to move around in a consistent man-

ner, almost as if they were ignoring the infection. Whereas, in the presence of

a noticeable infection, the uninfected individuals in a population would distance

themselves from the infectives in an effort to avoid the infection.

• Another assumption is that there is no way to cure the infection. However, the

majority of infections in the real world have cures available. In the event that

there is no cure for the infection, efforts to isolate the infected individuals would

most likely be made by the individuals in the population to limit the spread of the

infection.

Hence, a favourable outlook on the simple epidemic would be to consider an infection that

has zero noticeable symptoms.

4

Page 9: Epidemic Modelling

This section of the report mainly uses mathematics applied in Daley and Gani (1999,

p21-23) though the content is thoroughly explained in sufficient detail for the report.

The number of infectives is a function of time in the deterministic epidemic models,

as well as the number of susceptibles. There are no stochastic elements considered in the

deterministic models, though stochastic models will be discussed later in the report.

2.1 Properties of the simple deterministic epidemic

The transfer of state is instantaneous, as such it only takes a small increment in time

δt to transfer from one state to another. An individual transferring from the susceptible

to infective state will be instantly transferred to the new state. This is demonstrated in

Figure 1 below

Figure 1: Instantaneous state transferral.

Figure 1 shows that an individual is in the susceptible state at time t = λ. The

individual changes from the susceptible state to infective state and will be categorised as

an infective at t = λ+ δt.

Example: Simple deterministic epidemic consisting of four individuals.

In this example a population will be considered that consists of four individuals in a

simple deterministic epidemic. The epidemic starts with three infectives and one suscep-

tible, at time t = 0. It should be assumed that time is measured in days.

5

Page 10: Epidemic Modelling

Figure 2: Very small simple deterministic epidemic.

Figure 2 illustrates this example. At time t = 0 there are three infectives and one

susceptible in the simple deterministic epidemic, but the infectives are spreading the

infection. By time t = 1 there are four infectives and zero susceptibles. This means that,

by time t = 1, the susceptible has been infected and is designated as an infective. Hence

the end of the epidemic occurs at after one day, t = 1.

Notation for simple deterministic epidemics:

• N : Total Population

• x(t): Number of susceptibles at time t

• y(t): Number of infectives at time t

Let the size of the Total Population be N , which is a finite number, and the following

equation represents N for t ≥ 0,

6

Page 11: Epidemic Modelling

N = x(t) + y(t). (1)

2.2 Infectives and Susceptibles

At t = 0, Equation 1 is x(0) + y(0) = N , but a simple deterministic epidemic must start

with at least one infective, so y(0) ≥ 1. Otherwise the total population would consist

only of susceptibles and there would be no epidemic to start with.

Now it be will assumed that the individuals in the population mix homogeneously,

which means that the entire population keeps moving around and mixing together in a

consistent way from time t = 0 until t = T1, almost as if the individuals in the population

are ignoring the infection. T1 is the time designated as the end of the epidemic and

is the time where all of the individuals in the population are infectives in the simple

deterministic epidemic. Later in the report, T1 will be defined mathematically.

Since it is assumed that the infection spreads homogeneously,

dy

dt= βx(t)y(t).

Removing x(t) or y(t) makes this simpler to solve. So choosing to remove x, since x(t) =

N − y(t),dy

dt= βy(t)[N − y(t)]. (2)

The differential equation depends on the number of infectives, the number of susceptibles

and the infection parameter. Here, β is the Infection Parameter; the rate at which the

infection spreads throughout the population.

A highly infectious, common disease such as Cholera - which can be spread through

water consumption easily - may have a relatively high infection parameter (or an air-

borne disease would be likely to have a high infection parameter) when compared to an

uncommon disease with a low rate of infection.

The differential equation, Equation 2 can be solved as follows

1

y(t)[N − y(t)]dy = βdt,

7

Page 12: Epidemic Modelling

1

N

[1

y(t)+

1

N − y(t)

]dy = βdt.

Then integrating between 0 and t because of the boundary conditions, hence

1

N

∫ t

0

[1

y+

1

N − y

]dy =

∫ t

0

βdt,

1

N

[ln(y)− ln(N − y)

]t0

=

[βt

]t0

.

Hence [ln

(y

N − y

)]t0

= Nβt,

ln

(y(t)

N − y(t)

)− ln

(y(0)

N − y(0)

)= Nβt.

It follows thaty(t)[N − y(0)]

y(0)[N − y(t)]= eNβt.

This rearranges to give

y(t) =y(0)[N − y(t)]eNβt

N − y(0).

Expanding the numerator gives

y(t) =y(0)N

[N − y(0)]e−Nβt− y(0)y(t)

[N − y(0)]e−Nβt,

y(t)[N − y(0)]e−Nβt + y(0)y(t)

[N − y(0)]e−Nβt=

y(0)N

[N − y(0)]e−Nβt,

y(t)[e−Nβt[N − y(0)] + y(0)

]= y(0)N.

Finally, it follows that

y(t) =y(0)N

y(0) + [N − y(0)]e−Nβt. (3)

Since t is present only in the denominator, it is clear that, as t → ∞, y(t) → N.

Hence, all individuals in the population will eventually become infected, which will

end the epidemic.

8

Page 13: Epidemic Modelling

2.3 Analysis of the simple deterministic epidemic

Example: Breaking down a simple deterministic epidemic into phases.

Suppose a population consists of N = 10 individuals, starting with one infective and

nine susceptibles. The simple deterministic epidemic can be broken down into different

phases in order to illustrate the spread of the infection.

Figure 3: Infection spreading through a small epidemic

Figure 3 shows that in Phase 1, the Alpha Infective is infecting multiple susceptibles.

These susceptibles become infectives and proceed to infect other susceptibles. However,

by Phase 3, there are three infectives spreading the infection but since the majority of

9

Page 14: Epidemic Modelling

the population are already infectives, there are many idle infectives. In Phase 3 there are

three infectives spreading the infection and five infectives who are idle; not infecting any

susceptibles.

Though Figure 3 shows how infection can spread through a population, it does not

show how populations mix to actually spread the infection. Since people do not stand

still forever, Figure 3 does not take into account any form of displacement, instead it

represents only how the infection spreads through a moving population.

Phase 4 occurs at time t = T1. Throughout this report, T1 will denote the time that

the epidemic ends. Furthermore, T1 will be defined mathematically later.

Example: Different infection parameters in epidemics.

The length of the epidemic, which is measured in days by time t, is dependent on

multiple variables. This example shows the effect of the infection parameter, β, on the

simple deterministic epidemic. The following variables will be fixed for this example:

• Populaton size: N = 200

• Initial Infectives: y(0) = 1.

However, one population is designated as Group A and another population is desig-

nated as Group B. The former has an infection parameter of βA = 0.005 and the latter

has an infection parameter of βB = 0.01. The varying values for β are shown to affect the

length of the epidemic, accordingly, in Figure 4 on the next page

10

Page 15: Epidemic Modelling

Figure 4: Length of epidemics with different infection parameters.

Figure 4 shows the comparison of Group A and Group B experiencing a simple deter-

ministic epidemic with different infection parameters. Group A has infection parameter

βA = 0.005 and the epidemic lasts until TA1 = 10.59 days. In comparison, Group B has

infection parameter βB = 0.01 and the epidemic lasts until TB1 = 5.29 days. Furthermore,

as

βA =1

2βB,

this is the reason for

TA1 = 2TB1 .

2.4 End of an epidemic

Since the epidemic is declared over when all individuals within the population are infec-

tives, the time that this occurs is designated as T1. Therefore, T1 can be given by

T1 = inf (t : y(t) > N − 1).

Since N is an integer, the only integer greater than N − 1 is N .

11

Page 16: Epidemic Modelling

Taking T1 = inf (t : y(t) > N − 12) would be acceptable, as well as any real value

between 0 and 1, yet population sizes will always be considered as integers, at least to

begin with, hence y(t) > N − 1. It then follows that y(T1) = N − 1, and so

N − 1 =y(0)N

y(0) + [N − y(0)]e−NβT1.

This equation needs to be rearranged to determine T1, hence

1

N − 1=y(0) + [N − y(0)]e−NβT 1

y(0)N,

so theny(0)N

N − 1− y(0) = [N − y(0)]e−NβT1 .

Simplifying the left-hand-side

y(0)N − y(0)N + y(0)

N − 1= [N − y(0)]e−NβT1 ,

then dividing by [N − y(0)] gives

y(0)

[N − 1][N − y(0)]= e−NβT1 .

Taking the log of both sides

ln

[y(0)

[N − 1][N − y(0)]

]= −NβT1.

Finally,

T1 =1

Nβln

[[N − 1][N − y(0)]

y(0)

].

Taking β =1

Ngives a simple case where T1 can be calculated for different values of N

and y(0). Table 1 illustrates this on the next page

12

Page 17: Epidemic Modelling

y(0) N = 25 50 100 200 500

1 6.36 7.78 9.19 10.59 12.43

5 4.56 6.09 7.54 8.96 10.81

10 3.58 5.28 6.79 8.24 10.10

0.5N 3.18 3.89 4.60 5.29 6.21

0.75N 2.08 2.79 3.50 4.19 5.11

0.9N 0.98 1.69 2.40 3.10 4.02

Table 1: Table illustrating the length of time for an epidemic to end considering

different variables.

With a population of N = 25, the table shows shows that with 90% of the population

starting as infectives, the time for every individual in the population to be infected -

which will end the epidemic - is significantly lower than if only one individual started as

an infective.

In addition, taking the larger population of 500 individuals, it is possible to see that it

takes three times as long for the epidemic to cease starting with one infective as opposed

to 90% of infectives.

Table 1 is influenced by a similar table present in Daley and Gani (1999, p22).

Example: Interpreting the table.

With a population of N = 100 starting with one infective (so 99 susceptibles), reading

from the table it would take T1 = 9.19 for the entire population to be infected. Since T1

is measured in days, it takes just over nine days for the epidemic to cease.

A population of N = 500 individuals that starts with 250 infectives (hence also 250

susceptibles) will endure an epidemic that lasts until T1 = 6.21, at which point the entire

population is plagued by the infection. Hence this epidemic would last for just over six

days.

13

Page 18: Epidemic Modelling

Example: Table comparisons.

The difference between 75% of the population starting as infectives and 90% of the

population starting as infectives is relatively minimal in terms of how long it will take for

the epidemic to end. This is due to the ’tails’ of the curve having very small epidemic

curves at t. With a population of 200 individuals, T1 is barely shorter. Furthermore, with

50% of the population starting as infectives compared to 75% of the population starting

as infectives, again T1 is barely shorter. Though there is a decrease of 1.1 in T1 from

y(0) = 0.5×N to y(0) = 0.75×N as well as y(0) = 0.75×N to y(0) = 0.9×N .

With only one individual starting as infected with a population ofN = 500, T1 = 12.43.

But with five individuals starting as infectives, T1 = 10.81, so the four more infectives

has shortened T1 by 13.02%. Starting with 10 infectives, compared to one, shortens T1

by 18.68%. Evidently the number of infectives has less and less of an effect to T1 as y(0)

increases.

This is best explained by the epidemic curve, which measures the number of occur-

rences of new infectives. When there is only one infective, it can only spread the infection

to a few individuals. However, starting with more infectives increases the range to which

the infection can be spread to susceptibles. The epidemic curve will be discussed in more

detail and defined mathematically later in the report.

Example: Table for fixed β.

Having fixed β instead of β =1

Nallows for a better comparison of how long it takes

for an epidemic to end based upon population size N and initial infectives y(0). The

following table represents the comparison with a fixed β = 0.02.

14

Page 19: Epidemic Modelling

y(0) N = 25 50 100 200 500

1 12.71 7.78 4.60 2.65 1.24

5 9.13 6.09 3.77 2.24 1.08

10 7.17 5.28 3.40 2.06 1.01

0.5 x N 6.36 3.89 2.30 1.32 0.62

0.75 x N 4.16 2.79 1.75 1.05 0.51

0.9 x N 1.96 1.69 1.20 0.77 0.40

Table 2: Table for a simple deterministic epidemic with fixed β.

Since β = 0.02, the column of N = 50 is the same as Figure 5 as β =1

N=

1

50= 0.02.

The table shows that with a larger population size, it takes less time for the epidemic

to infect all individuals. This is explained due to the number of infectives being greater

at some point in the epidemic which results in a higher probability of infectives coming

into contact with susceptibles quicker than in a smaller population.

Having a population of size N = 25 takes nearly 13 days for the epidemic to cease,

starting with one infective. In contrast, having a population size of N = 500 takes just

over one day for the epidemic to cease, starting with one infective.

One infective is likely to only come into contact with a few susceptibles to infect them.

These susceptibles will become infectives, and each of them will come into contact with a

few susceptibles and infect them, accordingly. This pattern will continue, and with more

infectives there is more potential to spread the infection. However, more infectives means

less susceptibles and so the infection rate per infective will begin to shrink. Even so, as

the infection rate per infective shrinks it is easier for susceptibles to become infected due

to the increasing amount of infectives in the population.

This is to be expected, the more infectives in the population, the more the infection

can spread to the susceptibles. This will, as a result, end the epidemic quicker. This is

illustrated by Figure 5.

15

Page 20: Epidemic Modelling

Figure 5: Generations of infectives in a broken down epidemic.

At t = 0 there is only one infective, this is the Alpha Infective and is classed

as Generation 1. The alpha infective spreads the infection to three susceptibles in the

population, who become the infectives of Generation 2. The infectives of Generation 2

proceed to spread the infection to more susceptibles, yet the alpha infective is idle and

does not spread the infection further at this point in time.

The one infective in Generation 1 can infect three susceptibles. The infectives in

Generation 2 can infect two susceptibles each, with three infectives spreading the infection

and one being idle. Two of the infectives in Generation 3 infect one susceptible each, and

the remaining four Generation 3 infectives infect no susceptibles. Hence at this point in

time eight infectives are idle and only two are infecting susceptibles.

This explains how an infection rate could slow down or speed up throughout an epi-

demic. Too many idle infectives cause the infection rate to decrease. The more infectives

spreading the infection causes the infection rate to increase. A balance of these tends to

occur later in the epidemic, especially if the number of infectives overtakes the number of

susceptibles in the population.

16

Page 21: Epidemic Modelling

2.5 Epidemic Curve

The rate of occurrence for new infectives is given bydy

dt, this is the Epidemic Curve.

Breaking down a simple deterministic epidemic into sections allows for the epidemic curve

to be explained before it is mathematically determined.

Example: Breaking down a simple epidemic.

In this example a simple deterministic epidemic consisting of the following variables

will be considered:

• Population size: N = 200

• Initial infectives: y(0) = 1

• Infection parameter: β = 0.005.

Then the times that the model reaches each stage in the epidemic is given by Table 3

below

Minimum Lower Quartile Median Upper Quartile Maximum

t 0 2.65 5.29 7.94 10.59

y(t) 1 13.24 100 186.76 200

Table 3: Table showing the relevant points in the epidemic divided into percentiles.

The relevant data can be used to create a graph of this simple deterministic epidemic,

shown in Figure 6 on the next page.

17

Page 22: Epidemic Modelling

Figure 6: A graph showing the breakdown of the simple deterministic epidemic example.

This simple deterministic example lasts for t = 10.59 days, as shown by the see-through

circle in Figure 6.

Using the dotted lines to split the epidemic into four quarters, it is simple to see that

the first and final quarters are the times when the total number of infectives increases the

least. The total number of infectives increases by y(t) = 13.24 infectives in both these

quartiles.

However, the mid point of the epidemic occurs at time t = 5.29 days, and at this

point there are y(t) = 100 infectives in the population. Hence, in the second quarter the

total number of infectives increases by y(t) = 86.76, and it is clear that the number of

infectives rises rapidly in this quarter.

Furthermore, the second and third quarters of the epidemic are identical; so the total

number of infectives increases by y(t) = 86.76 in the third quarter as well as the second

quarter.

This is due to the epidemic curve, which will now be defined mathematically. Recall

Equation 3,

18

Page 23: Epidemic Modelling

y(t) =y(0)N

y(0) + [N − y(0)]e−Nβt.

Since the epidemic curve is given bedy

dt, it is obtained by differentiating y(t) with respect

to t, using the Quotient Rule.

The quotient rule applies when y =u

v, then

dy

dt=vu′ − uv′

v2.

Applying the quotient rule to y(t) gives

u = y(0)N,

so

u′ =du

dt= 0.

Let

v = y(0) + [N − y(0)]e−Nβt,

so

v′ =dv

dt= −Nβ[N − y(0)]e−Nβt.

Applying the quotient rule to y(t) allows the equation to be differentiated, accordingly.

It then follows that

dy

dt=y(0)βN2[N − y(0)]e−Nβt

[y(0) + [N − y(0)]e−Nβt]2(4)

Hence,dy

dt=

y(0)β[N − y(0)]

eNβt[y(0)N

+ [1− y(0)N

]e−Nβt]2.

Taking eNβt inside the square bracet in the denominator as [e12Nβt]2 allows the equation

to be rearranged to give

dy

dt=

y(0)β[N − y(0)]

[y(0)Ne

12Nβt + e−

12Nβt − y(0)

Ne−

12Nβt]2

=y(0)β[N − y(0)]

[y(0)Ne

12Nβt + e−

12Nβt − y(0)

Ne−

12Nβt]2

.

19

Page 24: Epidemic Modelling

This can then be rearranged to give the following

dy

dt=

y(0)β[N − y(0)]

[12e

12Nβt + 1

2e−

12Nβt − 1

2e

12Nβt + 1

2e−

12Nβt + y(0)

Ne

12Nβt − y(0)

Ne−

12Nβt]2

.

It then follows that

dy

dt=

y(0)β[N − y(0)]

[12(e

12Nβt + e−

12Nβt)− 1

2(1− 2y(0)

N)(e

12Nβt − e− 1

2Nβt)]2

.

The hyperbolic identities are given as

cosh(x) =1

2(ex + e−x),

sinh(x) =1

2(ex − e−x).

Incorporating these into the equation above, and setting x = 12βt above gives

dy

dt=

y(0)β[N − y(0)]

[cosh(12Nβt)− (1− 2y(0)

Nsinh(1

2Nβt)]2

.

The equations for the number of infectives in a population, y(t), and the rate of new

infectives occurring in the population,dy

dt, have now been calculated.

The epidemic curve and the total number of infectives in the population can be plotted

as functions of time. Such a plot would show when the number of infectives overtakes the

number of susceptibles in the population and show how many new infectives there are in

the population at any point in time.

Example: Illustrating the epidemic curve and number of infectives in a population.

Suppose a population consists of N = 100 individuals, starting with one infective.

Figure 7 illustrates the comparison of the number of infectives and the rate of occurrence

of new infectives on the next page.

20

Page 25: Epidemic Modelling

Figure 7: Displaying the maximum number of new occurrences of new infectives and the

number of infectives in a simple deterministic epidemic.

Figure 7 shows that, as more individuals become infectives, the epidemic curve will

increase. This is because there are many susceptibles for the infectives to spread the

infection to, as the population is mixing homogeneously.

Furthermore, the epidemic curve is at its maximum at t = 4.60. At this time, the

value of the epidemic curve isdy

dt= 25 and the number of infectives is y(t) = 50.

Starting with more than one infective at t = 0 would allow for more individuals to be

infected. The initial stages and end stages of the epidemic are clearly the longest stages,

which is supported by each of the illustrated graphs in the report so far.

However, when the number of infectives is greater than the number of susceptibles, the

epidemic curve starts to decrease. The turning point of the epidemic curve occurs around

half way between t = 0 and t = T1. At this point in time, y(t) is approximately equal

to 12N , the time where the number of susceptibles is less than the number of infectives in

the population. This is because there many infectives that are idle and not spreading the

infection to susceptibles.

As t gets closer to T1, the epidemic curve tends to zero.

21

Page 26: Epidemic Modelling

2.6 Explaining the epidemic curve

To determine the time when the epidemic curve is at its maximum, Equation 3 needs to

be differentiated with respect to t. This gives Equation 4 which needs to be differentiated

again, however, it is simpler to differentiate the equation by moving all of the t terms to

the denominator

dy

dt=

βN2[N − y(0)]e−Nβt

[y(0) + [N − y(0)]e−Nβt]2

=βN2[N − y(0)]

eNβt[y(0) + [N − y(0)]e−Nβt]2.

Hencedy

dt=

βN2[N − y(0)]

[e12Nβty(0) + [N − y(0)]e−

12Nβt]2

Applying the quotient rule allows the equation to be differentiated, accordingly; thus let

u = βy(0)N2[N − y(0)]

so

u′ =du

dt= 0.

Now let

v =[e

12Nβty(0) + [N − y(0)]e−

12Nβt]2

so

v′ =dv

dt= 2

[1

2βNe

12Nβty(0)− 1

2[N −y(0)]βNe−

12Nβt

]×[e

12Nβty(0)+ [N −y(0)]e−

12Nβt

],

then

v′ =[βNy(0)2eNβt + βNy(0)[N − y(0)]− βNy(0)[N − y(0)]− βN [N − y(0)]2e−

12Nβt],

which then becomes

v′ =[βNy(0)2eNβt − βNe−Nβt[N − y(0)]2

].

22

Page 27: Epidemic Modelling

Since the maximum time tm will be obtained whend2y

dt2= 0 and u = 0, the calculation

only requiresd2y

dt2= uv′ = 0.

Hence

0 =[βNy(0)2eNβtm − βNe−Nβtm [N − y(0)]2

]× [βN2y(0)[N − y(0)]],

y(0)2eNβtm = [N − y(0)]2e−Nβtm .

It follows that

2βNtm = 2 ln

[N − y(0)

y(0)

].

This gives

tm =1

βNln

[N − y(0)

y(0)

].

Here tm is time t when the epidemic curve is at its maximum.

Example: Finding the time when the epidemic curve is at its maximum.

For this example a population of size N = 100 will be considered, consisting of y(0) = 1

infective and x(0) = 99 susceptibles at the start of the epidemic t = 0. The infection

parameter is β =1

Nand so tm can be equated to be

tm = ln

[100− 1

1

]= ln [99] = 4.60.

So in just under five days, the epidemic curve is at its maximum. This means that the

rate of occurrence of new infectives reaches its maximum just before five days and then

proceeds to drop.

At time tm, the number of infectives is

23

Page 28: Epidemic Modelling

y(tm) =y(0)N

y(0) + [N − y(0)]e−Nβt

=y(0)N

y(0) + [N − y(0)]× y(0)N−y(0)

.

It follows that

y(tm) =y(0)N

y(0) + y(0).

Hence

y(tm) =1

2N.

This confirms the previous assertion that the epidemic curve is at its maximum when the

number of infectives is equal to half the total population. Since the population is closed,

and N = x(t) + y(t), at time t = tm,

N = x(tm) +1

2N.

Therefore

x(tm) =1

2N.

Thus, the rate of occurrence of new infectives is at its maximum when half of the popu-

lation are infectives and half of the population are susceptibles. It is interesting to note

that this does not depend on the infection parameter.

At time t = tm, the epidemic curve is

dy

dt(tm) =

βy(0)N2[N − y(0)] y(0)N−y(0)[

y(0) + [N − y(0)] y(0)N−y(0)

]2

=βy(0)2N2

4y(0)2

=βN2

4.

24

Page 29: Epidemic Modelling

It follows thatdy

dt(tm) = β(

1

2N)2.

Taking the simple case of β =1

N, the epidemic curve would be

dy

dt(tm) =

1

4N.

The graph shows that the epidemic curve is at its maximum at tm = 0.25N .

2.7 Example of a simple deterministic epidemic

This is an example designed to explain all of the properties of a simple deterministic

epidemic this report has covered so far. Since this is a simple deterministic epidemic, it

is assumed that the population consists of only infectives and susceptibles. Moreover, an

infective remains in the infected state from 0 ≤ t ≤ T1, and can not change back to the

susceptible state.

The population in this example is N = 137 individuals, consisting of three infectives

and 134 susceptibles at time t = 0. Hence y(0) = 3 and x(0) = 134.

Furthermore, the infection parameter will, in this case, differ from the simple case

that has been used so far in this report. This infection in this example will not be very

infectious. The simple case was β =1

N, but for this case β = 0.003. Due to this new β

being significantly lower than1

N=

1

137= 0.0073, it is safe to assume that the infection

will spread slower than that in previous cases. Hence it may take quite a few days for the

epidemic to cease.

Using the equation

T1 =1

βNln

[[N − 1][N − y(0)]

y(0)

],

inserting all of the variables allows appropriate calculation of T1. Hence

T1 =1

0.003× 137ln

[[137− 1][137− 3]

3

],

25

Page 30: Epidemic Modelling

T1 = 21.20.

Hence it takes just over 21 days for all individuals in the population to be infected.

The epidemic curve is at its maximum when

tm =1

βNln

[N − y(0)

y(0)

].

Hence

tm =1

0.003× 137ln

[137− 3

3

]

t = 9.24.

Furthermore, the corresponding epidemic curve value at this time is given by

dy

dt= β

(1

2N

)2

.

It follows thatdy

dt= 0.003

(1

2× 137

)2

= 14.08.

Then the number of occurrences of new infectives reaches its peak at t = 9.24 days, at

which time the number of occurrences of new infectives isdy

dt= 14.08 each day.

The number of infectives in the population and the epidemic curve can be calculated

by inserting the variables, accordingly. Figure 8 displays the appropriate graph on the

next page.

26

Page 31: Epidemic Modelling

Figure 8: A graph displaying the course of the simple deterministic epidemic example.

Figure 8 complies with the assertions; it takes just over 21 days for the epidemic to end

and the epidemic curve is at its maximum just after nine days. Furthermore, the number

of occurrences of new infectives isdy

dt≈ 14 when the epidemic curve is at its maximum.

The tail of the graph rises by one after the epidemic has ended mathematically, this

is because T1 is given by

T1 = inf(t : y(t) > N − 1),

so the epidemic ends just as the number of infectives passes N − 1.

2.8 R Code

Code from the software package R was used to illustrate several figures in this section of

the project.

Figure 6

tt=c(0:150)*0.1; beta=0.005; n=200; y0=1y=(n*y0)/(y0+(n-y0)*exp(-beta*n*tt))plot(tt,y,xlab="Time t",ylab="y(t)",type="l")

27

Page 32: Epidemic Modelling

points(tt,y2,lty=3,type="l")points(10.58660965,200,pch=1,cex=1.5)lines(c(10.58660965,10.58660965),c(0,200),lty=2)lines(c(5.293304825,5.293304825),c(0,200),lty=2)lines(c(0,0),c(0,200),lty=2)lines(c(2.646652413,2.646652413),c(0,200),lty=2)lines(c(7.939957238,7.939957238),c(0,200),lty=2)legend(10.5,120,c(expression(y(t)),expression(Percentiles)),lty=c(1,3),bty="n")

Figure 7

tt=c(0:150)*0.1; beta=0.01; n=100; y0=1y=(n*y0)/(y0+(n-y0)*exp(-beta*n*tt))plot(tt,y,xlab="Time t",ylab="y(t)",type="l")dydt=(y0*beta*n^2*(n-y0)*exp(-beta*n*tt))/(y0+(n-y0)*exp(-beta*n*tt))^2points(tt,dydt,lty=3,type="l")points(4.59511985,25,pch=1,cex=1.5)points(4.59511985,50,pch=1,cex=1.5)lines(c(4.59511985,4.59511985),c(0,50),lty=2)legend(10,60,c(expression(y(t)),expression(dy/dt)),lty=c(1,3),bty="n")

Figure 8

tt=c(0:300)*0.1; beta=0.003; n=137; y0=3y=(n*y0)/(y0+(n-y0)*exp(-beta*n*tt))plot(tt,y,xlab="Time t",ylab="y(t)",type="l")dydt=(y0*beta*n^2*(n-y0)*exp(-beta*n*tt))/(y0+(n-y0)*exp(-beta*n*tt))^2points(tt,dydt,lty=3,type="l")points(9.243862558,14.07675,pch=1,cex=1.5)points(9.243862558,68.48785799,pch=1,cex=1.5)points(21.19679415,137,pch=19,cex=1.5)lines(c(21.19679415,21.19679415),c(0,137),lty=2)lines(c(9.243862558,9.243862558),c(0,68.48785799),lty=2)legend(22,100,c(expression(y(t)),expression(dy/dt)),lty=c(1,3),bty="n")

28

Page 33: Epidemic Modelling

3 General Deterministic Epidemic

This is an epidemic where the population consists of susceptibles, infectives and removals.

Removals are individuals who are taken out of the population.

In contrast to the simple deterministic epidemic, infectives in the general deterministic

model can change state. Infectives can change to the removal state, though susceptibles

may only change to the infective state before changing to the removal state. Thus, only

infectives can be removed from the epidemic.

Individuals can be removed from the epidemic through death, as such, lethal infections

could be modelled by the general deterministic epidemic, whereas the simple deterministic

model could not.

Though this model assumes that individuals can be removed from the epidemic at a

fixed removal rate, it remains difficult to compare the general deterministic model to a

real infection as:

• The model assumes that individuals continue to move around with the entire pop-

ulation in a consistent manner, instead of attempting to avoid the infection. If an

infection has noticeable symptoms, susceptibles would certainly attempt to distance

themselves from infectives and vise versa.

• The introduction of removals shows that there may be potential cures for the in-

fection to create an immunity, or that it is possible to isolate individuals who are

infected. However, the model uses a fixed removal parameter for this. A high num-

ber of removals at numerous points in the epidemic would be more realistic and

productive than a lower, consistent removal rate in the population.

Hence, though the general deterministic epidemic may be more applicable to real-life

situations than the simple deterministic epidemic, a model taking into account human

behaviour would be more effective.

This chapter mainly draws upon mathematics applied from Daley and Gani (1999,

p27-31), however, other sources are also drawn upon and they shall be stated at the time

the relevant mathematics is employed.

29

Page 34: Epidemic Modelling

Example: Classification.

The general deterministic epidemic introduces Removals to the population. An indi-

vidual designated as a Removal may be classified as either dead, immune or isolated. An

immune is an individual who is not susceptible to the infection. An isolated individual is

an infected person who has been taken out of the population and will not be added again.

A dead individual is someone who has succumbed to the infection and died.

Figure 9: The classifications of individuals in a general deterministic epidemic.

Figure 9 shows that an individual transfers from each state in a very tiny space of

time. From time t = λ1 an individual is classified as a susceptible, but then at t = λ1 + δt

that same individual is classified as an infective, where δt is a very small increment in

time. Hence the transfer of state from susceptible to infective is almost instantaneous, as

before.

Figure 9 illustrates every state that is part of the general deterministic epidemic.

Those classified as immune, isolated or dead are removed from the population N and

cannot be added back in. Moreover, an individual transferring from the infective state

to a state of removal (dead, immune or isolated) is almost instantaneously transferred as

30

Page 35: Epidemic Modelling

the time is t = λ2 + δt at the time of possession in all states of removal and the infective

state.

3.1 Notation for general deterministic epidemics

Following on from the simple deterministic epidemic, let the total population be N , which

is a finite number, and the following equation represents N for t ≥ 0,

N = x(t) + y(t) + z(t). (5)

Notation for the general deterministic epidemics:

• N : Total Population

• x(t): Susceptibles

• y(t): Infectives

• z(t): Removals

An individual defined as a removal is someone who has been taken out of the population

as a result of the infection. A removed individual may be immune, dead or isolated.

Example: Removals in a small epidemic.

When an epidemic spreads through a population, it may be potentially fatal to all of

those susceptible to the infection. Therefore, it would make sense to attempt to contain

the population. This may take a while depending on how infectious the disease is, how

many individuals are in the population and how noticeable the symptoms are.

Taking a small population of size N = 12, and shows how individuals may be removed

from the population in different ways.

31

Page 36: Epidemic Modelling

Figure 10: The range of different types of individuals in a general deterministic epidemic.

Figure 10 is an example of a general deterministic epidemic spreading through a small

population of size N = 12. The epidemic is split into five phases and ends at the fifth

phase, where there are no more susceptibles in the population.

The epidemic starts with one infective, eleven susceptibles and zero removals. Hence,

at time t = λ1; y(λ1) = 1, x(λ1) = 11 and z(λ1) = 0.

The alpha infective spreads the infection to three other susceptibles which causes there

to be a total of four infectives by the second phase. So at time t = λ2; y(λ2) = 4, x(λ2) = 7

and z(λ2) = 0.

However, one of the infectives recovers from the infection by the third phase. Hence,

at time t = λ3; y(λ3) = 6, x(λ3) = 5 and z(λ3) = 1.

32

Page 37: Epidemic Modelling

The infection continues to spread and at the end of the epidemic at time t = T1 there

are two susceptibles remaining, yet there are a total of ten removals: one individual has

died, eight have been isolated from the rest of the population, and one has recovered from

the infection. Hence, by the end of the epidemic, at time t = T1; y(T1) = 0, x(T1) = 2

and z(T1) = 9.

The reason for the epidemic ending is due to isolation of the infectives. Isolating them

from the rest of the population enabled the remaining susceptibles to be out of reach

of the infection. However, there are only two susceptibles remaining at the end of the

epidemic as well as one immune individual, so the epidemic has managed to infect a large

majority of the population.

The epidemic ends with:

• Eight people isolated

• One person immune to the infection

• One dead individual

• Two people uninfected and still susceptible to the infection

3.2 Infectives, Susceptibles and Removals

At t = 0 Equation 5 becomes x(0) + y(0) + z(0) = N , and since an epidemic must start

with at least one infective, y(0) ≥ 1.

Mathematics used by Brauer, van den Driessche and Wu (1945, p22) defines the rele-

vant differential equations that are used to describe the number of infectives, susceptibles

and removals over time.

As it is assumed that the total population consists of zero removals at t = 0, since a

removal is taken out of the population, it does not make sense to start with a population

consisting of any removals; hence z(0) = 0 at the start of the epidemic t = 0.

With the infection parameter β as before, the differential equation for x(t) is

dx

dt= −βx(t)y(t).

33

Page 38: Epidemic Modelling

It is assumed that the number of infectives increases and the number of susceptibles

decreases over time. Some susceptibles will change to infectives and some infectives will

be removed from the population as a result of death, immunity or isolation. The rate at

which infectives are taken out of the population is given by the Removal Parameter γ.

Hencedy

dt= βx(t)y(t)− γy(t).

Furthermore, the number of removals has to increase alongside the rate of the loss of

infectives. Hencedz

dt= γy(t).

These differential equations are the fundamentals of the general deterministic model and

were first employed by Kermack and McKendrick (1927); cited by Daley and Gani (1999).

Defining ρ to be ρ =γ

β, the Relative Removal Rate,

dx

dzcan be given by

dx

dz=dx

dt× dt

dz.

Thendx

dz= −βxy × 1

γy= −β

γx(t).

Hencedx

dz= −x(t)

ρ.

It then follows that ∫1

x(t)dx = −1

ρ

∫dz,

ln[x(t)] = −z(t)

ρ+ c,

where c is a constant. Taking the exponential

x(t) = e−z(t)ρ × A,

where A = ec. At t = 0, x = x(0) and z(0) = 0. Imposing these initial boundary

conditions to the equations gives

x(0) = e0 × A,

34

Page 39: Epidemic Modelling

A = x(0).

Hence the equation for x(t) is

x(t) = x(0) e−z(t)ρ . (6)

This implies that the equation for z(t) is

z(t) = −ρ ln

[x(t)

x(0)

]. (7)

This gives equations for x(t) and z(t) in terms of z(t) and x(t), respectively. Equation 5

is

N = x(t) + y(t) + z(t),

which can be rearranged to give

y(t) = N − x(t)− z(t)

= N − x(0) e−z(t)ρ − z(t).

Differentiating this equation with respect to z

dy

dz=x(0)

ρe−

z(t)ρ − 1.

Then using Equation 7

dy

dz=x(0)

ρeln

[x(t)x(0)

]− 1

=x(0)

ρ× x(t)

x(0)− 1.

It follows thatdy

dz=x(t)

ρ− 1.

35

Page 40: Epidemic Modelling

3.3 Relative Removal Rate

The relative removal rate is denoted by ρ, which determines whether there will be an

epidemic or if the infection will die out.

If the infection parameter causes the number of infectives to grow quicker than the

number of infectives which are removed from the epidemic model, then clearly there will

be an epidemic. However, if the rate at which infectives are removed from the epidemic

model is greater than the rate at which susceptibles are being infected then the infection

will die out.

At t = 0 this is the initial slope anddy

dz=x(0)

ρ− 1. Three cases are presented:

1. x(0) > ρ

2. x(0) < ρ

3. x(0) = ρ

In the case of x(0) > ρ, this implies that x(0)ρ> 1. Hence

x(0)

ρ− 1 > 0.

The examples of each of these three cases are based on the web article by Igusa, though

this report looks at all cases and uses comparable variables; see reference [4].

Example: The case where x(0) > ρ.

In this general deterministic epidemic example, a population will be considered con-

sisting of N = 5000 individuals. There are x(0) = 4800 susceptibles to begin with and

y(0) = 200 infectives, as well as z(0) = 0. Taking ρ = 2500 satisfies the inequality

x(0) > ρ, as 4800 > 2500. The general deterministic epidemic can be illustrated by

Figure 11 on the next page.

36

Page 41: Epidemic Modelling

Figure 11: A graph showing the number of infectives and susceptibles in the general

deterministic epidemic as the number of removals increases, in the case of x(0) > ρ.

In Figure 11, the general deterministic epidemic has 1000 susceptibles who have not

been infected at the end of the epidemic. At this point in time there are 4000 removals

and no infectives remaining. This is illustrated by the y curve passing through the x-axis

which signifies the end of the infection (y(t) = 0).

The maximum of y(t) is given by

dy

dz=x(t)

ρ− 1,

whendy

dz= 0. Since the relative removal rate ρ = 2500 in this example, it follows that

0 =x(t)

2500− 1,

hence

x(t) = 2500.

Thus the curve for y(t) is at its maximum when x(t) = 2500. Then, the equation for z(t)

37

Page 42: Epidemic Modelling

is given by

z(t) = −ρ ln

[x(t)

x(0)

]= −2500 ln

[2500

4800

]= 1630.81.

When z(t) = 1630.81, the number of infectives is given by

y(t) = N − x(t)− z(t)

= 5000− 2500− 1630.81

= 869.19.

Then the maximum number of infectives is displayed in Figure 11 by the see-through

circle, and is shown to occur at the same time (when the number of removals in the

epidemic is 1630.813) as when the number of infectives x(t) intersects with the line ρ.

Furthermore the epidemic has ended without all of the susceptible succumbing to

the infection and the infectives have been removed. Though it remains that 80% of the

population were removed in some way from the population.

Example: The case where x(0) < ρ.

In this example of a general deterministic epidemic a population will be considered

consisting of N = 5000 individuals. There are x(0) = 4500 susceptibles to begin with and

y(0) = 500 infectives. Taking ρ = 5000 satisfies the inequality x(0) < ρ, 4500 < 5000.

The general deterministic epidemic can be illustrated by Figure 12 on the next page.

38

Page 43: Epidemic Modelling

Figure 12: Showing the number of infectives and susceptibles in the epidemic as the

number of removals increases, in the case of x(0) < ρ.

In Figure 12 the number of infectives soon reaches zero, when there are z(t) = 2000

removals. In this example there are significantly more susceptibles remaining at the end

of the epidemic. When the number of infectives reaches zero, the number of susceptibles

remaining is x(t) = 3000.

The maximum number of infectives y(t) is given at the start of the infection as the

number of infectives only decreases.

Hence this epidemic has ended without all of the susceptibles succumbing to the in-

fection. 60% of susceptibles remain at the end of the epidemic.

Example: The case where x(0) = ρ.

In this general deterministic epidemic example, consider a population of N = 5000

individuals. There are x(0) = 4000 susceptibles to begin with and y(0) = 1000 infectives.

Taking ρ = 4000 satisfies x(0) = ρ. The general deterministic epidemic can be illustrated

by Figure 13 on the next page.

39

Page 44: Epidemic Modelling

Figure 13: Showing the number of infectives and susceptibles in the epidemic as the

number of removals increases, in the case of x(0) = ρ.

In Figure 13 the epidemic ends when there are z(t) ≈ 3250 removals. At this point

in time, when the infectives curve crosses the x-axis, there are x(t) ≈ 1750 susceptibles

remaining.

The maximum number of infectives is given at when x(t) = ρ, so when x(t) = 4000.

Since the number of infectives only decreases in this example, the maximum number of

infectives is given at the start of the epidemic.

This epidemic has also ended without all of the susceptibles becoming infected. 43.75%

of the population remains uninfected by the time that the epidemic ends.

Example: x(0) < ρ.

If x(0) < ρ, the number of infectives is at the maximum at the start of the epidemic,

as illustrated in Figure 12 and Figure 13. An illustration of such an epidemic is displayed

by Figure 14 on the next page.

40

Page 45: Epidemic Modelling

Figure 14: Demonstrating the course of a general deterministic epidemic with the

number of infectives greater than the relative removal rate, so x(0) < ρ.

In this example, the population consists of N = 16 individuals. Of the 16 individuals,

there are x(0) = 13 susceptibles and y(0) = 3 infectives at the start of the epidemic.

Furthermore, in this example, individuals are classified only as removals and are not

further classified as dead, immune and isolated individuals as the model does not consider

separate parameters for each of these sub-classifications.

During Phase 1 there are three infectives, two of the infectives are spreading the

infection to three susceptibles. By Phase 2, the three infectives in Phase 1 have been

removed from the population, but have spread the infection to three susceptibles.

By Phase 3, the final stage of the epidemic, all of the infectives have been removed

from the population, without infecting any more susceptibles. Hence at the end of the

epidemic there are six removals and ten susceptibles.

41

Page 46: Epidemic Modelling

This example of a simple deterministic epidemic could be compared to a real-life

situation as the removal parameter is clearly quite high; hence, in a real-life situation the

individuals in the population would have made efforts to isolate the infected individuals.

3.4 Approximate Solution

The approximate solution to the general deterministic model shows how many removals

are present in the epidemic as t→ ∞. So, it calculates how many individuals have been

removed from the epidemic as it ends.

The approximate solution is employed if x(0) is greater than ρ by a small amount.

Hence, for the approximate solution it will be assumed that x(0)−ρ ≈ 0 but also x(0)−ρ

is positive.

Sincedz

dt= γy(t), y(t) = N − x(t)− z(t) and x(t) = x(0) e−

z(t)ρ ,

dz

dt= γ

[N − x(0) e−

z(t)ρ − z(t)

]. (8)

Using the exponential approximation

e−u ≈ 1− u+1

2u2 +O(u3), (9)

where O(u3) is a small quantity of u3. Setting u =z(t)

ρ, it follows that

e−z(t)ρ ≈ 1− z(t)

ρ+z(t)2

ρ2.

The approximation is illustrated by the Figure 15 on the next page.

42

Page 47: Epidemic Modelling

Figure 15: A graph that demonstrates the comparison of the exponential function e−u

and the approximation given by 1− u+1

2u2.

Figure 15 displays a comparison of e−u and the approximation 1−u+ 12u2 from Equation

9. Curve A represents e−u and Curve B represents 1−u+ 12u2. Both curves are relatively

similar until u approaches a value of 1, and when u > 1 Curve B starts to get exponentially

larger and before u = 3 it cannot be seen in the graph. However, since ρ is usually greater

than z(t), which means thatz(t)

ρ< 1, the approximation is justified for use in the

equation.

Hence, Equation 8 becomes

dz

dt≈ γ

[N − x(0) +

z(t)x(0)

ρ− z(t)2x(0)

2ρ2− z(t)

]

≈ γ

[N − x(0) + z(t)

(x(0)

ρ− 1

)− z(t)2x(0)

2ρ2

].

This equation can be solved using substitution of variables multiple times. Choosing to

let

A =−x(0)

2ρ2,

43

Page 48: Epidemic Modelling

B =x(0)

ρ− 1,

and

C = N − x(0),

the differential equation can hence be written as

dz

dt≈ γ

[C +Bz(t) + Az(t)2

].

It follows that1

C +Bz(t) + Az(t)2dz ≈ γ dt,

then ∫ z

z=0

1

C +Bz(t) + Az(t)2dz ≈

∫ t

t=0

γ dt. (10)

If 4ac− b2 < 0, then the following is true∫1

ax2 + bx+ c= − 2√

b2 − 4actanh− 1

[2ax+ b√b2 − 4ac

].

Using the variables A,B and C that were substituted before, this can be applied to

Equation 10 by letting A = a, B = b and C = c. It follows that

4AC −B2 = 4

(−x(0)

2ρ2

)(N − x(0)

)−(x(0)

ρ− 1

)2

=2

ρ2

(−x(0)

2ρ2

)(N − x(0)

)−(x(0)

ρ− 1

)2

=2x(0)2

ρ2− 2x(0)N

ρ2− x(0)2

ρ2+

2x(0)

ρ− 1

=x(0)2

ρ2− 2x(0)N

ρ2+

2x(0)

ρ− 1

=

(x(0)2

ρ2− 1

)+

(2x(0)

ρ− 2x(0)N

ρ2

).

44

Page 49: Epidemic Modelling

By then letting

θ1 =

(x(0)2

ρ2− 1

),

and

θ2 =

(2x(0)

ρ− 2x(0)N

ρ2

).

As x(0) < N and ρ < x(0), clearly2x(0)

ρ<

2x(0)N

ρ2. Hence θ2 is negative.

Since x(0) > ρ, it follows that x(0)2 > ρ2 as x(0) ≥ 1 and x(0) is a positive integer. Hencex(0)2

ρ2− 1 ≈ 0 but is positive.

Finally, since θ2 is negative, θ1 is positive and |θ2| > |θ1| as θ1 ≈ 0 but positive and θ2 < 0,

evidently 4AC −B2 < 0.

Using the substitution of α =√B2 − 4AC,

α =

[2x(0)

ρ2

(N − x(0)

)+

(x(0)

ρ− 1

)2] 12

.

After integrating the right-hand-side, accordingly, Equation 10 then becomes

− 2

αtanh− 1

[2Az(t) +B

α

]+

2

αtanh− 1

[B

α

]≈ γt.

Using a final substitution for φ, where

φ = tanh− 1

[B

α

]

= tanh− 1

[1

α

(x(0)

ρ− 1

)].

It follows that

− tanh− 1

[2Az(t) +B

α

]≈ 1

2γαt− φ.

Taking the inverse of tanh, multiplying both sides of the equation by −1 and then rear-

ranging allows for2Az(t) +B

α≈ tanh

[φ− 1

2γαt

],

2Az(t) +B ≈ α tanh

[φ− 1

2γαt

],

45

Page 50: Epidemic Modelling

2Az(t) ≈ α tanh

[φ− 1

2γαt

]−B.

Hence

z(t) ≈ α

2Atanh

[φ− 1

2γαt

]− B

2A.

After substituting A,B and C back into z(t), it follows that

z(t) ≈ ρ2

x(0)

[x(0)

ρ− 1

]− αρ2

x(0)tanh

[φ− 1

2γαt

].

However, since

− tanh(x) = tanh(−x),

the approximate solution for z(t) is given by

z(t) ≈ ρ2

x(0)

(x(0)

ρ− 1

)+αρ2

x(0)tanh

[1

2γαt− φ

].

As t →∞, z(t) is designated as z∞, so

z∞ ≈ limt→∞

z(t)

≈ ρ2

x(0)

(x(0)

ρ− 1 + α

).

This is because as t → ∞,

αρ2

x(0)tanh

[1

2γαt− φ

]→ 1.

As α is given by

α =

[2x(0)

ρ

(N − x(0)) +

(x(0)

ρ− 1

)2] 12

,

this can be rewritten as

α =

[1

ρ2

[2x(0)

(N − x(0)

)+

(x(0)− ρ)2

)] 12

.

When 2x(0)[N − x(0)

]is much smaller than

(x(0)− ρ

)2, then

2x(0)[N − x(0)

]<<

(x(0)− ρ

)2,

46

Page 51: Epidemic Modelling

and x(0) > ρ, it follows that

α ≈ 1

ρ

[x(0)− ρ

]≈ x(0)

ρ− 1.

Hence

z∞ ≈ρ2

x(0)

[x(0)

ρ− 1 + α

]

≈ ρ2

x(0)

[x(0)

ρ− 1 +

x(0)

ρ− 1

]

≈ 2ρ

x(0)

(x(0)

ρ− 1

)].

Thus

z∞ ≈ 2ρ

[1− ρ

x(0)

].

The approximate solution for z∞ has been shown, and so the number of removals can be

calculated as t tends to infinity.

3.5 R Code

Code from the software package R was used to illustrate several figures in this section of

the project.

Figure 11

curve(5000-4800*exp(-x/2500)-x,0,4000,ylim=c(0,5000),xlab="z(t)",ylab="Number")curve(4800*exp(-x/2500),add=TRUE,lty=2)curve(2500+x*0,add=TRUE,lty=3)points(1630.813,2500,pch=19,cex=1.5)points(1630.813,869.187,pch=1,cex=1.5)lines(c(1630.813,1630.813),c(0,2500),lty=1)legend(3000,4000,c(expression(y(t)),expression(x(t)),expression(rho)),lty=c(1,2,3),bty="n")

Figure 15

curve(exp(-x),0,4,ylim=c(0,2),xlab="u",ylab="")curve(1-x+0.5*x^2,add=TRUE,lty=2)legend(3,1.3,c(expression(A),expression(B)),lty=c(1,2),bty="n")

47

Page 52: Epidemic Modelling

4 Simple Stochastic Epidemic

The simple stochastic model describes the evolution of a simple model in a stochastic

process.

The deterministic models revolve around a number of functions; for example, the

number of susceptibles in a population. However, the functions in these deterministic

models are continuous, so in the deterministic model it is possible to choose a random

point in time in the epidemic and have x(t) = 4.32 susceptibles. Yet it is not possible to

infect 0.32 individuals. The person has to be infected, or not infected. In contrast to the

deterministic epidemic models, the stochastic models in this report model the functions

included in the deterministic models in discrete time. Hence, the number of infectives or

susceptibles increases of decreases by an integer.

This is an epidemic where the population consists of only infectives and susceptibles.

The model will be in continuous time and, as before with the deterministic models, once

a susceptible is transferred from the susceptible state to the infective state, the individual

remains an infective for the duration of the epidemic. Furthermore, the simple stochastic

epidemic assumes that all individuals in the population mix homogeneously.

Hence, in many ways this simple epidemic is similar to the deterministic model. How-

ever, this model takes randomness into account whereas the deterministic model does

not.

It is a random time when an event occurs in a stochastic epidemic. Since the only

transferral of state in the simple stochastic epidemic is moving from susceptible to infec-

tive, this is the only event in this epidemic model.

When the event occurs, which is when an individual becomes infected, the number of

infectives increases by one. The increase will always be an integer, which is in contrast to

the simple deterministic model which measured the number of infectives in real numbers

instead of integers.

Multiple simulations of the simple stochastic epidemic will be run throughout this

chapter of the report. However since randomness is taken into account in this model, the

simulations will be unique, and this is also shown, accordingly. The corresponding graphs

48

Page 53: Epidemic Modelling

will also be present to show the path of the epidemics, and these relevant graphs will

contain show clearly when an event occurs by noticing an increase or decrease by one for

the number of infectives or susceptibles, respectively.

4.1 Notation for simple stochastic epidemics

This epidemic model introduces significantly different mathematics to that employed pre-

viously in the report. However, the notation will be kept relatively similar, if achievable,

to make clear comparisons to the deterministic models and maintain consistency.

Notation for simple stochastic epidemics:

• N : Initial number of susceptibles

• I: Initial number of infectives

• X(t): Number of susceptibles at time t

• Y (t): Number of infectives at time t

The total population for a simple stochastic epidemic is N + I; this is a closed integer,

which given by

X(t) + Y (t) = N + I. (11)

The initial conditions are X(0) = N and Y (0) = I, for all t ≥ 0. As before, the epidemic

must start with at least one infective, otherwise the infection would not be able to spread

through the population and there would be no epidemic at all; hence I ≥ 1.

Example: A simple stochastic process consisting of 17 individuals.

Considering a simple stochastic process consisting of N + I = 17 individuals, with

N = 16 and I = 1, Figure 16 on the next page shows how a stochastic process is modelled.

49

Page 54: Epidemic Modelling

Figure 16: A simple stochastic process showing how the number of infectives decreases

over time.

Figure 16 shows that the number of susceptibles starts to decrease slowly at first, then

towards the middle of the graph the number of susceptibles rapidly descends, and towards

the end of the epidemic the number of susceptibles, once again, decreases slowly. This

is similar to a simple deterministic epidemic, which was explained by the epidemic curve

being small at the start and end of the epidemic.

4.2 Markov chains

A Markov chain is a system that uses processes to transition from one state to another.

In terms of the simple stochastic epidemic, the transferral of state only has two options

with corresponding probabilities. First of all, the number of infectives can increase, which

50

Page 55: Epidemic Modelling

would move the Markov chain up to a higher state. The other possibility is that the

number of infectives stays the same, hence the Markov chain stays in the same state.

For more information on Markov Chains and Stochastic Processes, Isaacson and Mad-

sen (1976) and Hoel, Port and Stone (1972) extensively detail their properties and poten-

tial applications further than this report.

Example: Markov Chain.

A relatively simple Markov chain that consists of only four states is displayed in Figure

17 below

Figure 17: A Markov chain consisting of four states and relevant transitional

probabilities.

The four states A, B, C and D are represented by triangles and the arrows represent

the transitional probabilities. So in State A there is a probability of 0.3 of moving to

State B and a 0.7 probability of moving to State D.

If the Markov chain moves into State C, then it will stay in this state indefinitely as

there is a 100% chance of the Markov chain retaining its current state.

It is assumed that {(X, Y )(t) : T ≥ 0} is a homogeneous Markov chain, and that the

set of values the process can take are within the non-negative integers.

51

Page 56: Epidemic Modelling

Furthermore, 0 ≤ X(t) ≤ N as the number of susceptibles ranges between the starting

amount of susceptibles and zero. Hence, I ≤ Y (t) ≤ N + I as the number of infectives

ranges between the starting amount of infectives and the total population N + I.

A property of a continuous Markov chain is that events must occur one at a time.

Then for small δt:

1. Pr(X(t+ δt)−X(t) = 1) = βijδt+ o(δt).

2. Pr(X(t+ δt)−X(t) > 1) = o(δt).

3. Pr(X(t+ δt)−X(t) = 0) = 1− βij + o(δt).

Where, as before, β is the infection parameter. These probability equations can be defined

as follows:

1. The probability of one event occurring in the time frame δt is approximately equal

to βij.

2. The probability of more than one event occurring in the time frame δt is approxi-

mately equal to zero.

3. The probability of no events occurring in the time frame δt is approximately equal

to 1− βij.

In this simple stochastic epidemic, there are either two possible outcomes at each point

in time. First of all, an individual designated as susceptible can be infected, which then

causes them to become an infective. Hence, the number of susceptibles at time t decreases

by one and the number of infectives at time t increases by one. The other case yields zero

susceptibles being infected and so each individual stays in their current state. Thus the

following non-transitional probabilities occur after first letting

U(t) = (X(t), Y (t)),

then

Pr{U(t+ δt) = (i− 1, j + 1) | U(t) = (i, j)} = βijδt+ o(δt),

52

Page 57: Epidemic Modelling

Pr{U(t+ δt) = (i, j) | U(t) = (i, j)} = 1− βijδt+ o(δt).

These equations are defined for for 0 ≤ i ≤ N and j = N + I − i, where i, j are the

number of susceptibles and infectives, respectively.

The maximum number that can be achieved by infectives or susceptibles is N +I, and

only the number of infectives can reach this figure as at least one individual is initially

infected. At this point, when the number of infectives reaches N + I, this is when the

epidemic ends. Hence, U(t) = (0, N + I) is an Absorbing State.

An absorbing state is a state in a Markov chain which causes the Markov chain to

remain in that state indefinitely. Figure 18 illustrates a Markov chain with an absorbing

state

Figure 18: A Markov chain with five states, two of which are absorbing states.

In Figure 18, State E is clearly an absorbing state as there is a 100% chance that the

Markov chain will remain in State E for each transition. Hence it will remain in State E

indefinitely.

This illustration can be compared to a simple stochastic epidemic. Each state rep-

resenting the number of infectives (A = 1, B = 2, ..., E = 5), with the probabilities of

infecting others increasing as the proportion of infectives in the total population increases.

The absorbing state for a simple stochastic epidemic will be the state where the total

population consists of only infectives, and no susceptibles. Hence, U(t) = (0, N + I) is

an absorbing state.

53

Page 58: Epidemic Modelling

4.3 Randomness in stochastic models

Example: Using R to calculate a simple stochastic epidemic.

A simple stochastic epidemic takes randomness into account when determining the

path of a random walk. Using R, the random walk can be calculated by defining the

relevant variables. The path of an epidemic consisting of N + I = 25 individuals, N = 24

initial susceptibles and I = 1 initial infectives, along with an infection parameter of

β = 0.04 is illustrated in Table 4.

Time = t X(t) Y(t) Time = t X(t) Y(t)

2.51 23 2 4.58 11 14

2.545 22 3 4.64 10 15

2.547 21 4 4.83 9 16

2.98 20 5 4.94 8 17

3.27 19 6 5.07 7 18

3.39 18 7 5.55 6 19

3.56 17 8 5.67 5 20

4.13 16 9 5.710 4 21

4.19 15 10 5.712 3 22

4.31 14 11 5.99 2 23

4.42 13 12 6.36 1 24

4.49 12 13 7.24 0 25

Table 4: Table illustrating the length of time between the epidemic infecting people

individually.

As illustrated by Table 4, the simple stochastic epidemic epidemic lasts for t = 7.24

days. With an initial 24 susceptibles and one infective, along with an infection parameter

of β = 0.04, the simple deterministic model calculates that the epidemic lasts for t = 6.36

days. Yet the simple stochastic model calculates that the epidemic lasts for t = 7.24 days.

This is because the simple stochastic model takes randomness into account, unlike the

simple deterministic model.

54

Page 59: Epidemic Modelling

The simple stochastic epidemic outlined in Table 4 is illustrated as a graph in Figure

19 below.

Figure 19: Graph for the simple stochastic epidemic outlined in Table 4.

The vertical dotted lines represent the jump from one integer to the next. As expected,

it takes longest for the first susceptible and the last susceptible to become infectives.

It is possible to see from the graph how long the epidemic lasts, and the length in

time it takes for susceptibles to become infectives. Figure 19 complies with Table 4; the

simple stochastic epidemic lasts for t = 7.24.

Example: Randomness in stochastic models.

As the simple deterministic model takes randomness into account, calculating the

epidemic again will yield different results. To show this, an epidemic will be calculated

in R with exactly the same variables.

Considering an epidemic consisting of five susceptibles and one infective initially, with

an infection parameter of β = 16, Table 5 shows how randomness effects the calculation.

55

Page 60: Epidemic Modelling

X(t) Y(t) tA tB

4 2 2.9575 1.3987

3 3 3.2118 2.5083

2 4 3.5739 2.7128

1 5 4.8013 4.6888

0 6 9.7923 5.5641

Table 5: Table illustrating randomness in stochastic models through identical variables

being run through simulations.

Using identical variables and running the relevant R simulations yields different results

for multiple simulations, as shown in Table 4. In this case, tA is the time taken from

the start of the epidemic to the particular increment for population group A, and tB is

similarly for group B.

Table 5 shows that group A takes significantly longer for the epidemic to cease, and

significantly longer for the infection to start spreading, than group B. However, the main

difference in time between the groups is due to the final infective in group A taking such

a long time to become infected.

With a larger population, it is likely that the time taken for the epidemics to cease

would be closer. Running two more simulations consisting of 199 susceptibles and one

infective initially, and an infection parameter of β = 0.005, the simulated times for the

end of the epidemics are 9.76 and 8.40.

4.4 R Code

Code from the software package R was used to illustrate several figures in this section of

the project.

Table 4

This code was used to generate the relevant data for Table 4 in R.

56

Page 61: Epidemic Modelling

nn=24; deltat=0.0001; beta=0.04y=1; x=nn; tt=0while (x>0) {tt=tt+deltatpxy=beta*x*y*deltatk=sample(c(1,2),1,prob=c(pxy,1-pxy))if (k == 1) {x=x-1; y=y+1}if (k != 2) cat(tt,x,y,"n")}

Figure 19

beta=0.04; nn=24; y=1; x=nn; tt=0tevent=numeric(0)kevent=numeric(0)while(x>0){pxy=beta*x*y; lambda=pxy; u=rexp(1,lambda)tt=tt+uk=sample(c(1),1,prob=c(pxy))if (k == 1){x=x-1; y=y+1}if (k != 2) cat(tt,x,y,"n")tevent=c(tevent,tt)kevent=c(kevent,k)}plot(0,0,type="n",xlim=c(0,tt),ylim=c(0,28),xlab="Time t",ylab="Number")legend(0,29,c(expression(X(t)),expression(Y(t))),lty=c(1,2),bty="n")lty=(c(1,2),bty="n")n=length(tevent)xx=nn; yy=1lines(c(0,tevent[1]),c(xx,xx),lty=1)lines(c(0,tevent[1]),c(yy,yy),lty=2)for (i in 1:n){if (kevent[i] == 1){lines(c(tevent[i],tevent[i]),c(xx,xx-1),lty=3);xx=xx-1lines(c(tevent[i],tevent[i]),c(yy,yy+1),lty=3);yy=yy+1}if (kevent[i] == 2){lines(c(tevent[i],tevent[i]),c(yy,yy-1),lty=3);yy=yy-1}if (i != n){lines(c(tevent[i],tevent[i+1]),c(xx,xx),lty=1)lines(c(tevent[i],tevent[i+1]),c(yy,yy),lty=2)}}

57

Page 62: Epidemic Modelling

5 General Stochastic Epidemic

The general stochastic model is an epidemic where the population consists of infectives,

susceptibles and removals. This model will be in continuous time, along with the simple

stochastic model, and assumes that all individuals in the population mix homogeneously.

Infectives can be removed from the total population in this model, as with the gen-

eral deterministic epidemic; such individuals are called removals. Once an individual is

removed from the total population, that individual is removed for the duration of the

epidemic. Individuals can be removed from the epidemic through death, isolation and

immunity.

The general stochastic epidemic is very similar to the general deterministic epidemic,

though this model takes randomness into account.

It is a random time when an event occurs in a stochastic epidemic. The number of

infectives can increase (by a susceptible succumbing to the infection) or decrease (by an

infective being removed from the population group) in the general stochastic epidemic

model, so there are multiple ways for the epidemic to end.

The increase or decrease will always be by an integer of one, though the difference in

time between each event occurring will vary.

Multiple simulations of the general stochastic epidemic will be run throughout this

chapter of the report. However since randomness is taken into account in this model, the

simulations will be unique, and this is also shown, accordingly.

This chapter mainly uses mathematics applied from Daley and Gani (1999, p66-67)

but with the content applied in significantly more detail.

5.1 Notation for general stochastic epidemics

This epidemic model introduces mathematics similar to that employed in the simple

stochastic model. But the mathematics used in the general deterministic model is rela-

tively different, even though both models include removals. However, the notation will be

kept relatively similar, if possible, in order to make valid comparisons to the deterministic

model and maintain consistency.

58

Page 63: Epidemic Modelling

Notation for general stochastic epidemics:

• N : Initial number of susceptibles

• I: Initial number of infectives

• X(t): Number of susceptibles at time t

• Y (t): Number of infectives at time t

• Z(t): Number of removals at time t

Hence the general stochastic epidemic uses similar notation to the simple stochastic epi-

demic, albeit with the inclusion of removals. The total population for the general stochas-

tic epidemic is given as N + I as there are no removals at the start of the epidemic. The

total population N + I is a closed integer, and is given by

X(t) + Y (t) + Z(t) = N + I (12)

The epidemic must start with at least one infective, otherwise there would be no epidemic

to begin with as the infection could not spread. Furthermore, it is assumed that there

are no removals to start with, as including a removal to start is impractical in this model.

Hence the initial conditions are X(0) = N , Y (0) = I and Z(0) = 0, and I ≥ 1, for all

t ≥ 0.

5.2 Markov Chains

For the general stochastic epidemic, a Markov chain has multiple options in terms of state

transferral and corresponding probabilities.

The number of infectives could increase by one, which would move the Markov chain

to one state higher, with probability pi. The number of infectives could stay the same,

so the Markov chain would retain its place in the same state, with probability qi. Or the

number of infectives could increase by one, which would move the Markov chain to one

state lower, with probability ri. This applies for any number of processes i = 1, 2, 3, ...

where i is a non-negative integer.

59

Page 64: Epidemic Modelling

Information on the fundamentals of Markov Chains and their appropriate properties

can be found in Isaacson and Madsen (1976) and Hoel, Port and Stone (1972), as well as

the web article from Ephraim and Mark [6].

Example: General stochastic Markov chain.

A Markov chain representing a general stochastic epidemic model could look like Figure

20 below.

Figure 20: A Markov chain representing a general stochastic epidemic, with

corresponding transitional probabilities.

Each state in Figure 20 represents the number of infectives in the total population. As

the number of infectives increases, pi will become larger as there will be more chance of

infectives spreading the infection to susceptibles. Though towards the end of the epidemic

pi will decrease.

Figure 20 shows only six states, though the Markov chain could be representative of

a very high number of individuals; there could be 500,000 individuals in a population

group, or even more.

State 0 is clearly an absorbing state. When there are no infectives in the population

there can be no epidemic and, as such, the Markov chain will remain in State 0 indefinitely.

This example is based on a similar example from the web article by Iglesia [5]. This

article explains transitional probabilities in more detail and is the inspiration for Figure

20 and Figure 21.

Figure 21 shows a potential path for a Markov chain if a general stochastic epidemic

starts with one infective. This is illustrated on the next page.

60

Page 65: Epidemic Modelling

Figure 21: The path of a general stochastic epidemic.

Figure 21 shows how the number of infectives continues to increase as a result of the

stochastic process. The number of infectives peaks at Y (t) = 7, which is when t = T12.

Tx is the measured time unit, and though this graph shows the difference in time between

each transition to be the same, this is not the case in an actual epidemic. Hence

T2 − T1 6= T3 − T2.

It is assumed that {(X, Y )(t) : t ≥ 0} is a bivariate Markov process. The infection

spreads at a rate of βijδt for infection parameter β and infectives are removed from the

total population at a rate of γjδt for removal parameter γ.

In a general stochastic epidemic, there are three possible outcomes at each point in

time:

1. First of all, an individual designated as a susceptible can be infected, which then

causes them to become an infective. Hence, the number of susceptibles at time

61

Page 66: Epidemic Modelling

t decreases by one and the number of infectives at time t increases by one. The

number of removals does not change.

2. The next case is when an infective is removed from the population. Hence, the

number of infectives in the population is reduced by one and the number of removals

increases by one. The number of susceptibles does not change.

3. The final case is when there are no susceptibles being infected as well as no infectives

being removed from the population. Hence the Markov chain does not change.

Thus the following non-transitional probabilities occur after again letting

U(t) = (X(t), Y (t)),

then

Pr{U(t+ δt) = (i− 1, j + 1) | U(t) = (i, j)} = βijδt+ o(δt),

Pr{U(t+ δt) = (i, j − 1) | U(t) = (i, j)} = γjδt+ o(δt),

Pr{U(t+ δt) = (i, j) | U(t) = (i, j)} = 1− (βi+ γ)jδt− o(δt).

There are multiple absorbing states for the general stochastic epidemic. The two possible

final outcomes are:

1. All of the susceptibles in the total population become infected, hence the epidemic

ends with everybody as an infective or a removal. Thus, when X(t) = 0 and

Y (t) = N + I − Z(t).

2. All of the infectives in the epidemic are removed from the population. Thus, when

Y (t) = 0 and X(t) = N + I − Z(t).

5.3 Modelling the general stochastic epidemic

Example: Using R to calculate a general stochastic epidemic.

As with the simple stochastic epidemic, the general stochastic epidemic determines

the path of a random walk but takes randomness into account when doing so.

62

Page 67: Epidemic Modelling

In order to compare the general stochastic epidemic to the general deterministic epi-

demic, this example will consider variables that are the same as an example used in the

general deterministic epidemic section of this report.

Considering a total population of N + I = 5000 individuals. The population starts

with X(0) = 4800 susceptibles and Y (0) = 200 infectives. Furthermore, the epidemic has

an infection parameter of β = 0.0002 and a removal rate of γ = 0.5.

The example used in the general deterministic epidemic requires x(0) > ρ. In this

example the initial number of infectives is 4800 and

ρ =γ

β=

0.5

0.0002= 2500.

Hence the parameters are in compliance with the requirements for the deterministic epi-

demic example.

The general deterministic epidemic can be illustrated by the graph below.

Figure 22: Showing the number of infectives and susceptibles in the general

deterministic epidemic as the number of removals increases, in the case of x(0) > ρ.

The general deterministic model shows that the epidemic ceases as the number of

63

Page 68: Epidemic Modelling

removals reaches 4000. The general stochastic model is illustrated by Figure 23 and

compared with Figure 22 below.

Figure 23: Showing the number of infectives and susceptibles in the general stochastic

epidemic.

Figure 22 is a function of the number of removals z(t), whereas Figure 23 is a function

of time t. Even though the graphs look slightly different, this is due to the x-axis being

different.

Though a total of 4000 individuals in the population were infected at some point in

time, there maximum number of infectives at any given time was 1000. This occurred at

around t = 7 days.

However, it is possible to see that in both graphs, the number of susceptibles at the

end of the epidemic is 1000. Hence there are 4000 removals in the epidemic. Thus,

X(T1) = 1000, Y (T1) = 0 and Z(T1) = 4000, where T1 is the time that the epidemic ends.

In this case of this example, T1 ≈ 40.

This is a very large population size and, as such, it is very difficult to see the transitions

in the Markov process. Figure 24 provides a close up of the general stochastic epidemic.

64

Page 69: Epidemic Modelling

Figure 24: The start of the general stochastic epidemic example with restricted axis.

With a restricted x-axis that now ranges from 0 to 0.5 and a y-axis that ranges from

200 to 235, this makes it significantly easier to see the transitional steps in the Markov

chain and identify where the process is at in 0 ≤ t ≤ 0.5.

In under half a day (t = 0.5), the number of infectives has increased to 235 and

continues to grow. There are multiple points in Figure 24 where it is possible to see the

infectives being removed from the epidemic; where the number of infectives decreases.

Example: Running multiple simulations.

Figure 23 is just one simulation run from the variables stated before. Running the

simulation multiple times shows how randomness is present in the stochastic general

deterministic epidemic model. As illustrated in Table 6 on the next page.

65

Page 70: Epidemic Modelling

Simulation T1 Z(T1)

1 28.63 4003

2 36.80 4006

3 28.14 4154

4 31.57 4006

5 29.45 4183

Table 6: Table comparing simulations that have the same variables from the example.

Table 6 shows that Figure 23 lasts significantly longer than the other simulations run.

However, the number of removals in the population is always approximately equal to 4000.

Furthermore, the number of infectives is always zero at the end of the epidemic in each

simulation.

5.4 R Code

Code from the software package R was used to illustrate several figures in this section of

the project.

Figure 23

beta=(1/5000); gamma=0.5; nn=4800; y=200; x=nn; z=0; tt=0tevent=numeric(0)kevent=numeric(0)while ((x>0)&(y>0)){pxy=beta*x*y; pyz=gamma*y; lambda=pxy+pyz; u=rexp(1,lambda)tt=tt+uk=sample(c(1,2),1,prob=c(pxy,pyz))if (k == 1){x=x-1; y=y+1}if (k == 2){y=y-1; z=z+1}tevent=c(tevent,tt)kevent=c(kevent,k)}

plot(0,0,type="n",xlim=c(0,tt),ylim=c(0,5000),xlab="Time t",ylab="Number")legend(13,4000,c("Number of susceptibles X(t)", "Number of infectives Y(t)"),lty=c(1,2),bty="n")n=length(tevent)xx=nn; yy=200lines(c(0,tevent[1]),c(xx,xx),lty=1)lines(c(0,tevent[1]),c(yy,yy),lty=2)

66

Page 71: Epidemic Modelling

for (i in 1:n){if (kevent[i] == 1){lines(c(tevent[i],tevent[i]),c(xx,xx-1),lty=3); xx=xx-1lines(c(tevent[i],tevent[i]),c(yy,yy+1),lty=3); yy=yy+1}if (kevent[i] == 2){lines(c(tevent[i],tevent[i]),c(yy,yy-1),lty=3); yy=yy-1}if (i != n){lines(c(tevent[i],tevent[i+1]),c(xx,xx),lty=1)lines(c(tevent[i],tevent[i+1]),c(yy,yy),lty=2)}}

Table 6

The following code was run in R to produce the simulated data present in Table 6.

nn=4800; deltat=0.0001; beta=(1/5000); gamma=0.5y=200; x=nn; z=0; tt=0while ((x>0)&(y>0)){tt=tt+deltatpxy=beta*x*y*deltatpyz=gamma*y*deltatk=sample(c(1,2,3),1,prob=c(pxy,pyz,1-pxy-pyz))if (k == 1) {x=x-1; y=y+1}if (k == 2) {y=y-1; z=z+1}if (k != 3) cat(tt,x,y,z,"n")}

67

Page 72: Epidemic Modelling

6 Discussion

This chapter of the report discusses an overview of the report and considers potential

directions the project could have taken, given more time.

The majority of the epidemic models considered in this project touch upon more

more complex models in Epidemiology. Though the simple and general models in the

deterministic and stochastic approaches give great insight on how epidemic models func-

tion, it is relatively difficult to employ them in real-life situations. Human behaviour is

a highly complex attribute, and it seems that the majority of models fail to take into

account changing patterns and appropriate actions or views that would be taken in the

event of an epidemic. Complex models that use multiple changing variables to model

human behaviour as well as the variables for the properties of the infection should fit

more appropriate epidemic models with realistic paths and outcomes.

6.1 Simple models

In regards to the simple deterministic epidemic, the epidemic curve and its properties

allowed for the report to go into great detail in its qualities, mathematics and the potential

effects to population groups.

When evaluating the simple models, it becomes clear that the application to real-life

situations is relatively difficult. A real-life application would require an infection that has:

• Zero symptoms, otherwise the individuals in the population would attempt to stop

the infection spreading, which is not in compliance with how the individuals in the

population mixing homogeneously.

• A group with individuals that remained only with each other, otherwise the popu-

lation would not be closed.

• No possible way to cure the disease. If the disease was curable then infectives would

be removed from the population by developing immunity.

Hence, the general models are more relevant to real-life situations - albeit only slightly

more relevant.

68

Page 73: Epidemic Modelling

However, a potential direction the project could have taken would be to explain how

a population consisting of multiple different groups would be modelled. This direction

would have allowed for comparisons to real-life situations such as a classroom or an office

environment.

6.2 General models

Though the general models epidemic take into account removals in a population experi-

encing an epidemic, it remains difficult to input these models into a real-life population

where an infection is present that has noticeable symptoms. The possibilities for removed

individuals in this epidemic are that:

1. They are killed as a result of the infection. However, in the case that an epidemic

is lethal enough that it can cause death, it seems likely that an immediate effort to

contain the infection is the most appropriate cause of action. This would lead the

population to isolate any suspected individuals away from those deemed healthy.

2. Isolating infectives from the general population is a sensible action. However, in

the general deterministic epidemic, individuals are removed from the epidemic at a

fixed rate with a few individuals removed at a time. Yet it makes more sense to

remove large majorities of infectives at key points in time to restrict the spread of

infection. This would require adjusted infection and removal parameters at these

key points in time.

3. Immunity is an outcome that could potentially be treated as isolation.

(a) In the event that there is a cure for the infection, then it makes more sense to

cure large majorities of infectives at key points in time to restrict the spread

of infection. This is in contrast to curing a consistently small amount of indi-

viduals.

(b) In the event that there is no medical cure for the infection and that individuals

can only recover over time, then a consistently small amount of individuals

developing immunity seems likely.

69

Page 74: Epidemic Modelling

Hence, consideration and development of these factors would allow the deterministic

models to be implemented more effectively in real-life occurrences.

Furthermore, including different removal parameters for the sub-classifications dead,

isolated and immune would allow for adjustment of the general epidemic models according

to how advanced a group of individuals are. Designating:

• γ1 = Death Removal Parameter

• γ2 = Isolation Removal Parameter

• γ3 = Immunity Removal Parameter

Hence, an epidemic occurring in an advanced society would have strong health care

and γ1 may be relatively low. For the same reasons, γ2 and γ3 may be relatively high.

Given more time to complete the project, the report could look into detailing the

mathematics of the general deterministic model by attempting to locate the origin of the

infection. This would involve looking at the epidemic as a negative function of time and

trace the epidemic to the alpha infective if the epidemic started with multiple infectives.

6.3 Other models

This project investigated the simple and general models using the deterministic and

stochastic approaches to Epidemiology. However, there are many other models that can

be employed to effectively model populations experiencing an epidemic.

Rumour models could be considered in this project. Rumour models classify individ-

uals as ignorants, spreaders and stiflers instead of susceptibles, infectives and removals,

respectively. However, when the spreaders ’infect’ an ignorant, the ignorant individual im-

mediately becomes either a spreader or a stifler. A rumour model is similar to a stochastic

model, yet offers a different approach to Epidemiology. Thus, with more time, a rumour

model could be another epidemic model investigated in this project.

As stated before, one main issue with the models in this report is the lack of depth

into complex human behaviour taken into account. Hence, given more time, the report

could investigate such models.

70

Page 75: Epidemic Modelling

References

[1] Brauer, F., van den Driessche, P. and Wu, J. (1945) Mathematical Epidemiology:

Mathematical Biosciences Subseries. Springer.

[2] Daley, D.J. and Gani, J. (1999) Epidemic Modelling: An Introduction. Cambridge

University Press.

[3] Hoel, P.G., Port, S.C. and Stone, C.J. (1972) Introduction to Stochastic Processes.

Houghton Mifflin.

[4] Internet article. Accessed 2nd November 2013.

http://people.brandeis.edu/~igusa/Math56aS08/Math56a_S08_notes002.pdf

[5] Internet article. Accessed 23rd November 2013.

http://cims.nyu.edu/~mdi29/OPSFA11.pdf

[6] Internet article. Accessed 30th November 2013.

http://teal.gmu.edu/~yephraim/Papers/sig-043.pdf

[7] Isaacson, D.L. and Madsen, R.W. (1976) Markov Chains, Theory and Applications.

Wiley.

[8] Kermack, W.O. and McKendrick, A.G. (1927) A Contribution to the Mathematical

Theory of Epidemics.

[9] R Development Core Team (2011). R: A language and environment for statisti-

cal computing. R Foundation for Statistical Computing, Vienna, Austria. ISBN 3

- 900051 - 07 - 0, URL http://www.R-project.org/.

[10] Trottier, H. and Philippe, P. (2001) Deterministic Modelling of infection diseases.

71


Recommended