Slides. - Mathematics - University of Kentucky

A&S 320: Mathematical Modeling in Biology
David Murrugarra
Department of Mathematics,
University of Kentucky
http://www.ms.uky.edu/~dmu228/AS320/
Spring 2016
David Murrugarra (University of Kentucky)
A&S 320: Section 7.1-7.2
Spring 2016
1 / 21
Difference Equations
If there is a matrix A such that x1 = Ax0 , x2 = Ax1 , and, in general,
xk +1 = Axk for k = 0, 1, 2, . . .
(1)
then Eq 1 is called a linear difference equation (or recurrent relation).
A subject of interest to demographers is the movement of populations
or group of people from one region to another.
David Murrugarra (University of Kentucky)
A&S 320: Section 7.1-7.2
Spring 2016
2 / 21
Difference Equations
The simple model here considers the changes in the population of a
certain city and its surrounding suburbs over a period of years.
Fix an initial year–say 2016– and denote the population of the city and
suburbs of that year by r0 and s0 , respectively.
Let x0 be the population vector
r
city population in 2016.
x0 = 0
s0 suburb population in 2016
For 2017 and subsequent years, denote the populations of the city and
suburbs by the by the vectors
r1
r
x1 =
, x2 = 2 , . . .
s1
s2
David Murrugarra (University of Kentucky)
A&S 320: Section 7.1-7.2
Spring 2016
3 / 21
Difference Equations
Our goal is to describe mathematically how these vectors might be
related. Suppose demographic studies show that each year about 5%
of the city’s population moves to the suburbs (95% remains in the city),
while 3% of the suburban population move to the city (and 97%
remains in the suburbs).
.03
.95
City
Suburbs
.97
.05
Figure: Migration between city and suburbs.
David Murrugarra (University of Kentucky)
A&S 320: Section 7.1-7.2
Spring 2016
4 / 21
Difference Equations
After a year, the original r0 persons in the city are now distributed
between city and suburbs as
.95 remain in the city
.95r0
= r0
.05r0
.05 move to suburb
(2)
The s0 persons in the suburbs in 2016 are distributed 1 year later as
0.03s0
0.03
move to city
= s0
(3)
0.97s0
0.97 remain in suburb
Vectors in Eq 2 and Eq 3 account for all population in 2017.
David Murrugarra (University of Kentucky)
A&S 320: Section 7.1-7.2
Spring 2016
5 / 21
Difference Equations
Thus (ignoring births, deaths, migration into and out of the
city/suburban region)
.95
.03
.95 .03 r0
r
+ s0
=
x1 = 1 = r0
s1
.05
.97
.05 .97 s0
That is,
x1 = Mx0
(4)
where M is the migration matrix determined by
.95 .03
M=
.05 .97
Eq 4 describes how the population changes from 2016 to 2017.
David Murrugarra (University of Kentucky)
A&S 320: Section 7.1-7.2
Spring 2016
6 / 21
Difference Equations
If the migration percentages remain constant, then the change from
2017 to 2018 is given by
x2 = Mx1
and similarly from 2018 to 2019 and subsequent years. In general,
xk +1 = Mxk for k = 0, 1, 2, . . .
(5)
The sequence of vectors {x0 , x1 , x2 , . . . } describes the population of
the city/suburban region over a period of years.
David Murrugarra (University of Kentucky)
A&S 320: Section 7.1-7.2
Spring 2016
7 / 21
Difference Equations
Example
The annual migration between these two parts of the metropolitan
region is governed by the migration matrix,
.95 .03
M=
.05 .97
Compute the population of the region for the years 2017 and 2018,
given that population in 2016 was 600,000 in the city and 400,000 in
the suburbs.
600, 000
x0 =
400, 000
David Murrugarra (University of Kentucky)
A&S 320: Section 7.1-7.2
Spring 2016
8 / 21
Stochastic Matrix
Definition
r
Consider a nonnegative vector x = 0 such that r0 + s0 = 1. Then x
s0
is called a probability vector.
Definition
A stochastic matrix is a square matrix whose columns are probability
vectors.
Example
.95 .03
M=
.05 .97
David Murrugarra (University of Kentucky)
A&S 320: Section 7.1-7.2
Spring 2016
9 / 21
Markov Chains
Definition
A Markov Chain is a sequence of probability vectors x0 , x1 , x2 , . . . ,
together with a stochastic matrix P such that
x1 = Px0 , x2 = Px1 , and, in general,
xk +1 = Pxk for k = 0, 1, 2, . . .
(6)
Eq 6 is called a first order linear difference equation.
David Murrugarra (University of Kentucky)
A&S 320: Section 7.1-7.2
Spring 2016
10 / 21
Markov Chains
Example
Suppose demographic studies show that each year about 5% of the
city’s population moves to the suburbs (95% remains in the city), while
3% of the suburban population move to the city (and 97% remains in
the suburbs).
.03
.95
City
Suburbs
.97
.05
Figure: Migration between city and suburbs.
David Murrugarra (University of Kentucky)
A&S 320: Section 7.1-7.2
Spring 2016
11 / 21
Markov Chains
Example
The annual migration between these two parts of the metropolitan
region is governed by the migration matrix,
.95 .03
M=
.05 .97
Compute the distribution of population of the region just described for
the years 2017 and 2018, given that population in 2016 was 600,000 in
the city and 400,000 in the suburbs.
600, 000
x0 =
400, 000
David Murrugarra (University of Kentucky)
A&S 320: Section 7.1-7.2
Spring 2016
12 / 21
Markov Chains
Example
Initial distribution of the population
.60
x0 =
.40
The following equation describes how the population distribution
changes from 2016 to 2017.
.95 .03 .60
.582
=
x1 = Mx0 =
.05 .97 .40
.418
and the change from 2017 to 2018 is given by
.95 .03 .582
0.5654
x2 = Mx1 =
=
.05 .97 .418
0.4346
David Murrugarra (University of Kentucky)
A&S 320: Section 7.1-7.2
(7)
(8)
Spring 2016
13 / 21
Predicting the Distant Future
What happens to the system as time passes?
Example
.95
x3 = Mx2 =
.05
.95
x4 = Mx3 =
.05
.95
x5 = Mx4 =
.05
David Murrugarra (University of Kentucky)
0.5654
0.5502
=
0.4346
0.4498
.03 0.5502
0.5362
=
.97 0.4498
0.4638
.03 0.5362
0.5233
=
.97 0.4638
0.4767
.03
.97
A&S 320: Section 7.1-7.2
Spring 2016
14 / 21
Steady State Vectors
Definition
If P is a stochastic matrix, then a steady state vector (or equilibrium
vector) for P is a probability vector q such that
Pq = q
Example
.6 .2
0.3
and q =
. Is q a steady-state vector for P?
Let P =
.4 .8
0.7
David Murrugarra (University of Kentucky)
A&S 320: Section 7.1-7.2
Spring 2016
15 / 21
Steady State Vectors
Definition
If P is a stochastic matrix, then a steady state vector (or equilibrium
vector) for P is a probability vector q such that
Pq = q
Example
0.3
.6 .2
Let P =
and q =
. Is q a steady-state vector for P?
.4 .8
0.7
No! Because,
.6 .2 0.3
0.32
Pq =
=
6= q
.4 .8 0.7
0.68
David Murrugarra (University of Kentucky)
A&S 320: Section 7.1-7.2
Spring 2016
16 / 21
Steady State Vectors
Definition
If P is a stochastic matrix, then we say that P is regular if some matrix
power P k contains only strictly positive entries.
Example
M=
David Murrugarra (University of Kentucky)
.95 .03
.05 .97
A&S 320: Section 7.1-7.2
Spring 2016
17 / 21
Steady State Vectors
Theorem
If P is an n × n regular stochastic matrix, then P has a unique steady
state vector q. Further, if x0 is any initial state and xk +1 = Pxk for
k = 0, 1, 2, . . . then the Markov Chain {xk } converges to q as k → ∞.
David Murrugarra (University of Kentucky)
A&S 320: Section 7.1-7.2
Spring 2016
18 / 21
Steady State Vectors
Example
Let P =
.95 .03
. Find a steady state vector for P.
.05 .97
David Murrugarra (University of Kentucky)
A&S 320: Section 7.1-7.2
Spring 2016
19 / 21
Steady State Vectors
Example
3/8
0.375
=
is a steady state vector for
5/8
0.625
the population migration matrix M because,
0.375
.95 .03 0.375
q = Mq =
=
.05 .97 0.625
0.625
The probability vector q =
David Murrugarra (University of Kentucky)
A&S 320: Section 7.1-7.2
Spring 2016
20 / 21
Practice Problems
1
Suppose the residents of a metropolitan region move according to
the probabilities in the migration matrix,
.95 .03
M=
.05 .97
and a resident is chosen at random. Then the state of a vector for
a certain year may be interpreted as giving the probabilities that
the person is a city resident or a suburban resident at that time.
1
.
0
What is the likelihood that the person will live in the suburbs next
year?
(b) What is the likelihood that the person will be living in the suburbs in
two years?
(a) Suppose the person chosen is a city resident now, so that x0 =
2
What percentage of the population will live in the suburbs after
many years?
David Murrugarra (University of Kentucky)
A&S 320: Section 7.1-7.2
Spring 2016
21 / 21