Tutorials › Statistical Genetics › Deriving Linkage Disequilibrium from Independence

Haplotypes and Linkage Disequilibrium · Tutorial 122 of 989

Deriving Linkage Disequilibrium from Independence

Learn how the two-locus quantity \(D\) expresses departure from independence and how to interpret its sign through covariance and conditional probabilities.

Intermediate 9 min read

What You'll Learn

  • Define \(D\) for two biallelic loci using haplotype and allele frequencies
  • Derive \(D\) as the covariance of two allele-indicator variables
  • Express \(D\) through conditional probabilities and identify when those expressions are defined
  • Show why \(D=0\) is equivalent to independence for two binary allele indicators
  • Interpret positive, negative, and zero \(D\) without confusing association with causation

From Haplotype Frequencies to Dependence

At two loci, knowing the frequency of one allele at each locus does not by itself tell us how often those alleles occur together on the same chromosome. The comparison between their observed joint frequency and the frequency expected under independence is the basis of linkage disequilibrium (LD). This tutorial derives that comparison and shows why it is also a covariance and a difference in conditional probabilities.

Use \(A\) and \(a\) for the two alleles at the first locus, and \(B\) and \(b\) for the two alleles at the second. The four possible haplotypes are \(AB\), \(Ab\), \(aB\), and \(ab\). As in the earlier material on haplotype frequencies, regard a haplotype frequency as the probability that a chromosome drawn at random from a specified population carries that haplotype. The derivations below concern population frequencies, not estimates from a finite sample.

Definition: Let \(p_{AB}\) be the frequency of haplotype \(AB\), and let \(p_A\) and \(p_B\) be the marginal frequencies of alleles \(A\) and \(B\). The two-locus linkage disequilibrium coefficient is $$ D = p_{AB} - p_A p_B. $$ The product \(p_Ap_B\) is the frequency of \(AB\) that would occur if the allele indicators at the two loci were independent. Thus \(D\) is the difference between the observed joint frequency and that independence expectation.

The marginal frequencies are obtained by summing over the allele at the other locus: \(p_A=p_{AB}+p_{Ab}\) and \(p_B=p_{AB}+p_{aB}\). Since each locus is biallelic, the remaining allele frequencies are \(p_a=1-p_A\) and \(p_b=1-p_B\). A positive \(D\) means \(AB\) occurs more frequently than the product of its marginal frequencies; a negative \(D\) means it occurs less frequently. If \(D=0\), the joint frequency equals that product.

Worked Examples With Haplotype Frequencies

Worked Example: Zero Departure From Independence

Suppose a hypothetical population has \(p_A=0.40\), \(p_B=0.30\), and \(p_{AB}=0.12\). The haplotype frequencies are assumed to describe one population and to sum to one. The remaining frequencies are \(p_{Ab}=0.40-0.12=0.28\), \(p_{aB}=0.30-0.12=0.18\), and \(p_{ab}=1-0.12-0.28-0.18=0.42\). They are all nonnegative and sum to \(1.00\), as required for a valid frequency distribution.

The independence expectation for \(AB\) is \(p_Ap_B=(0.40)(0.30)=0.12\). Therefore, $$ D=p_{AB}-p_Ap_B=0.12-(0.40)(0.30)=0.12-0.12=0. $$

Here the \(AB\) frequency matches the independence expectation. For example, among chromosomes carrying \(A\), the frequency carrying \(B\) is \(0.12/0.40=0.30\), the same as \(p_B\). This is evidence of independence for these two binary allele indicators in the specified population, not evidence about a causal effect.

Worked Example: Positive Linkage Disequilibrium

In another hypothetical population, suppose \(p_A=0.50\), \(p_B=0.40\), and \(p_{AB}=0.30\). The other haplotype frequencies are \(p_{Ab}=0.50-0.30=0.20\), \(p_{aB}=0.40-0.30=0.10\), and \(p_{ab}=1-0.30-0.20-0.10=0.40\). These nonnegative frequencies sum to \(1.00\).

The product of the marginal frequencies is \((0.50)(0.40)=0.20\), so $$ D=0.30-(0.50)(0.40)=0.30-0.20=0.10. $$

The positive value means that \(AB\) is more frequent than its independence expectation, by \(0.10\) in frequency units. Among chromosomes carrying \(A\), the conditional frequency carrying \(B\) is \(0.30/0.50=0.60\), which exceeds the marginal \(B\) frequency \(0.40\). In the reverse conditioning, \(P(A\mid B)=0.30/0.40=0.75\), exceeding \(p_A=0.50\). Both comparisons are consistent with positive \(D\).

Worked Example: Negative Linkage Disequilibrium

Suppose a third hypothetical population has \(p_A=0.25\), \(p_B=0.60\), and \(p_{AB}=0.10\). Then \(p_{Ab}=0.25-0.10=0.15\), \(p_{aB}=0.60-0.10=0.50\), and \(p_{ab}=1-0.10-0.15-0.50=0.25\). These frequencies are nonnegative and sum to one.

The expected \(AB\) frequency under independence is \((0.25)(0.60)=0.15\). Hence, $$ D=0.10-(0.25)(0.60)=0.10-0.15=-0.05. $$

The negative value says \(AB\) is less frequent than the product of the marginal frequencies. Indeed, \(P(B\mid A)=0.10/0.25=0.40\), which is \(0.20\) below \(p_B=0.60\). Multiplying that difference by \(p_A\) gives \((0.25)(-0.20)=-0.05\), the same \(D\).

\(D\) as a Covariance

A covariance measures how two variables vary together. To connect it to haplotypes, define \(X=1\) if a randomly selected chromosome carries \(A\), and \(X=0\) otherwise. Define \(Y=1\) if that chromosome carries \(B\), and \(Y=0\) otherwise. These are indicator variables for the two alleles on the same chromosome. Their expectations are \(E[X]=p_A\) and \(E[Y]=p_B\), while \(E[XY]=p_{AB}\): the product \(XY\) is one exactly for haplotype \(AB\).

Result: For these two allele indicators, the covariance is exactly the linkage disequilibrium coefficient: $$ \operatorname{Cov}(X,Y)=E[XY]-E[X]E[Y]=p_{AB}-p_Ap_B=D. $$

The identity follows directly from the definition of covariance. Because \(X\) and \(Y\) indicate alleles carried on the same chromosome, this covariance describes their population-level co-occurrence. It is not a covariance between allele counts measured across different individuals, and it does not by itself describe a causal relationship between loci.

Deriving the Conditional-Probability Expressions

Conditional probabilities give another interpretation: \(D\) measures how much the frequency of one allele changes when we restrict attention to chromosomes carrying the other. The expressions involving \(P(B\mid A)\) require \(p_A>0\), and those involving \(P(A\mid B)\) require \(p_B>0\), because conditioning on an event of probability zero is undefined.

1
Write the conditional frequency.
When \(p_A>0\), the definition of conditional probability gives \(P(B\mid A)=p_{AB}/p_A\). Thus \(p_{AB}=p_A P(B\mid A)\).
2
Subtract the independence expectation.
Substitute \(p_{AB}=p_A P(B\mid A)\) into the definition of \(D\), then factor out \(p_A\).
3
Interpret the difference.
The result is the marginal frequency of \(A\), multiplied by how far the conditional frequency of \(B\) among \(A\)-carrying chromosomes differs from the overall frequency of \(B\).
$$ D=p_A P(B\mid A)-p_Ap_B =p_A\bigl[P(B\mid A)-p_B\bigr], \qquad p_A>0. $$

By conditioning in the other direction, if \(p_B>0\), then \(p_{AB}=p_B P(A\mid B)\), and therefore

$$ D=p_B\bigl[P(A\mid B)-p_A\bigr], \qquad p_B>0. $$

These identities explain the signs of \(D\). If \(D>0\) and both marginal frequencies are positive, then \(P(B\mid A)>p_B\) and \(P(A\mid B)>p_A\). If \(D<0\), both conditional frequencies are below their corresponding marginals. The size of the conditional difference is not \(D\) alone: for example, \(P(B\mid A)-p_B=D/p_A\), so it also depends on \(p_A\).

The same reasoning applies to the complementary alleles. When the relevant denominators are positive, \(P(B\mid a)-p_B=-D/(1-p_A)\), and \(P(A\mid b)-p_A=-D/(1-p_B)\). Thus a positive association of \(A\) with \(B\) corresponds to a lower-than-marginal frequency of \(B\) among chromosomes carrying \(a\), and vice versa.

Why \(D=0\) Means Independence

For two binary indicators, a zero covariance is sufficient for independence. This equivalence is special to this setting; zero covariance does not establish independence for arbitrary variables. Here is a direct derivation using the four haplotype probabilities.

Let \(p=p_A\) and \(q=p_B\). Starting from \(D=p_{AB}-pq\), we have \(p_{AB}=pq+D\). Subtracting this joint frequency from each marginal gives \(p_{Ab}=p-p_{AB}\) and \(p_{aB}=q-p_{AB}\). The final frequency is what remains from one:

$$ \begin{aligned} p_{AB}&=pq+D,\\ p_{Ab}&=p(1-q)-D,\\ p_{aB}&=(1-p)q-D,\\ p_{ab}&=(1-p)(1-q)+D. \end{aligned} $$

If \(D=0\), each of these four joint probabilities is the product of its corresponding marginal probabilities. For example, \(p_{AB}=pq\), \(p_{Ab}=p(1-q)\), and the other two cells factor in the same way. Therefore the joint distribution of \(X\) and \(Y\) factors into the product of their marginal distributions: \(X\) and \(Y\) are independent.

Conversely, if the two indicators are independent, the probability of carrying both \(A\) and \(B\) is the product of the marginal probabilities, so \(p_{AB}=p_Ap_B\) and \(D=0\). If a marginal is zero, the corresponding indicator is constant and is independent of the other indicator; the factorization still holds, even though a conditional probability given that zero-frequency allele is not defined.

Interpretation and a Common Pitfall

The coefficient \(D\) is an absolute frequency difference. It uses the same scale as a haplotype frequency, from zero to one for a frequency and potentially negative for a difference. Its value refers to a specified population and the particular alleles chosen at the two loci. It does not, on its own, identify why the alleles co-occur or establish that one allele causes the other to be present. Nor should \(D\) be confused with a correlation coefficient: the covariance identity above is exact, but standardizing a covariance to obtain a correlation is a separate calculation.

  • Mistake: “\(D=0\) means the \(AB\) haplotype is absent.” Correction: It means \(p_{AB}=p_Ap_B\); that frequency can be positive. In Worked Example 1, \(p_{AB}=0.12\) while \(D=0\).
  • Mistake: “A positive \(D\) means \(P(B\mid A)=D\).” Correction: When \(p_A>0\), \(P(B\mid A)=p_B+D/p_A\). \(D\) is the product of \(p_A\) and the conditional-frequency difference.
  • Mistake: “If \(D=0\), the loci must have no biological relationship.” Correction: \(D=0\) states independence of the two allele indicators in the population frequencies considered. It does not establish a biological mechanism or rule out other relationships.
Key takeaway: For two biallelic loci, \(D=p_{AB}-p_Ap_B\) is the covariance of the two same-chromosome allele indicators. When the conditioning allele has positive frequency, \(D\) is also that allele's frequency multiplied by the change in the other allele's conditional frequency. In this binary setting, \(D=0\) is equivalent to independence.

Check Your Understanding

Use population frequencies and state any condition needed for a conditional probability.

  1. If \(p_A=0.30\), \(p_B=0.50\), and \(p_{AB}=0.18\), calculate \(D\) and interpret its sign.
  2. For \(p_A>0\), derive \(P(B\mid A)-p_B=D/p_A\) from the definition of \(D\).
  3. Explain why the covariance of the two allele indicators equals \(D\).
  4. If \(D=0\), what does this imply about the four haplotype probabilities and the two binary indicators?
  5. Why is \(P(B\mid A)\) undefined when \(p_A=0\), even though \(D\) itself is still defined?
Clinical Biostats