Chapter 5 Box Problems
Box A
(a)
$$\displaystyle W_{BB}=p^2_1(1-2 \alpha + 2 \epsilon) + 2p_1q_1(1-\alpha+\epsilon) + q^2_1$$
$$ = p^2_1 - 2p^2_1 \alpha + 2p^2_1 \epsilon + 2p_1q_1 - 2p_1q_1 \alpha + q^2_1 + 2p_1q_1 \epsilon$$
$$\displaystyle = p^2_1 - 2p_1q_1 + q^2_1 + 2p_1[ -p_1 \alpha + p_1 \epsilon - q_1 \alpha + q_1 \epsilon]$$
$$\displaystyle = (p+q)^2 + 2p_1[ -\alpha + p_1 \epsilon]$$
$$\displaystyle = 1 - 2p_1[p_1 \alpha - p_1\epsilon + q_1 \alpha - q_1 \epsilon]$$
$$\displaystyle = 1 - 2p_1[(p_1+q_1)\alpha - (p_1+q_1)\epsilon]$$
$$\displaystyle = 1 - 2p_1( \alpha - \epsilon)$$
(b)
$$\displaystyle W_{Bb} = p^2_1 (1-\alpha+2\epsilon) + 2p_1q_1(1+ \epsilon) +q^2_1(1-\alpha)$$
$$\displaystyle = p^2_1 -p^2_1\alpha+2p^2_1\epsilon + 2p_1q_1 + 2p_1q_1\epsilon +q^2_1 - q^2_1\alpha$$
$$\displaystyle = p^2_1 + 2p_1q_1 +q^2_1 -(p^2_1\alpha +q^2_1\alpha)+2p^2_1\epsilon + 2p_1q_1\epsilon$$
$$\displaystyle = 1-\alpha(p^2+q^2) + 2p_1\epsilon(p_1+q_1)$$
$$\displaystyle = 1-(p^2+q^2)\alpha + 2p_1\epsilon$$
(c)
$$\displaystyle W_{bb} = p^2_1(1+2\epsilon)+2p_1q_1(1-\alpha+\epsilon)+q^2_1(1-2\alpha)$$
$$\displaystyle = p^2_1 +2p^2_1\epsilon +2p_1q_1 - 2p_1q_1\alpha + 2p_1q_1\epsilon +q^2_1 -2q^2_1\alpha$$
$$\displaystyle = p^2_1 + 2p_1q_1 +q^2_1 + 2p^2_1\epsilon + 2p_1q_1\epsilon - 2p_1q_1\alpha - 2q^2_1\alpha$$
$$\displaystyle = 1 + 2p_1\epsilon(p_1+q_1) - 2q_1\alpha(p_1+q_1)$$
$$\displaystyle = 1 +2p_1\epsilon -2q_1\alpha$$
(d)
Extract expressions for alpha and epsilon from Table 1 page 330
$$\displaystyle W_{AA}=p^2_2(1-2\alpha+2\epsilon)+2p_2q_2(1-\alpha+2\epsilon)+q^2_2(1+2\epsilon)$$
$$\displaystyle = p^2_2 - p^2_2\alpha + p^2_2\epsilon + 2p_2q_2 - 2p_2q_2\alpha + 4p_2q_2\epsilon + q^2_2 +2q^2_2\epsilon$$
$$\displaystyle = p^2_2 + 2p_2q_2 +q^2_2 +2\epsilon(p^2_2 + 2p_2q_2 +q^2_2)-2p_2\alpha(p_2+q_2)$$
$$\displaystyle = 1+2\epsilon - 2p_2\alpha$$
(e)
$$\displaystyle W_{Aa}= p^2_2(1-\alpha+\epsilon)+2p_2q_2(1+\epsilon)+q^2_2(1-\alpha+\epsilon)$$
$$\displaystyle = p^2_2 -p^2_2\alpha +p^2_2\epsilon +2p_2q_2 +2p_2q_2\epsilon+ q^2_2 - q^2_2\alpha + q^2_2\epsilon$$
$$\displaystyle = p^2_2 + 2p_2q_2 + q^2_2 + \epsilon(p^2_2 + 2p_2q_2 + q^2_2)-\alpha(p^2_2-q^2_2)$$
$$\displaystyle = 1 + \epsilon - \alpha(p^2_2+q^2_2)$$
(f)
$$\displaystyle W_{aa}= p^2_2(1) + 2p_2q_2(1-\alpha)+q^2_2(1-2\alpha)$$
$$\displaystyle = p^2_2 + 2p_2q_2 - 2p_2q_2\alpha + q^2_2 - 2q^2_2\alpha$$
$$\displaystyle = p^2_2 + 2p_2q_2 + q^2_2 - 2q_2\alpha(p_2+q_2)$$
$$\displaystyle = 1-2q_2\alpha$$
(g)
$$\displaystyle \bar{w} = p^2_2W_{BB} + 2p_2q_2W_{Bb}+q^2_2W_{bb}$$$$\displaystyle = p^2_2[1-2p_1(\alpha-\epsilon)]+2p_2q_2[1-(p^2_1+q^2_1)\alpha+2p_1\epsilon]+q^2_2(1-2q_1\alpha+2p_1\epsilon)$$
$$\displaystyle = p^2_2-2p_1p^2_2(\alpha-\epsilon)+2p_2q_2-2p_2q_2(p^2_1+q^2_1)\alpha + 2p_1p_2q_2\epsilon+q^2_2-2q_1q^2_2\alpha+2p_1q^2_2\epsilon$$
$$\displaystyle = p^2_2-2p_1p^2_2\alpha + 2p_1p^2_2\epsilon +2p_2q_2-2p^2_1p_2q_2\alpha - 2p_2q^2_1q_2\alpha+2p_1p_2q_2\epsilon + q^2_2-2q_1q^2_2\alpha+2p_1q^2_2\epsilon$$
Rearrange into 3 sections collecting similar variables
Section 1 - terms without alpha or epsilon:
$$\displaystyle = p^2_2 + 2p_2q_2 + q^2 = 1$$
Section 2 - terms with alpha:
$$\displaystyle = -2p_1p^2_2\alpha - 2p^2_1p_2q_2\alpha-2p_2q^2_1q_2\alpha-2q_1q^2_2\alpha$$
$$\displaystyle = -2\alpha[p_1p^2_2+p^2_1p_2q_2+p_2q^2_1q_2+q_1q^2_2]$$
$$\displaystyle = -2\alpha[ p_1p_2(p_2+p_1q_2)+q_1q_2(q_1p_2+q_2)]$$
Substitute \(p_1=1-q_1\) and \(q_1=1-p_1\)
$$\displaystyle = -2\alpha[p_1p_2(p_2+(1-q_1)q_2)+q_1q_2((1-p_1)p_2+q_2) ]$$
$$\displaystyle = -2\alpha[p_1p_2(p_2+q_2-q_1q_2)+ q_1q_2(p_2-p_1p_2+q_2) ]$$
$$\displaystyle = -2\alpha[p_1p_2(1-q_1q_2)+q_1q_2(1-p_1p_2)]$$
$$\displaystyle = -2\alpha[p_1p_2-p_1p_2q_1q_2+q_1q_2-p_1p_2q_1q_2]$$
$$\displaystyle = -2\alpha[p_1p_2+q_1q_2-2p_1p_2q_1q_2]$$
Substitute \(q_1=1-p_1\) and \( q_2=1-p_2\)
$$\displaystyle = -2\alpha[ p_1p_2+(1-p_1)(1-p_2)-2p_1p_2(1-p_1)(1-p_2)]$$
$$\displaystyle = -2\alpha[ p_1p_2 + 1-p_1-p_2+p_1p_2-2p_1p_2(1-p_1-p_2+p_1p_2)]$$
$$\displaystyle = -2\alpha[p_1p_2 + 1-p_1-p_2 +p_1p_2 -2p_1p_2+2p_1p^2_2+2p^2_1p_2-2p^2_1p^2_2 ]$$
$$\displaystyle = -2\alpha[1-p_1-p_2+2p_1p_2(p_1+p_2-p_1p_2) ]$$
Section 3 - terms with epsilon:
$$\displaystyle = 2p_1p^2_2\epsilon + 2p_1p_2q_2\epsilon + 2p_1q^2_2\epsilon=2p_1\epsilon(p^2_2+p_2q_2 + q^2_2)=2p_1\epsilon$$
So finally \(\bar{w} = 1 -2\alpha[1-p_1-p_2+2p_1p_2(p_1+p_2-p_1p_2) ] +2p_1\epsilon\)
Box B
Variable | Description |
---|---|
x | trait |
w | fitness |
\(\alpha\) | average effect of an allele substitution |
K | response to selection |
s | selection differential |
\(\mu’\) | phenotypic mean |
\(\sigma\) | phenotypic standard deviation |
\(\sigma^2\) | variance |
i | intensity of selection |
B | proportion of a population saved for breading |
T | truncation point |
Z | height of the distribution at T |
\(R_x\) | phenotypic change in x in the first generation (Response) |
From chapter 4 Box E p269 The fundamental theorum of natural selection:
$$\displaystyle i_w=\frac{\sigma_w}{\bar{w}}$$
From chapter 4 Box B p258
$$\displaystyle \Delta p = \frac{i_wpq\alpha_w}{\sigma_w}$$
Substitute to get: \(\Delta p=\frac{pq\alpha_w}{\bar{w}}\)
For x changing in response to selection: \(\Delta p=\frac{i_xpq\alpha_x}{\sigma_x}\)
Set the 2 equations for \(\Delta p\) equal and solve for \(i_x\)
$$\displaystyle \frac{pq\alpha_w}{\bar{w}} = \frac{i_xpq\alpha_x}{\sigma_x}$$ $$\displaystyle i_x=\frac{pq\alpha_w\sigma_x}{\bar{w}pq\alpha_x}=\frac{\sigma_x\alpha_w}{\bar{w}\alpha_x}$$ $$\displaystyle i_x=\sigma_x\frac{dln\bar{w}}{dx}$$ From chapter 4 box C: $\displaystyle R_x=i_x\sigma_xh^2_x; h^2_x=\frac{\sigma^2_{ax}}{\sigma^2_x}$ $$\displaystyle R_x=(\frac{dln\bar{w}}{dx})\sigma^2_{ax}$$From chapter 1 Box E part b:
1 | K1 <- 1500 #population of interest |
Box C
Variable | Description |
---|---|
I | Individual in question |
R | Relative |
r | probability I and R share an allele |
F | inbreeding coefficient |
\(F_{IR}\) | coefficient of kinship |
\(r^*\) | coefficient of relationship |
$$\displaystyle r=2F_{IR}$$
Relationship | \(F_{IR}\) | \(2F_{IR}\) |
---|---|---|
twins | 1/2 | 1 |
parent offspring | 1/4 | 1/2 |
full sibs | 1/4 | 1/2 |
half sibs | 1/8 | 1/4 |
first cousins | 1/16 | 1/8 |
uncle nephew | 1/8 | 1/16 |
Box D
Only q can be calculated from the nonmelanic (aa freq=q^2) phenotype so take the melanic frequencies and subtrac from one.
Calculate p as 1-q
For Biston betularia:
1 | q0 <- sqrt(0.99) |
For Biston cognitaria:
1 |
|
Box E
(a)
For Biston betularia:
1 | p0 <- 0.005 |
For Biston cognitaria:
1 | p0 <- 0.01 |
(b)
Given: $$\displaystyle \frac{dp}{dt}=\frac{pqs}{2\bar{w}}$$ rearrange to $$\displaystyle\frac{sq}{\bar{w}}dt=\frac{2}{p}dp$$
Given: $$\displaystyle C=\int^t_0 \frac{sq}{\bar{w}}dt$$ substitute to get $$\displaystyle C=\int^t_0 \frac{2}{p}dp = 2\int^t_0\frac{1}{p}dp=2ln(p_t)-2ln(p_0)=2[ln(p_t)-ln(p_0)]$$
(c)
Given: $$\displaystyle \frac{dp}{dt}=\frac{p^2qs}{\bar{w}}$$ rearrange to $$\displaystyle\frac{sq}{\bar{w}}dt=\frac{1}{p^2}dp$$
Given: \(\displaystyle C=\int^t_0\frac{sq(1+p)}{\bar{w}}dt=\int^t_0(1+p)\frac{sq}{\bar{w}}dt\) substitute to get
$$C=\int^t_0 \frac{(1+p)}{p^2}dp = |^t_0 -\frac{1}{p}+ln(p) = -\frac{1}{p_t}+ln(p_t)+\frac{1}{p_0}-ln(p_0)$$
(d)
1 | pt <- 1 |
(e)
For 10% selective elimination B = 0.9 (fraction retained for breeding) and the corresponding i is 0.195 (Box C chpt 4).
1 | i <- 0.195 |
(f)
1 | subpop <- c(1,1,1,2,2,3,3) |
1 | #Calculate each summary statistic using dplyr's group_by function |
(a)
1 | d3 <- split(d, subpop) |
(b)
1 | sum(((d2$p.bar - mean(d2$p.bar))^2)*d2$n)/sum(d2$n) |
(c)
1 | sum((d$p - mean(d$p))^2)/length(d$p) |
(d)
1 | H.D <- sum(d$H)/nrow(d) |
(e)
1 | F.DS <- (H.S-H.D)/H.S |
(f)
I will call the quantity \(\displaystyle \frac{\Sigma n_i\bar{p}_i(1-\bar{p}_i)}{\Sigma n_i}\) “tilde.pq” in the R code.
1 | tilde.pq <- sum(d2$n*d2$p.bar*(1-d2$p.bar))/sum(d2$n) |