Lecture 2 of the Quantitative Genetics series. The probability toolkit the rest of the course runs on.
The previous lecture ended with an uncomfortable fact: we cannot observe the effect of a single gene on a metric trait, so we must work with probabilities and expectations. This lecture assembles exactly the probability tools the rest of the course needs, and no more.
Write \(\Omega\) for the set of all outcomes. Rolling a fair six-faced die, \(\Omega=\{1,2,3,4,5,6\}\). The event "the roll is even" is the subset \(\{2,4,6\}\), and its probability is \(3/6=1/2\).
Two events can be combined in two ways, and the language matters because it maps directly onto genetic questions later ("this allele and that allele", "this genotype or that one").
Subtracting \(\Pr(A\cap B)\) prevents double-counting the overlap.
Two events that can never occur together (\(A\cap B=\varnothing\)) are mutually exclusive. Then \(\Pr(A\cap B)=0\) and the rule simplifies to
Roll one fair six-faced die. Let \(A\) be "the roll is at least 4" and \(B\) be "the roll is even".
\(A=\{4,5,6\}\), so \(\Pr(A)=3/6=1/2\). \(B=\{2,4,6\}\), so \(\Pr(B)=1/2\). \(A\cap B=\{4,6\}\), so \(\Pr(A\cap B)=2/6=1/3\).
Hence \(\Pr(A\cup B)=\tfrac12+\tfrac12-\tfrac13=\tfrac23\).
Contrast with mutually exclusive events: if \(A=\{1\}\) and \(B=\{2,4,6\}\), then \(\Pr(A\cap B)=0\) and \(\Pr(A\cup B)=1/6+3/6=2/3\) with nothing to subtract.
If the occurrence of one event affects the probability of another, the events are dependent. The probability of \(A\) given that \(B\) has occurred is
Rearranged, this gives the multiplication rule \(\Pr(A\cap B)=\Pr(A\mid B)\Pr(B)\).
\(A\) and \(B\) are independent, written \(A\perp B\), when knowing one tells you nothing about the other:
A haplotype \(MQ\) has frequency \(f_{MQ}\); allele \(M\) has frequency \(p_M\) and \(Q\) has frequency \(p_Q\). If the two loci were independent (no linkage disequilibrium), we would expect \(f_{MQ}=p_M\,p_Q\).
The conditional probability of carrying \(Q\) given \(M\) is \(\Pr(Q\mid M)=f_{MQ}/p_M\). Under independence this equals \(p_Q\). Any departure is exactly what we later call linkage disequilibrium, so LD is nothing more mysterious than non-independence of two events.
A distribution specifies the probabilities of the different values a random variable \(X\) can take.
To describe where a distribution sits, we use the mode (most frequent value), the median (middle value) and the mean or expected value. For the symmetric, unimodal distributions of quantitative genetics these coincide, but it is the mean that has the algebra we need.
In most situations the average of a sample approaches the expected value as the sample grows. The expectation is the theoretical counterpart of the sample mean.
The two properties used constantly in this course are that expectation is linear, and that it passes through sums regardless of dependence:
The second identity is the reason we could write \(E(g)=E\!\left(\sum_j g_j\right)=\sum_j E(g_j)\) in the previous lecture without assuming the loci were independent. Expectations always add. Variances do not, as shown in the next section.
Variance measures dispersion, how spread out a distribution is around its mean.
The second form is usually the easier one to compute. Two rules follow, and the contrast between them is the single most important thing in this section:
Adding a constant \(b\) does not change the variance, but scaling by \(a\) multiplies it by \(a^2\). And variances of sums only add when the variables are uncorrelated. When we later decompose \(\sigma_y^2=\sigma_A^2+\sigma_D^2+\sigma_E^2\), we are quietly relying on exactly this condition, and when it fails, for instance under genotype-environment correlation, the decomposition acquires an extra covariance term.
Some variables tend to vary together. Three related measures describe this.
A covariance is positive when the two tend to be large together, negative when one is large as the other is small. Its size depends on the units of both variables, which makes it awkward to interpret on its own.
Correlation is the covariance standardised by both standard deviations, hence unit-free and bounded. This is the form used for genetic correlations between traits.
The regression coefficient is the covariance standardised by the variance of the predictor only. It answers: if \(X\) increases by one unit, by how much does \(Y\) change on average? If the relationship really is linear, \(y=b_{Y|X}x+a\), then knowing \(X=x\) gives
Covariance between relatives is how we measure resemblance and estimate heritability. Correlation is how we express genetic relationships between traits. Regression is the parent-offspring regression, and it is also the form the breeder's equation ultimately takes. Three faces of the same quantity.
Just as probabilities can be conditioned on an event, so can expectations. If we know an event has occurred, the expectation is modified accordingly:
This is the exact form in which the one-locus model is written. When we say the expected phenotype of an \(AA\) animal is \(E(y\mid AA)=x_{AA}\), that is a conditional expectation: the mean of the trait given the genotype. The whole one-locus model is built from three such conditional expectations, one per genotype.
These identities are worth keeping to hand; almost every derivation later in the course uses one of them. Throughout, \(X,Y,Z\) are random variables, \(a,b\) are constants, and \(X\perp Y\) means \(X\) and \(Y\) are independent.
Use the language of events and the equations above, not intuition alone. Showing the events explicitly is the point of the exercise.
Die roll. Roll two regular six-faced dice, one blue and one red.
Note how 5 is easiest via the complement, and 6 via mutually exclusive events. Choosing the right decomposition is most of the work.
Birthday. Assume the same number of people are born on every day of the year, and consider a non-leap year. A given person was born on the 31st of some month. What is the conditional probability that this person was born in July? Demonstrate the result using the language of conditional probability.
Let \(D\) be "born on the 31st" and \(J\) be "born in July". Seven months have a 31st, so \(\Pr(D)=7/365\). The intersection \(J\cap D\) is simply "born on 31 July", so \(\Pr(J\cap D)=1/365\).
The intuitive answer, 1/7, is correct here, but only because the seven months with a 31st are equally likely. The conditional-probability machinery is what tells you when the intuitive shortcut is safe.
Show, starting from the definition \(\operatorname{Cov}(X,Y)=E[(X-\mu_X)(Y-\mu_Y)]\), that \(\operatorname{Cov}(X,Y)=E(XY)-E(X)E(Y)\). Then use it to confirm that \(\operatorname{Cov}(X,X)=V(X)\).
Expand the product inside the expectation and use linearity:
Setting \(Y=X\) gives \(\operatorname{Cov}(X,X)=E(X^2)-[E(X)]^2=V(X)\), which is the definition of variance. Variance is just covariance of a variable with itself.