← Guides Linkage Histogram

Introductory 9 min read Open the module

Reading linkage disequilibrium from bar charts

Each gamete bar differs from its expected height by exactly D, so the picture shows the sign and size of the association.

Read first: Genotype frequencies and Hardy-Weinberg

Two charts with the same four categories

Two loci, A and B, give four gamete types: AB, Ab, aB and ab. This module draws two bar charts of them. The first shows the observed frequency of each type in your sample. The second shows the frequency each type would have if the loci were independent, which is the product of the allele frequencies. Both charts use the same vertical scale, so you compare bars by height.

The expected bars come from the allele frequencies alone. With the default counts 230, 270, 120 and 380 (N = 1000), pA = 0.5 and pB = 0.35. The expected frequencies are pA × pB = 0.175 for AB, 0.325 for Ab, 0.175 for aB and 0.325 for ab. They sum to 1, as the observed bars do.

Why compare these two? Independent loci would shuffle alleles freely each generation, so the gamete frequencies would sit at the expected bars. A bar that stays away from its expected height means some process has kept two alleles together: a recent mutation on one haplotype, a mixture of two populations with different allele frequencies, or selection on a combination of alleles. The chart shows that the association exists. It does not say which process made it.

Observed bars, expected line

Figure 1. Observed frequencies are 0.23, 0.27, 0.12 and 0.38 (bars). Expected frequencies are 0.175, 0.325, 0.175 and 0.325 (dashed line). The module shows these as two side-by-side panels. Here they share one panel so the gaps are easy to see.

Every bar is off by D

Subtract the expected bar from the observed bar. AB: 0.23 − 0.175 = +0.055. Ab: 0.27 − 0.325 = −0.055. aB: 0.12 − 0.175 = −0.055. ab: 0.38 − 0.325 = +0.055. The four gaps have the same size, 0.055, which is the disequilibrium coefficient D = f(AB) × f(ab) − f(Ab) × f(aB).

The gaps must be equal because allele frequencies are fixed by the counts. If AB rises above its expectation, the frequency of allele A is unchanged only if Ab falls by the same amount. The same argument applies to the B locus. So AB and ab rise together, Ab and aB fall together, and the sum of the four gaps is zero.

The test statistic is chi-square = N × D² / (pA × pa × pB × pb). For the defaults, D² = 0.003025 and pA × pa × pB × pb = 0.5 × 0.5 × 0.35 × 0.65 = 0.056875, so chi-square = 1000 × 0.003025 / 0.056875 = 53.19. The 5% critical value with one degree of freedom is 3.84.

Two names are worth knowing. When the excess is in AB and ab, the alleles A and B (and a and b) travel together on the same chromosome. This is coupling, and D is positive. When the excess is in Ab and aB, the alleles are on opposite chromosomes. This is repulsion, and D is negative. The Linkage Disequilibrium module adds D′ and r², which put the size of D on a scale from 0 to 1.

Exercise

Find the four gaps

Open the module with the default counts and press Run. Compare the Observed and Expected panels bar by bar, then read D and Chi² above them.

What to expect. AB and ab are 0.055 above their expected heights, and Ab and aB are 0.055 below. D = 0.0550 and Chi² = 53.19.

Open the walkthrough step →

Repulsion: the other pairing

Figure 2. Counts 120, 380, 230, 270. The allele frequencies are the same as before, so the expected line is unchanged (0.175, 0.325, 0.175, 0.325). Now Ab (0.38) and aB (0.23) are above it and AB (0.12) and ab (0.27) are below. D = −0.0550.

Complete association

Figure 3. Counts 50, 0, 0, 50. Only AB and ab occur, at 0.5 each. Every expected frequency is 0.25. D = 0.25, the largest value possible, and the gaps are +0.25 for AB and ab and −0.25 for Ab and aB.

Exercise

Reach equilibrium

Enter 175, 325, 175 and 325 and run. Then enter 0, 50, 50 and 0 and run again.

What to expect. The first sample draws two identical panels, with D = 0 and Chi² = 0. The second has only Ab and aB at 0.5 each, against 0.25 expected, so D = −0.25 and Chi² = 100.

Open the walkthrough step →

What to keep

  • The expected bars are the products of the allele frequencies. Observed minus expected is +D for AB and ab and −D for Ab and aB.
  • The sign of D tells which pair is in excess: positive for AB and ab (coupling), negative for Ab and aB (repulsion).
  • The default sample has D = 0.055 and chi-square = 53.19. The complete association 50, 0, 0, 50 has D = 0.25.
  • Bar heights do not show N. Chi-square does: it falls from 53.19 to 5.32 when the sample shrinks tenfold, with the same bars.