Starting from:

$30

Evolutionary Dynamics Exercises 3 -Solved


Problem 1: Random walk
Consider a symmetric, time-discrete random walk in one dimension, {X(t) | X(t) ∈ Z,t ∈ N0}. Let a/2 
denote the probability of jumping forward or backward, respectively. Hence we have transition probab
ilities Pi,i+1 = Pi,i−1 = a/2, Pi,i = 1−a and otherwise Pi, j = 0. 
Hint: Express X(t) as the sum of increments ∆(t) ∈ {−1,0,+1}, i.e. X(t) = X(0) + ∆(1) + ··· + ∆(t) 
and use that the ∆(t) are iid (identically independently distributed). 
(a) Argue why E[∆(t)] = 0. 
(b) Argue why E[X(t)] = x0, where x0 = X(0). 
(c) Calculate the variance Var[∆(t)]. 
Hint: Var[X] = ∑i=1 pi ·(xi −xˆ)2. 
(d) Show that the variance of X(t) equals Var[X(t)] = at. 
Problem 2: Neutral Moran process 
Consider the neutral Moran process {X(t) | t = 0,1,2,...} with two alleles A and B, where X(t) is the 
number of A alleles in generation t. 
(a) Show that the process has a stationary mean: 
 
E[X(t) | X(0) = i] = i. 
Hint: First calculate E[X(t) | X(t −1)] and use the law of total expectation, EY [Y] = EZ[EY [Y | Z]] 
with Y = X(t) and Z = X(t −1). 
(b) Show that the variance of X(t) is given by: 

Var[X(t) | X(0) = i] = V1 
1−(1−2/N2)t 
2/N2 

(1) 
Consider the following steps: 
(i) Show that V1 := Var[X(1) | X(0) = i] = 2i/N(1−i/N). 
(ii) Then use that ∀t > 0 Var[X(t) | X(t −1) = i] = Var[X(1) | X(0) = i] (why?) and the law of 
total variance, Var[Y] = EZ[VarY [Y | Z]] +VarZ[EY [Y | Z]], to derive 
Var[X(t) | X(0) = i] = V1 + (1−2/N2)Var[X(t −1) | X(0) = i] 
(2) 
1(iii) The inhomogeneous recurrence equation above can be solved by bringing it into the form 
xt −a = b(xt−1 −a), from which it follows that xt −a = bt−1(x1 −a). 
(c) Derive an approximation of (1) for large N. 

(d) Write a small simulation to check the results from (a), (b) and (c). Use N ∈ {10,100} and i = N/2. 
Simulate 1000 trajectories for t = 1,...,100, and compute empirical mean and variance. Your 
results could look like on the figures below. § 


20 
40 
60 
80 
100 
N = 10 
Generation t 

20 
40 
60 
80 
100 
N = 100 
Generation t 
emp. mean 
emp. stdv. 
analyt. stdv. 
approx. stdv. 
Grey lines denote single realisations of the process. Shown are also empirical mean and empirical 
standard deviation, as well as the standard deviation according to (1) and its approximation for 
large N. 
Problem 3: Absorption in a birth-death process 
Consider a birth-death process with state space {0,1,...,N}, transition probabilities Pi,i+1 = αi, Pi,i−1 = 
βi > 0, and absorbing states 0 and N. 
(a) Show that the probability of ending up in state N when starting in state i is 
(3 points) 
xi = 
1+∑
i−

j
=
1 ∏
j
k
=1 γk 
1+∑N


j=


j
k
=1 γk 
(3) 
Consider the following steps: 
(i) The vector x = (x0,... xN)T solves x = Px where P is the transition matrix. (Why?) Set 
yi = xi −xi−1 and γi = βi/αi . Show that yi+1 = γiyi. 
(ii) Show that ∑ℓ
i=1 yi = xℓ. 
(iii) Show that xℓ =  1+∑ℓ


j
=
1 ∏
j
k
=1 γk x1. 
(b) Using (3), show that for the Moran process with selection 
(1 point) 
ρ = x1 = 
1−1/r 
1−1/rN 

where r is the relative fitness advantage. Use l’Hôpital’s rule to calculate the limit r → 1. 

0.0 
0.2 
0.4 
0.6 
0.8 
1.0 
frequency 
0.0 
0.2 
0.4 
0.6 
0.8 
1.0 
frequency

More products