Excel Definitions

259 Lecture 7 Spring 2017
Population Models in Excel
Toads Again!




Let’s look at the toad data
again, but this time let n be
the number of years after
1939 and x(n) be the area
covered by toads at year n.
Using Excel, we find that the
best-fit exponential function
for this data is
x(n) = 36449e0.0779n for n≥0.
We can think of this function
as a recurrence relation with
x(0) = 36449
x(n) = f(x(n-1)) for n≥1,
for some function f(x)!
Years after 1939
Area(km^2)
0
32800
5
55800
10
73600
15
138000
20
202000
25
257000
30
301000
35
584000
2
Toads Again! (cont.)
 Let’s find f(x).
 To do so, look at x(n) – x(n-1):
 x(n) – x(n-1)
= 36449e0.0779n - 36449e0.0779(n-1)
= 36449e0.0779(n-1)(e0.0779 – 1)
= (e0.0779 – 1)*x(n-1)
 Solving for x(n), we see that
 x(n) = x(n-1)+(e0.0779 -1)*x(n-1) =
= e0.0779 *x(n-1), so our function is
f(x) = e0.0779 *x!!
3
Toads Again! (cont.)
 Thus, the toad growth can be
modeled with the recurrence relation
x(0) = 36449
x(n) = e0.0779 *x(n-1) for n ≥ 1.
 The closed form solution is given by
our original model!
 For this model, the growth of the toad
population is exponential (no
surprise…)
4
Toads Again! (cont.)
 So how realistic is an exponential growth
model for the toad population?
 For such a model, the population grows
without bound, with no limitations built in.
 Realistically, there should some way to limit
the growth of a population due to available
space, food, or other factors.
5
The Logistic Model
 As a population increases, available resources must
be shared between more and more members of the
population.
 Assuming these resources are limited, here are
some “reasonable” assumptions one can make how
a population should grow:
1. The population’s growth rate should eventually
decrease as the population levels increase beyond
some point.
2. There should be a maximum allowed population
level, which we will call a carrying capacity.
3. For population levels near the carrying capacity, the
growth rate is near zero.
4. For population levels near zero, the growth rate
should be the greatest.
6
The Logistic Model (cont.)
 The simplest model that takes these assumptions into
account is the logistic model:
 x(0) = x0
x(n) = x(n-1)*(R(1-x(n-1)/K)+1) for n ≥ 1
 Here, x0 is the initial population size,
R is the intrinsic growth rate (i.e. growth rate without
any limitations on growth),
and K is the carrying capacity.
 Notice that when x(n-1) is close to zero, the growth is
exponential.
 Also, when x(n-1) is close to K, the population stays
near the constant value of K (so growth rate is close
to zero).
7
Example 1
 Use Excel to study the long-term
behavior of a population that grows
logistically, with carrying capacity K =
100 and growth rate R = 0.5
(members/year).
 Use x0 = 0, 25, 50, 75, 100, 125,
and 150.
8
Example 1 (cont.)
9
Example 1 (cont.)
 Notice that X = 100 and X = 0 are
fixed points of the logistic recurrence
relation.
 X = 100 is stable.
 What about X = 0?
 For fun, even though this doesn’t
make sense in the real world for a
population, try x0 = -1 and x0 = -10.
 What happens?
10
Example 1 (cont.)
11
Example 1 (cont.)
 Fixed point X = 0 is unstable!
 In general, for the logistic equation,
the fixed points turn out to be X = 0
and X = K.
 This can be shown by solving the
equation X = X*(R(1-X/K)+1) for X.
12
Two or More Populations
 If two or more populations interact,
we can use a system of recurrence
equations to model the population
growth!
 Typical examples include predatorprey, host-parasite, competitive
hunters and arms races.
13
Predator-Prey Model
 As an example, let’s consider two populations that
interact – foxes (predator) and rabbits (prey). Assume
no other species interact with the foxes or rabbits.
 Assume the following:
1. There is always enough food and space for the rabbits.
2. In the absence of foxes the rabbit population grows
exponentially.
3. In the absence of rabbits, the fox population decays
exponentially.
4. The number of rabbits killed by foxes is proportional to
the number of encounters between the two species.
5. This in turn is proportional to the product of the two
populations (this assumption implies fewer kills when the
number of foxes or rabbits is small).
 These assumptions can be modeled with the following
system:
14
Predator-Prey Model (cont.)
 Let R(n) be the number of rabbits at time n
and F(n) be the number of foxes at time n.
 R(0) = R0
F(0) = F0
R(n) = R(n-1)+a*R(n-1) – b*R(n-1)*F(n-1)
F(n) = F(n-1)-c*F(n-1) + d*R(n-1)*F(n-1)
for n≥1,
where a, b, c, and d are all greater than
zero.
15
Example 2
 As an example, let’s try the Rabbit-Fox
Population model with a = 0.15, b = 0.004,
c = 0.1, and d = 0.001.
 Assume that initially there are 200 rabbits
and 50 foxes, i.e. R0 = 200 and F0 = 50.
 Plot R(n) and F(n) vs. n, for 200 years.
 Repeat with F(n) vs. R(n), for 200 years.
16
Example 2 (cont.)
17
Example 2 (cont.)
Fox and Rabbit Populations Over Time
800
700
Number
600
500
R(n)
400
F(n)
300
200
100
0
0
50
150
100
200
250
Years
18
Example 2 (cont.)
Fox Population vs. Rabbit Population
Number of Foxes
300
250
200
150
100
50
0
0
100
200
300
400
500
600
700
800
Number of Rabbits
19
Revised Predator-Prey Model
(cont.)
 A more realistic model takes into
account the fact that there may be
limits to the space available for the
foxes and rabbits.
 This can be modeled via a logistic
growth model, in the absence of the
other species!
 This amounts to the following:
20
Revised Predator-Prey Model
 Let R(n) be the number of rabbits at time n
and F(n) be the number of foxes at time n.
 R(0) = R0
F(0) = F0
R(n) = R(n-1)+a*R(n-1) – b*R(n-1)*F(n-1) –
e*R(n-1)*R(n-1)
F(n) = F(n-1)-c*F(n-1) + d*R(n-1)*F(n-1) –
f*F(n-1)*F(n-1)
for n≥1,
where a, b, c, d, e, and f are all greater than
zero.
21
Example 3
 Revise our model from Example 2
with e = 0.00015 and f = 0.00001.
 Keep all other parameters the same.
22
Example 3 (cont.)
Fox and Rabbit Populations Over Time
Fox Population vs. Rabbit Population
80
Number
200
150
R(n)
100
F(n)
50
Number of Foxes
250
70
60
50
40
30
20
10
0
0
0
50
100
150
Years
200
250
0
50
100
150
200
250
Number of Rabbits
23
References
 A Course in Mathematical Modeling by
Douglas Mooney and Randall Swift
 An Introduction to Mathematical
Models in the Social and Life Sciences
by Michael Olinick
24