Week 6 Homework

33. Genetic and phenotypic components

Covariance in genetic and environmental components of weight variability of twins.

(a) Calculate the covariance and correlation coefficient between η1 and η2 in identical twins.

Cov(η1,η2)=E[(η1−E(η1))(η2−E(η2))]

Let's individually look at E(ηi):

E(ηi)=E(c+ξ+ε1)

Given that the mean of εi has been scaled to zero, its E(εi)=0. And c is a constant baseline weight, so E(c)=c. Therefore,

E(ηi)=c+E(ξ)

This also means that E(η1)=E(η2)=E(η), and the same for variance.

Plugging into our Covariance alternative formula

Cov(η1,η2)=E[η1η2]−(E(η1))(E(η2))Cov(ξ,η)=E[(c+ξ+ε1)(c+ξ+ε2)]−(c+E(ξ))2Cov(ξ,η)=E[c2+2cξ+ξ2+(terms with ε)]−(c2+2cE(ξ)+[E(ξ)]2)

Now we can apply the expectation to all of these terms. Since the E(ε)=0, all the terms containing ε as a factor will be zero.

Cov(ξ,η)=E(c2)+E(2cξ)+E(ξ2)−(c2+2cE(ξ)+[E(ξ)]2)

Since E(c2)=c2 and E(2cξ)=2cE(ξ) (expectation with a coefficient), these get subtracted and we end up with just:

Cov(η1,η2)=E(ξ2)−[E(ξ)]2

This is same as the equation for the True Variance, therefore:

Cov(η1,η2)=V(ξ)
My somewhat failed try to do it with a different formula

Putting this into the covariance formula:

Cov(η1,η2)=E[(η1−E(η))⋅(η2−E(η))]Cov(η1,η2)=E[((c+ξ+ε1)−(c+E(ξ)))⋅((c+ξ+ε2)−(c+E(ξ)))]Cov(η1,η2)=E[(ξ+ε1−E(ξ))⋅(ξ+ε2−E(ξ))]Cov(η1,η2)=E[(ξ−E(ξ)+ε1)⋅(ξ−E(ξ)+ε2)]

Expand the factor. I'm not going to write out all the terms containing ε as a factor

Cov(η1,η2)=E[(ξ2−2ξE(ξ)+E(ξ)2+(terms with ε1))⋅(ξ2−2ξE(ξ)+E(ξ)2+(terms with ε2))]

Because the expectation of the sum is the sum of the expectation, we can apply that to all of these. Since the E(ε)=0, all the terms containing ε as a factor will be zero:

Cov(η1,η2)=E(ξ2)−E(2ξE(ξ))+E(E(ξ)2)⋅(ξ2−2ξE(ξ)+E(ξ)2+(terms with ε2))]

Not exactly sure about this step

Cov(η1,η2)=E[(ξ−E(ξ))⋅(ξ−E(ξ))]Cov(η1,η2)=E[(ξ−E(ξ))2]=V(ξ)

This is the same as our example from the lecture about the Covariance of a variable with itself.

Correlation coefficient is therefore just (since V(η1)=V(η2)):

r=V(ξ)V(η)

(b) The quotient V(ξ)/V(η) is called the broad sense heritability, which tells which fraction of the observable phenotypic variance V(η) is due to genetic effects. Suggest a practical way to measure the heritability of body weight and comment on if this measurement is correct for the entire population.

With identical twins who share the same genetics, we can determine the genetic component of variance by measuring their weights, except we would only have two data points. Also, they would have shared environmental effects so they would not have a mean of zero.

36. ANOVA (Maths) with groups of animals

In our example:
n=10
k=4
ξ¯=4.025

"Full variance":

var=103∑i=14(ξ¯i−ξ¯)2var=103((3.8−4.025)2+(4.1−4.025)2+(3.5−4.025)2+(4.7−4.025)2)

var=2.625

"Average of the sample variance":

14∑i=14∑j=110(ξij−ξ¯i)2n−114∑i=14σ214(1.32+0.92+1.12+1.22)

average of sample variance = 1.2875

F-statistic

F=2.625/1.2875=2.039
Therefore, the F-statistic is less than the threshold and we fail to reject the null hypothesis. It is possible this result is because of random chance.

41. Truncation selection in animal breeding

Continuous Distributions
This is a normal distribution N(10,5).
(a) When T=13.67, there is a 5% chance of all the animals being bigger than this weight.
(b) When T=9.43, there is a 60% chance of all the animals being bigger than this weight.

42. Bayes' Theorem with continuous distributions

(a)
Probability of being this height if you are a Finnish man: P(data|man) = 0.0682
Probability of being this height if you are a Finnish woman: P(data|woman) = 0.1535

From Bayes' Theorem, we calculate the posterior:

P(man|data)=P(data|man)P(man)P(data)P(man|data)=P(data|man)P(man)P(data|man)P(man)+P(data|woman)P(woman)P(man|data)=(0.0682)(0.5)(0.0682)(0.5)+(0.1535)(0.5)=0.308

So there is a 31% chance the suspect was a man given the height data.

If the prior probability of being a man P(man) was instead 0.80 (and thus P(woman)=0.2):

P(man|data)=(0.0682)(0.8)(0.0682)(0.8)+(0.1535)(0.2)=0.6399

(b) See solution text.

Extra exercise (an example that came up during the lecture):

Suppose we take two measurements, ξ and η, on every individual of a large population. There are only four combinations of numbers we get:

Show that, nevertheless, Cov(xi,eta) is zero

Sketch as four points in coordinate system:

The average values ξ¯ and η¯ are:

ξ¯=(1)(1/4)+(−1)(1/4)+(0)(1/4)+(0)(1/4)=0η¯=(0)(1/4)+(0)(1/4)+(1)(1/4)+(−1)(1/4)=0

So our sample covariance is:

∑i=1n(ξi)(ηi)n−1

In every case given above, either ξ or η is 0. So the numerator will be zero in each part of the sum.