Population Genetics Chpt 3 End

Chapter 3 End Problems


Problem 1

1/2N = 0.05 so N=10

Problem 2

Calculate the harmonic mean as on p159

1
2
3
N <- 1/((1/5)*( 1/500 + 1/1500 + 1/ 10 + 1/50 + 1/1000))
N
## [1] 40.43127

Problem 3

1
2
3
4
5
6
p <- c(0.55, 0.2, 0.09, 0.06,0.04,0.03,0.02,0.01)

#The effective number if alleles is 1/homozygosity; homozygosity = SUM[p2]

1/sum(p^2)
## [1] 2.799552

If each allele had the same frequency (0.125) and there are 8 alleles then the effective number of alleles is 8, as that is the definition of effective number.

Problem 4

$$\sigma^2 = \frac{p(1-p)}{2n}$$

0.01707=(0.5*(1-0.5))/2*n solve for n; n=7.3

Problem 5

$$F=1-(1-\frac{1}{2N})^t$$

N=50, t=200, solve to obtain F=0.866. See p158

Problem 6

1
2
3
4
5
6
u<-3e-5
v<-7e-7

p.hat <- v/(u+v)
p.hat
## [1] 0.0228013

Problem 7

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
p <- c(0.1, 0.4)
p.bar <- mean(p)
p.bar
## [1] 0.25

q <- 1-p
q
## [1] 0.9 0.6

q.bar <- mean(q)
q.bar
## [1] 0.75

HS <- 2*p*(1-p)
HS
## [1] 0.18 0.48

HS.bar <- mean(HS)
HS.bar
## [1] 0.33

HT <- 2*p.bar*(1-p.bar)
HT
## [1] 0.375

variance <- mean(p^2)-p.bar^2
variance
## [1] 0.0225

F.ST <- (HT-HS.bar)/HT
F.ST
## [1] 0.12

F.ST <- variance/(p.bar*q.bar)
F.ST
## [1] 0.12

Problem 8

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
q <- c(0.6, 0.9)
q^2
## [1] 0.36 0.81

q.square.bar <- mean(q^2) #average frequency of the homozygous recessives
q.square.bar
## [1] 0.585

q.bar.square <- mean(q)^2 #homozygous recessives in the fused population
q.bar.square
## [1] 0.5625

sigma.square <- abs(q.bar.square - q.square.bar)
sigma.square
## [1] 0.0225

#verify Wahlund's formula

p.bar <- mean( c(0.4, 0.1))
q.bar <- mean(q)

#from p193

F.st <- sigma.square/(p.bar*q.bar)
F.st
## [1] 0.12
#which agrees with the value calculated in problem 7

Problem 9

From p209 Box H example b

$$P_t = P_{t-1}(1-m)+\bar{p}m$$
1
2
3
4
5
6
7
m <- 0.1
p.bar <- 0.25 #from problem 8
p <- c(0.4, 0.1) #from problem 8

P.t <- p*(1-m)+p.bar*m
P.t
## [1] 0.385 0.115
At equilibrium $$P_t = P_{t-1}$$ so $$P_t = P_{t}(1-m)+\bar{p}m$$ Rearrange to get $$P_t = \frac{\bar{p}m}{1-(1-m)} = 0.25$$

Problem 10

$$p'=\frac{p(pw_{11}+qw_{12})}{\bar{w}}$$ $$q'=\frac{q(qw_{22}+pw_{12})}{\bar{w}}$$ $$\bar{w}=p^2w_{11} + 2pqw_{12} + q^2w_{22}$$
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
p <- 0.16+0.5*0.48
q <- 0.36+0.5*0.48
w.11 <- 1
w.12 <- 0.8
w.22 <- 0.6

w.bar <- (p^2)*w.11+2*p*q*w.12 + (q^2)*w.22
w.bar
## [1] 0.76
p.prime <- (p*(p*w.11+q*w.12))/w.bar
p.prime
## [1] 0.4631579
q.prime <- (q*(q*w.22+p*w.12))/w.bar
q.prime
## [1] 0.5368421
#zygotes for the next generation

p.prime^2 #AA
## [1] 0.2145152
2*p.prime*q.prime #Aa
## [1] 0.4972853
q.prime^2 #aa
## [1] 0.2881994

Problem 11

$$\hat{p} = \frac{w_{12}-w_{22}}{2w_{12}-w_{11}-w_{22}}$$ With $w_{11}=0.98$ and $w_{12}=1$ and $\hat{p}=0.8$
$$0.8=\frac{1-w_{22}}{2(1)-0.98-w_{22}}$$ $$w_{22}=0.92$$

Problem 12

$$\displaystyle w_{22}=1-s=0.2$$ so s=0.8

$$\displaystyle\hat{q}=\sqrt{\frac{\mu}{s}}= \sqrt{\frac{5EE-6}{0.8}}=2.5EE-3$$

$$\displaystyle\hat{q}=\frac{\mu}{hs}=\frac{5EE-6}{(0.035)(0.8)}=0.000179$$

Problem 13

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
p <- 0.4
q <- 0.6
N <- 30
t <- 50

F <- 1-(1-(1/(2*N)))^t
F
## [1] 0.5684431

AA <- p^2*(1-F)+p*F
AA
## [1] 0.2964263

Aa <- 2*p*q*(1-F)
Aa
## [1] 0.2071473

aa <- q^2*(1-F)+q*F
aa
## [1] 0.4964263

###

p <- 0.2
q <- 0.8

p^2
## [1] 0.04
2*p*q
## [1] 0.32
q^2
## [1] 0.64

Problem 14

1
2
3
4
5
6
7
8
9
10
11
12
13
14
t <- c(10, 50, 100)
F <- 1-(1-1/(2*30))^t
F
## [1] 0.1547063 0.5684431 0.8137586
# F = variance/(p.bar*q.bar) or
# variance <- F*p.bar*q.bar


p.bar <- 0.4 #from problem 13
q.bar <- 0.6

variance <- F*p.bar*q.bar
variance #for 10, 50, 100 generations respectively
## [1] 0.03712952 0.13642634 0.19530207

Problem 15

1
2
3
4
5
6
7
nucleotides <- 360 #120 mamino acids is 360 nucleotides
u <- 0.5e-9 #substitutions/nucleotide/year
t <- 180e6 #years

2*nucleotides*u*t #2 because there are 2 lineages diverging, each undergoing substitutions
## [1] 64.8
#amino acid changes found diverged
Share