biology2u
Tier
⌕ Search ⌘K
Concept

Hardy-Weinberg equilibrium

T-176Home BU-102Threads structure · energy
Statement

Consider one autosomal locus carrying alleles \(A\) and \(a\) in a diploid population with discrete, non-overlapping generations, and suppose meiosis is fair, fertility is genotype-independent, allele frequencies are equal in the two sexes, mating is random with respect to the locus, and no mutation, migration, selection or sampling drift acts between the gamete pool and the census of the next generation. Let \(p\) and \(q=1-p\) be the frequencies of \(A\) and \(a\) in the parental gamete pool. Then the zygotes of the next generation carry \(AA\), \(Aa\), \(aa\) in the frequencies \(p^2\), \(2pq\), \(q^2\) — whatever the parental genotype frequencies were — the allele frequency is unchanged, \(p'=p\), and both allele and genotype frequencies are then fixed in every subsequent generation. The equilibrium is attained in exactly one generation of random mating, and it is a one-parameter family of neutrally stable fixed points indexed by \(p\), not an attractor towards which a disturbed population is pulled back.

Why it matters

Population genetics is the study of how allele frequencies change, and no change can be measured without a statement of what “no change” looks like. Hardy–Weinberg supplies it, and supplies it in an unusually strong form: it does not merely assert that frequencies stay put, it computes the exact genotype frequencies that Mendelian segregation (The law of segregation) plus random union of gametes is obliged to produce, from any starting genotype distribution, in a single generation. Everything else in the subject is then written as a departure from it. Genetic drift is what happens when the population is finite, Gene flow when it is not closed, Mutation–selection balance when alleles are created and removed, Inbreeding and heterozygosity when mating is not random, and Natural selection when genotypes differ in fitness. Each of these is quantified by a coefficient that is defined as a deviation from the proportions derived below.

The practical consequences run in both directions. Forwards, the result converts an allele frequency into predicted genotype frequencies, which is how a carrier frequency is estimated from the incidence of a recessive disease, how a genetic counsellor turns a population statistic into a couple’s risk, and how the expected heterozygosity of a marker is computed before an experiment is run (Genomic medicine). Backwards, it converts observed genotype counts into a test: a locus whose genotype counts deviate significantly from \(p^2, 2pq, q^2\) is telling you that one of the hypotheses fails there, and modern genome-wide studies run exactly this test at every one of a million markers as their first quality filter — a marker out of Hardy–Weinberg proportions in healthy controls is usually not evidence of biology but evidence that the genotyping assay is misreading heterozygotes. The same statistic, read in the other direction, is the standard detector of cryptic population structure and of recent admixture.

Hypotheses
One autosomal locus in a diploid organism, with discrete non-overlapping generations.Autosomal so that both sexes carry two copies transmitted symmetrically; the X-linked case obeys a different recursion and does not reach the proportions in one generation (Step 10). Discrete generations so that “the next generation” is well defined: in an age-structured population a census pools cohorts born under different allele frequencies, and the pooled sample can show a deficit of heterozygotes purely from that pooling, exactly as in the Wahlund effect.
Mating is random with respect to this locus — formally, the two gametes that unite in a zygote are independent draws from the gamete pool.This is the only hypothesis that does real work in producing the proportions, and it is weaker than “mating is random”: a population may choose mates assortatively on height, on geography, on culture and on a thousand other loci, and this locus will still show \(p^2,2pq,q^2\) provided the chosen partner’s genotype at this locus is uninformative. Positive assortment or inbreeding introduces a positive correlation between the two uniting gametes and depletes heterozygotes without touching \(p\).
Meiosis is fair and fertility is genotype-independent.A heterozygote must transmit \(A\) and \(a\) with probability \(\tfrac12\) each, and the three genotypes must contribute gametes in proportion to their frequencies. Meiotic drive (the \(t\)-haplotype of the house mouse, segregation distorters in Drosophila) violates the first; differential fertility violates the second. Either makes the gamete-pool allele frequency differ from the adult allele frequency, and Step 2 fails before random mating is ever invoked.
Allele frequencies are equal in the two sexes.If they are not — after a sex-biased founding event or sex-biased migration — the first generation of offspring shows an excess of heterozygotes of size \(-(p_f-p_m)^2/(4\bar p\bar q)\) in the \(F\) scale, and the proportions are reached only in the second generation (Step 9).
The population is infinite.Only this converts probabilities into realised frequencies. In a population of \(N\) diploids the allele frequency after one generation is a binomial sample of \(2N\) gametes, so \(\operatorname{Var}(p')=pq/(2N)\) and expected heterozygosity decays by a factor \(1-1/(2N)\) per generation. Nothing about the proportions requires infinity — a finite population still produces them in expectation each generation — but the constancy of \(p\) does.
No mutation, migration or selection between gamete pool and census.These are what make \(p\) a constant of the motion rather than merely a quantity that random mating preserves. Human autosomal point-mutation rates are of order \(10^{-8}\) per base pair per generation, so mutation moves \(p\) by an utterly negligible amount over the timescale of any single test; selection and migration routinely do not.
Genotypes are scored without error.Needed for the empirical test rather than for the mathematics. A null allele that fails to amplify, or a probe that calls heterozygotes as homozygotes, produces a heterozygote deficit indistinguishable in the statistic from inbreeding. This is the single commonest cause of a real dataset failing the test, and it is a laboratory fault, not a population.
Proof

The argument has three parts. Steps 1–5 push one generation forward: adults \(\to\) gamete pool \(\to\) zygotes. Steps 6–8 show that the resulting state is fixed, identify the whole equilibrium set, and give the single coordinate \(F\) that measures departure from it. Steps 9–12 remove the idealisations that were assumed for convenience — equal frequencies in the sexes, autosomal inheritance, two alleles, an infinite sample — and produce the statistic by which the result is tested on real counts.

1
\[ P+H+Q=1,\qquad p=P+\tfrac12 H,\qquad q=Q+\tfrac12 H,\qquad p+q=1 \]
Notation and the census. \(P,H,Q\) are the frequencies of \(AA\), \(Aa\), \(aa\) among adults, so the state of the population at this locus is a point of a two-dimensional simplex. The allele frequency is obtained by counting alleles rather than individuals: of the \(2N\) copies present, each \(AA\) individual contributes two \(A\) copies and each \(Aa\) one, giving \(p=(2NP+NH)/(2N)=P+\tfrac12H\). Adding the two expressions returns \(P+H+Q=1\), so \(p\) and \(q\) carry one dimension of the state and something else must carry the other. A
2
\[ \Pr(\text{gamete carries }A)\;=\;P\cdot 1+H\cdot\tfrac12+Q\cdot 0\;=\;P+\tfrac12H\;=\;p \]
The gamete pool. Condition on the genotype of the parent producing the gamete and use the law of total probability: homozygotes transmit their allele with certainty, and a heterozygote transmits \(A\) with probability \(\tfrac12\) by Mendelian segregation. The weighting by \(P,H,Q\) is legitimate only because fertility is genotype-independent (Hypotheses). The conclusion is the load-bearing one: the allele frequency of the gamete pool equals the allele frequency of the adults, whatever the genotype frequencies. Meiotic drive and fertility differences attack this step and nothing else. B
3
\[ \Pr\left(X_1=u,\ X_2=v\right)=\Pr(X_1=u)\,\Pr(X_2=v),\qquad u,v\in\{A,a\} \]
Random mating, stated as what it actually assumes. Let \(X_1,X_2\) be the alleles carried by the maternal and paternal gametes that unite in a given zygote. Random union of gametes is precisely the assertion that these two random variables are independent. Note what has been assumed and what has not: nothing is required about how mates are chosen on any other trait, and nothing about the parents being unrelated in general — only that knowing one uniting gamete tells you nothing about the other at this locus. B
4
\[ \Pr(AA)=p^2,\qquad \Pr(Aa)=\Pr(A,a)+\Pr(a,A)=2pq,\qquad \Pr(aa)=q^2,\qquad p^2+2pq+q^2=(p+q)^2=1 \]
Multiply out. The zygote’s genotype is the unordered pair \(\{X_1,X_2\}\), so the count of \(A\) copies is \(\operatorname{Binomial}(2,p)\) and the heterozygote receives a factor of two because two distinct ordered outcomes map onto it — the origin of the \(2\) that students most often lose. The three probabilities sum to one automatically, which is a check rather than an extra assumption. A
5
\[ \hat P=\frac{n_{AA}}{N},\qquad \operatorname{Var}\left(\hat P\right)=\frac{p^2\left(1-p^2\right)}{N}\ \xrightarrow[\ N\to\infty\ ]{}\ 0\ \Longrightarrow\ \left(P',H',Q'\right)=\left(p^2,2pq,q^2\right) \]
From probabilities to frequencies. With \(N\) zygotes formed independently, \(n_{AA}\) is binomial and the realised frequency has variance \(O(1/N)\); the infinite-population hypothesis (Hypotheses) sends it to zero, so the realised genotype frequencies equal the probabilities exactly. This is the only place infinity is used in deriving the proportions, and it is why a real, finite population shows the proportions only up to sampling noise of order \(N^{-1/2}\) — which is exactly what the test of Step 12 measures against. B
6
\[ p'=P'+\tfrac12H'=p^2+\tfrac12\left(2pq\right)=p^2+pq=p\left(p+q\right)=p \]
The allele frequency is invariant. Apply the definition of Step 1 to the new genotype frequencies and factorise before evaluating: the algebra collapses through \(p+q=1\). No hypothesis beyond those already used is needed, so under random mating alone the allele frequency is reproduced exactly, generation after generation. Dominance appears nowhere in this line — which is the historical point of the theorem, since it disposes of the idea that a dominant allele must spread merely by being dominant. A
7
\[ T:\left(P,H,Q\right)\mapsto\left(p^2,2pq,q^2\right),\qquad T\circ T=T,\qquad \operatorname{Fix}(T)=T(\Delta)=\mathcal{H}=\left\{\left(p^2,2pq,q^2\right):p\in[0,1]\right\} \]
The equilibrium set, and its stability type. \(T\) is the one-generation map; it depends on its argument only through \(p\) (Steps 2–4) and it preserves \(p\) (Step 6), so applying it twice does the same as applying it once — \(T\) is a projection of the simplex onto the parabola \(\mathcal{H}\), whose every point is fixed. Two consequences follow at once. Convergence takes exactly one generation, not asymptotically many. And the equilibrium is neutrally stable: perturb \(p\) and the population settles on a different point of \(\mathcal{H}\) and stays there, with no restoring force. On the de Finetti diagram this is the familiar parabola inscribed in the genotype triangle, and \(T\) is vertical projection onto it. C
8
\[ P=p^2+Fpq,\qquad H=2pq\left(1-F\right),\qquad Q=q^2+Fpq,\qquad F=1-\frac{H}{2pq},\qquad -\min\left(\frac{p}{q},\frac{q}{p}\right)\le F\le 1 \]
Deviation coordinates. The simplex is two-dimensional and \(p\) uses one dimension, so a single further number describes any state; solving \(H=2pq(1-F)\) for \(F\) and using \(P=p-\tfrac12H\), \(Q=q-\tfrac12H\) gives the displayed parameterisation, which is a change of coordinates and not an assumption. \(F\) is the fixation index: it is the correlation between the two uniting gametes, zero exactly on \(\mathcal{H}\), positive for a heterozygote deficit (inbreeding, subdivision, null alleles) and negative for an excess (Step 9, or selection favouring heterozygotes). The bounds are the requirement that all three frequencies be non-negative. Step 7 now reads: \(T\) sets \(F\) to zero and leaves \(p\) alone. B
9
\[ P'=p_fp_m,\quad H'=p_fq_m+q_fp_m,\quad Q'=q_fq_m\ \Longrightarrow\ p'=\tfrac12\left(p_f+p_m\right)=\bar p,\qquad F'=-\frac{\left(p_f-p_m\right)^2}{4\bar p\,\bar q}\le 0 \]
Unequal frequencies in the sexes. Independence still holds between the maternal and paternal gametes, but they are drawn from pools with different compositions, so the products are no longer symmetric. Writing \(d=p_f-p_m\), the identity \(p_fp_m=\bar p^{\,2}-d^2/4\) turns the first expression into \(P'=\bar p^{\,2}+F'\bar p\bar q\) with the \(F'\) displayed — a heterozygote excess, strictly negative unless \(d=0\). Autosomal transmission is symmetric, so both sexes of the offspring generation have allele frequency \(\bar p\); one further round of random mating then lands on \(\mathcal{H}\). Hardy–Weinberg proportions are therefore reached in one generation from equal sexes and in two generations otherwise. B
10
\[ p_m^{(t+1)}=p_f^{(t)},\qquad p_f^{(t+1)}=\tfrac12\left(p_f^{(t)}+p_m^{(t)}\right);\qquad \bar p=\tfrac13\left(2p_f^{(t)}+p_m^{(t)}\right)\ \text{invariant},\qquad d^{(t)}=\left(-\tfrac12\right)^{t}d^{(0)} \]
The X-linked case, where the one-generation claim genuinely fails. A male receives his single X from his mother, so his allele frequency is last generation’s female value; a female receives one X from each parent, so hers is the average. The transition matrix \(\begin{pmatrix}\tfrac12&\tfrac12\\1&0\end{pmatrix}\) acting on \(\left(p_f,p_m\right)\) has characteristic polynomial \(\lambda^2-\tfrac12\lambda-\tfrac12\), hence eigenvalues \(1\) and \(-\tfrac12\); the left eigenvector for \(\lambda=1\) is \(\left(2,1\right)\), which is what makes the weighted mean \(\bar p\) conserved (females carry two thirds of the X copies), and the eigenvalue \(-\tfrac12\) gives geometric decay of the sex difference \(d=p_f-p_m\) with alternating sign. Equilibrium is approached, never attained in finite time, and at it females show \(p^2,2pq,q^2\) while males show \(p,q\) — which is why X-linked recessive conditions are far commoner in males (Sex linkage). C
11
\[ P_{ii}=p_i^2,\qquad P_{ij}=2p_ip_j\ \left(i\ne j\right),\qquad \sum_{i=1}^{k}p_i=1,\qquad \#\text{genotypes}=\binom{k+1}{2}=\frac{k(k+1)}{2},\qquad H_{\exp}=1-\sum_i p_i^2 \]
Arbitrarily many alleles. Steps 2–4 never used the fact that there were only two: conditioning on the parental genotype gives a gamete pool with frequencies \(p_i\), and independent union gives the multinomial expansion of \(\left(\sum_i p_i\right)^2=1\), term by term. The expected heterozygosity \(1-\sum_ip_i^2\) is the standard measure of genetic diversity at a marker, and it is a Hardy–Weinberg quantity by construction — a fact worth remembering whenever it is quoted for a structured population, where it is not the observed heterozygosity. B
12
\[ \hat p=\frac{2n_{AA}+n_{Aa}}{2n},\qquad O-E=n\hat F\hat p\hat q\left(1,-2,1\right)\ \Longrightarrow\ \chi^2=\sum\frac{(O-E)^2}{E}=n\hat F^{\,2}\left(\hat p+\hat q\right)^2=n\hat F^{\,2},\qquad \mathrm{df}=1 \]
The test, and the exact form it takes. \(\hat p\) is the maximum-likelihood estimator under the model (it is just the allele count). Substituting the parameterisation of Step 8 into \(E=\left(n\hat p^2,2n\hat p\hat q,n\hat q^2\right)\) gives deviations in the ratio \(1:-2:1\), and \(\hat p^2\hat q^2\left(\hat p^{-2}+2\hat p^{-1}\hat q^{-1}+\hat q^{-2}\right)=\left(\hat p+\hat q\right)^2=1\) collapses the sum to \(n\hat F^{\,2}\). Two consequences: the goodness-of-fit statistic is the squared fixation index scaled by the sample size, so the test and the inbreeding coefficient are the same measurement; and there is \(1\) degree of freedom, not \(2\) — three classes, minus one for the total, minus one for the estimated \(\hat p\). Generally \(k\) alleles leave \(k(k-1)/2\) degrees of freedom. C
Result
\[ \left(P,H,Q\right)=\left(p^2,\ 2pq,\ q^2\right),\qquad p'=p,\qquad F\equiv 1-\frac{H}{2pq}=0\ \ \text{after one generation of random mating} \]

Reading. Random union of gametes throws away every trace of the parental genotype distribution and keeps only the allele frequency; the genotype frequencies are then whatever the binomial expansion of \((p+q)^2\) says they are. The population does not drift towards this state over many generations — it arrives in one, and then stays, because the map that produces it is a projection.

Scope. All quantities are dimensionless frequencies; counts are in individuals and time is in generations. One autosomal locus, diploid, discrete generations, sexes equal in allele frequency, fair meiosis, genotype-independent fertility, random union of gametes, and — for the constancy across generations, not for the proportions themselves — an infinite closed population free of mutation and selection. Two alleles were assumed only for readability (Step 11); unequal sexes cost one extra generation (Step 9); X linkage replaces the one-generation result by geometric convergence with ratio \(-\tfrac12\) (Step 10).

Corollaries & converses
  • Carrier excess for a rare recessive. \(\dfrac{2pq}{q^2}=\dfrac{2p}{q}\approx\dfrac{2}{q}\) for small \(q\): an allele causing disease in \(1\) in \(10^4\) births has \(q=10^{-2}\) and sits in about \(200\) unaffected carriers for every affected homozygote. Equivalently, a fraction \(p\) of all copies of a recessive allele is hidden in heterozygotes, which is why selection against recessives is so slow (Mutation–selection balance).
  • Maximum heterozygosity. \(2pq\le\tfrac12\), with equality only at \(p=q=\tfrac12\); with \(k\) alleles the ceiling is \(1-1/k\). No diploid locus can be more than half heterozygous on two alleles, however the frequencies are arranged.
  • Estimating \(q\) from a phenotype. If \(aa\) is the only genotype expressing the recessive phenotype, \(\hat q=\sqrt{\text{incidence}}\) — the only route to an allele frequency when heterozygotes are phenotypically invisible, and one that is valid only under the hypotheses, since the square root of an incidence inflated by inbreeding overestimates \(q\).
  • X-linked sex ratio of affection. At equilibrium the affected male : affected female ratio is \(q:q^2\), i.e. \(1/q\). For \(q=0.01\) that is \(100:1\), which is why pedigree evidence of a strong male bias is itself evidence of X linkage.
  • The Wahlund effect. Pooling subpopulations that are each internally in Hardy–Weinberg proportions gives \(F=\operatorname{Var}(p)/\left(\bar p\bar q\right)\ge0\): a heterozygote deficit is manufactured by the pooling alone, with no inbreeding and no selection anywhere in the system.
  • The test is the coefficient. \(\chi^2=n\hat F^{\,2}\) exactly (Step 12), so the smallest departure a sample of \(n\) can reject at the five per cent level is \(|F|=\sqrt{3.841/n}\) — about \(0.062\) at \(n=1000\). “Consistent with Hardy–Weinberg” from a small sample is a weak statement, and the sample size fixes exactly how weak.
  • Converse fails. Observing \(p^2,2pq,q^2\) does not establish the hypotheses. Selection acting only on the zygote-to-adult transition leaves newborns in exact Hardy–Weinberg proportions every generation while \(p\) marches steadily (Problem 5); two departures of opposite sign can cancel; and a locus with a very common allele has almost no power to detect anything. The implication runs one way only.
  • Contrast with linkage equilibrium. Randomisation within a locus is complete after one meiosis, but randomisation between loci is not: gametic disequilibrium decays as \(D_t=(1-r)^tD_0\), taking many generations for tightly linked loci (Linkage and recombination). A population can therefore sit exactly on \(\mathcal{H}\) at every locus and still carry strong associations between them, which is precisely what association mapping exploits.
Fails without
  • Finite population — the drift regime: with \(N\) diploids the next generation’s allele frequency is a binomial sample of \(2N\) gametes, so \(\mathbb{E}\left(p'\right)=p\) but \(\operatorname{Var}\left(p'\right)=pq/(2N)\), and expected heterozygosity decays as \(H_t=H_0\left(1-1/(2N)\right)^t\), with every locus eventually fixed or lost. The genotype proportions survive — each generation is still binomial at whatever \(p\) currently is — but the constancy does not, and for \(N=50\) heterozygosity halves in about \(70\) generations. This is the regime of every real conservation population and the reason effective population size is the central parameter of Genetic drift and The neutral theory.
  • Population subdivision — the Wahlund regime: take two subpopulations of equal size in Hardy–Weinberg proportions at \(p_1=0.9\) and \(p_2=0.3\) and pool them. The pooled sample has \(\bar p=0.6\), \(\operatorname{Var}(p)=0.09\), hence \(F=0.09/(0.6\times0.4)=0.375\) and genotype frequencies \(0.45, 0.30, 0.25\) against expectations \(0.36,0.48,0.16\) — a \(37.5\) per cent heterozygote deficit produced by geography alone. Nothing inside either subpopulation is out of equilibrium; the deficit is an artefact of the sampling boundary, and it is the basis of \(F_{ST}\) as a measure of differentiation (Gene flow).
  • Non-random mating — the inbreeding regime: mating between relatives makes the two uniting gametes positively correlated, which is what \(F\) measures in its original sense. Genotype frequencies move to \(p^2+Fpq,\ 2pq(1-F),\ q^2+Fpq\) while \(p\) does not move at all — so inbreeding changes who carries the alleles, not how many there are, and its cost is the exposure of recessive homozygotes, whose frequency rises from \(q^2\) to \(q^2+Fpq\). For a rare allele with \(q=0.001\) and first-cousin mating (\(F=1/16\)), homozygote frequency rises from \(10^{-6}\) to about \(6.3\times10^{-5}\), a \(63\)-fold increase (Inbreeding and heterozygosity).
  • Selection between census points — the mismatched-stage regime: if genotypes differ in viability, the newborn cohort is in Hardy–Weinberg proportions and the adult cohort is not, so the answer depends on when you sample. With relative fitnesses \(1,1,1-s\) acting on Hardy–Weinberg zygotes, the zygote cohort has mean fitness \(\bar w=1-sq^2\) — which is also the fraction of it that survives — and the survivors have fixation index \(F=1-\bar w/(1-sq)=-spq/(1-sq)\) — a heterozygote excess, because only homozygotes were culled, and one of exactly the size worked out numerically in Problem 5. A study that genotypes adults and reports a deviation has not necessarily found non-random mating.
  • Assay error — the technical regime: a null allele at a primer site, or a probe intensity cluster that merges heterozygotes into a homozygote call, mimics inbreeding perfectly: a heterozygote deficit at one locus while neighbouring loci are clean. Genome-wide studies therefore discard markers failing the test in controls rather than interpreting them, since a genuine biological signal would be expected to show in cases and controls alike and to be shared by markers in linkage disequilibrium with it.
Common errors
  • “The population is in Hardy–Weinberg equilibrium, so it is not evolving.” The statement is about one locus, and it is an implication in one direction only. Selection acting after the zygote stage leaves newborns exactly on \(\mathcal{H}\) every generation while \(p\) changes monotonically (Problem 5); the test at \(n=1000\) cannot even detect \(s=0.2\).
  • “\(p^2+2pq+q^2=1\) is the theorem.” That identity is \((p+q)^2=1\), true of any two numbers summing to one and carrying no biology at all. The theorem is the assertion that the genotype frequencies equal those three terms — which is Steps 2–4, and which can be false.
  • “Take the square root of the heterozygote frequency to get \(q\).” Only the homozygote frequencies are squares. From \(H\) one recovers \(q\) by solving \(2q(1-q)=H\), which has two roots; from countable genotypes one should simply count alleles, \(\hat q=(2n_{aa}+n_{Aa})/(2n)\).
  • “The chi-square test has two degrees of freedom because there are three classes.” One degree of freedom is spent estimating \(\hat p\) from the same data, leaving \(1\); using \(2\) inflates the critical value from \(3.84\) to \(5.99\) and hides real departures. With \(k\) alleles the count is \(k(k-1)/2\).
  • “Hardy–Weinberg requires an infinite population, so it never applies.” Infinity is used only to make the realised frequencies equal the probabilities (Step 5). A finite population produces the proportions in expectation and deviates by \(O(N^{-1/2})\), which is exactly the noise the test is calibrated against; what finiteness really costs is the constancy of \(p\).
  • “Random mating is required.” Random mating with respect to this locus is required (Step 3). Human populations mate highly assortatively on many traits and still sit on \(\mathcal{H}\) at the great majority of loci.
  • “A dominant allele will spread.” Dominance appears nowhere in Step 6. This was the actual question put to Hardy, and the answer is that dominance affects which phenotypes appear, never the arithmetic of transmission.
  • “Pool the sexes, or pool the sampling sites, to increase \(n\).” Pooling groups with different allele frequencies manufactures a heterozygote deficit (Wahlund) whose size grows with the variance in \(p\); the extra sample size buys power to detect an artefact of the pooling.
Discussion

The result was published twice in 1908. Wilhelm Weinberg, a physician in Stuttgart, gave it in a German paper on inheritance in twins and human traits; G. H. Hardy, who was not a biologist, wrote a short letter to Science after R. C. Punnett described to him a claim made in discussion — that brachydactyly, being dominant, ought steadily to increase until three quarters of the population were affected. Hardy’s letter is a page of algebra amounting to Steps 2, 4 and 6, and it opens by apologising for the triviality of the mathematics. The apology is well taken and beside the point: the difficulty was never the algebra but the framing, and the theorem’s real content is the identification of the correct null model. Once that model exists, deviation from it becomes measurable, and the entire quantitative apparatus of population genetics — \(F\)-statistics, effective population size, tests for selection — is built on measuring deviations from it.

Two structural features deserve more emphasis than they usually receive. First, the one-generation convergence is a consequence of \(T\) being a projection (Step 7), and it makes Hardy–Weinberg qualitatively unlike almost every other equilibrium in biology: there is no relaxation time to wait out, no transient, and no basin of attraction. Second, the equilibrium set is a curve of neutrally stable fixed points rather than a single stable one, so the theorem says nothing whatever about which \(p\) a population should have. That is a feature: it cleanly separates the part of the dynamics fixed by Mendelian mechanics (the genotype proportions) from the part that requires evolutionary explanation (the allele frequency), and it is exactly this separation that lets a single number \(F\) carry all information about departures.

The modern use of the result is almost entirely as a diagnostic instrument, and its power properties matter more than its truth. Because \(\chi^2=n\hat F^{\,2}\), power depends on sample size and on \(\hat p\) but not otherwise on the mechanism, and at a locus with a minor allele frequency of one per cent even large samples detect only gross departures — which is why rare-variant genotyping is filtered on other criteria. Conversely, at a million markers the test is performed a million times, so the significance threshold used in practice is severe (typically \(10^{-6}\) or lower in controls) and is chosen to control the false-discovery burden rather than to reflect any biological expectation. Exact tests based on the conditional distribution of \(n_{Aa}\) given the allele counts are preferred to the chi-square approximation whenever an expected cell count falls below about five, which for rare alleles is the normal situation.

Common misconceptions. That the equilibrium describes a population rather than a locus in a population at a stage of its life cycle: the same cohort can be on \(\mathcal{H}\) as zygotes and off it as adults, with no assumption violated except the reader’s about when the census was taken. And that failing the test identifies which hypothesis failed — it does not. A significant \(\chi^2\) says only that the joint model is wrong; distinguishing subdivision from inbreeding from null alleles requires several loci, and the pattern across loci is what carries the information, since a genotyping fault affects one marker while population structure affects them all.

Worked examples

Example 1. The MN blood group is determined by a single autosomal locus with two codominant alleles, so all three genotypes are directly countable. A sample of \(n=1000\) adults from one population gives \(298\) \(MM\), \(489\) \(MN\) and \(213\) \(NN\). Estimate the allele frequencies, test the sample against Hardy–Weinberg proportions, and state what the outcome does and does not license.

1
\[ \hat p=\frac{2n_{MM}+n_{MN}}{2n},\qquad \hat q=1-\hat p \]
Symbols first. Codominance means the genotype counts are observed, so the allele frequency is a direct count of copies (Step 1 of the Proof) and no model is needed to obtain it — an important point, because the estimate must not presuppose the hypothesis being tested. A
2
\[ \hat p=\frac{2\left(298\right)+489}{2000}=\frac{1085}{2000}=0.5425,\qquad \hat q=0.4575 \]
Numbers. The \(2000\) is the number of allele copies in \(1000\) diploid individuals; the units are copies over copies, so \(\hat p\) is dimensionless, as every quantity in this page is. A
3
\[ E=\left(n\hat p^2,\ 2n\hat p\hat q,\ n\hat q^2\right)=\left(294.31,\ 496.39,\ 209.31\right)\ \text{individuals} \]
The expected counts under the Result, with \(\hat p^2=0.29431\), \(2\hat p\hat q=0.49639\), \(\hat q^2=0.20931\). They sum to \(1000.01\) by rounding, which is the arithmetic check that the three proportions are a partition. A
4
\[ \hat F=1-\frac{H_{\text{obs}}}{2\hat p\hat q}=1-\frac{0.489}{0.49639}=0.014883 \]
The fixation index of Step 8, computed from the observed heterozygote frequency alone. Its sign is positive, so heterozygotes are slightly scarcer than the model predicts; its magnitude, about one and a half per cent, is the entire departure of this sample from the equilibrium, since \(\hat p\) and \(\hat F\) together determine all three frequencies. B
5
\[ \chi^2=n\hat F^{\,2}=1000\left(0.014883\right)^2=0.2215\qquad\text{versus}\qquad \sum\frac{(O-E)^2}{E}=\frac{3.694^2}{294.31}+\frac{7.388^2}{496.39}+\frac{3.694^2}{209.31}=0.2215 \]
The identity of Step 12, verified against the direct Pearson computation. The deviations are \(+3.694,\ -7.388,\ +3.694\), in the ratio \(1:-2:1\) exactly as the parameterisation of Step 8 requires — a useful arithmetic check on any Hardy–Weinberg table, since a departure from that ratio means the allele frequency was not computed from the same counts. B
6
\[ \chi^2_{0.05,\,1}=3.841,\qquad 0.2215\lt 3.841\ \Longrightarrow\ \text{do not reject} \]
One degree of freedom: three classes, minus one for the total, minus one for the estimated \(\hat p\) (Step 12). The observed statistic corresponds to a \(p\)-value of about \(0.64\), so the sample is entirely compatible with the model. A
7
\[ \left|F\right|_{\min}=\sqrt{\frac{\chi^2_{0.05,\,1}}{n}}=\sqrt{\frac{3.841}{1000}}=0.062 \]
What the non-rejection is worth. Inverting \(\chi^2=n\hat F^{\,2}\) shows this sample could not have rejected any departure smaller than \(|F|=0.062\) — it is blind to, for example, the effect of a few per cent of first-cousin marriage, or to subdivision with \(\operatorname{Var}(p)\) up to \(0.062\times\hat p\hat q=0.0154\). The correct conclusion is “no departure larger than about \(0.06\) in \(F\)”, not “the population is in equilibrium”. C
\[ \hat p_M=0.5425,\quad \hat p_N=0.4575,\quad \hat F=0.0149,\quad \chi^2=0.2215\ \left(\mathrm{df}=1,\ P\approx0.64\right),\quad \left|F\right|_{\min}=0.062 \]

Reading. The \(1000\) individuals are distributed across the three genotypes almost exactly as random union of gametes at \(p=0.5425\) requires; the residual heterozygote deficit is one and a half per cent of the expected heterozygosity and is well within sampling noise.

Scope. A single autosomal codominant locus in one sample at one time. The test constrains \(|F|\) to lie below about \(0.06\) and constrains nothing else: it cannot distinguish which hypothesis might be failing, and a departure of the size produced by moderate inbreeding or modest subdivision would pass unnoticed at this sample size.

Example 2. Red–green colour vision deficiency is X-linked recessive, and its frequency among males of European ancestry is close to \(8\) per \(100\). (a) Estimate the allele frequency and predict the frequencies of affected and carrier females and the sex ratio of affection. (b) Suppose such a population were founded from males with allele frequency \(q_m^{(0)}=0.20\) and females with \(q_f^{(0)}=0.02\). Find the equilibrium frequency and the number of generations of random mating needed before the sexes differ by less than \(0.005\).

1
\[ \text{males hemizygous}\ \Longrightarrow\ \Pr\left(\text{affected male}\right)=q\ \Longrightarrow\ \hat q=0.080,\qquad \hat p=0.920 \]
A male carries a single X, so his phenotype reports his genotype directly and the male incidence is the allele frequency — no square root, and no Hardy–Weinberg assumption required for this step, only random sampling of males. This is why X-linked allele frequencies are the easiest in human genetics to measure. A
2
\[ \Pr\left(\text{affected female}\right)=q^2=\left(0.080\right)^2=6.4\times10^{-3},\qquad \Pr\left(\text{carrier}\right)=2pq=2\left(0.920\right)\left(0.080\right)=0.147 \]
Females are diploid at this locus, so the equilibrium proportions of Step 10 apply to them: \(6.4\) affected per \(1000\) women, or about \(1\) in \(156\), and \(14.7\) per cent carriers, about \(1\) in \(6.8\). The carrier frequency is \(23\) times the affected-female frequency, the ratio \(2p/q\) of the Corollaries. A
3
\[ \frac{\Pr\left(\text{affected male}\right)}{\Pr\left(\text{affected female}\right)}=\frac{q}{q^2}=\frac{1}{q}=\frac{1}{0.080}=12.5 \]
The sex ratio of affection, in symbols before numbers. Twelve and a half affected men for every affected woman — the signature of X linkage, and one that becomes more extreme the rarer the allele, reaching \(100:1\) at \(q=0.01\). B
4
\[ \bar q=\tfrac13\left(2q_f^{(0)}+q_m^{(0)}\right)=\tfrac13\left(2\left(0.02\right)+0.20\right)=\frac{0.24}{3}=0.080 \]
Part (b). The conserved quantity of Step 10 weights females twice because they carry two of every three X chromosomes in the population. Its value here is \(0.080\), so this founding population would settle at exactly the frequency assumed in part (a) — the eventual equilibrium is fixed at the moment of founding and no amount of mating changes it. B
5
\[ \begin{aligned} q_m^{(1)}&=q_f^{(0)}=0.020, & q_f^{(1)}&=\tfrac12\left(0.02+0.20\right)=0.110,\\ q_m^{(2)}&=0.110, & q_f^{(2)}&=\tfrac12\left(0.11+0.02\right)=0.065,\\ q_m^{(3)}&=0.065, & q_f^{(3)}&=\tfrac12\left(0.065+0.11\right)=0.0875. \end{aligned} \]
Three generations of the recursion, evaluated directly. The sex difference \(d=q_f-q_m\) runs \(-0.18,\ +0.090,\ -0.045,\ +0.0225\): halving in magnitude and reversing sign each generation, exactly as the eigenvalue \(-\tfrac12\) of Step 10 requires. The weighted mean is \(\left(2\left(0.0875\right)+0.065\right)/3=0.080\) at generation three, confirming the invariant. B
6
\[ \left|d^{(t)}\right|=\left(\tfrac12\right)^{t}\left|d^{(0)}\right|\lt 0.005\ \Longleftrightarrow\ \left(\tfrac12\right)^{t}\lt\frac{0.005}{0.18}\ \Longleftrightarrow\ t\gt\frac{\ln 36}{\ln 2}=5.17\ \Longrightarrow\ t=6 \]
Solve in symbols, then substitute. At \(t=5\) the difference is \(0.18/32=0.0056\), still above the target; at \(t=6\) it is \(0.18/64=0.0028\). Six generations — roughly \(150\) years in a human population — and note that the approach is never complete: geometric decay attains its limit only asymptotically, unlike the one-generation autosomal case. A
\[ \hat q=0.080;\quad q^2=6.4\times10^{-3},\quad 2pq=0.147,\quad \frac{\text{males}}{\text{females}}=12.5;\qquad \bar q=0.080,\quad \left|d^{(t)}\right|=\left(\tfrac12\right)^t\left(0.18\right),\quad t=6 \]

Reading. An X-linked allele at \(8\) per cent affects \(8\) per cent of men but only \(0.64\) per cent of women, while \(15\) per cent of women carry it unexpressed; and a founding population with the sexes badly mismatched converges on its permanent frequency, oscillating, with the mismatch halving every generation.

Scope. Red–green deficiency is in reality a composite of several variants of the \(OPN1LW\) and \(OPN1MW\) genes; the arithmetic here treats them as a single recessive allele class, which is legitimate for aggregate frequencies but not for predicting a specific molecular diagnosis. The \(8\) per cent figure is an approximate, ancestry-specific value, and the frequency differs substantially between populations.

Problems
  1. A recessive condition affects \(1\) in \(2500\) newborns in a large, randomly mating population. Estimate the allele frequency and the carrier frequency, find the ratio of carriers to affected individuals, and compute what fraction of all copies of the recessive allele is carried by unaffected heterozygotes. Comment on the consequence for selection against the allele.
    Solution

    Under the Result the incidence of the recessive phenotype is \(q^2\), so \(\hat q=\sqrt{1/2500}=\sqrt{4.0\times10^{-4}}=0.020\) and \(\hat p=0.980\).

    Carrier frequency: \(2pq=2(0.980)(0.020)=0.0392\), i.e. \(3.92\) per cent, or about \(1\) in \(25.5\) people.

    Ratio, in symbols before numbers: \(\dfrac{2pq}{q^2}=\dfrac{2p}{q}=\dfrac{2(0.980)}{0.020}=98\). Ninety-eight carriers for every affected individual.

    Fraction of \(a\) copies in heterozygotes: a heterozygote carries one \(a\) copy and a homozygote two, so the fraction is \(\dfrac{\tfrac12(2pq)}{q}=\dfrac{pq}{q}=p=0.980\). Ninety-eight per cent of the recessive alleles in the population are invisible to selection, sheltered in carriers.

    Consequence: selection can only act on the \(2\) per cent of copies that are exposed as homozygotes, so even lethal recessives are removed extremely slowly. Removing every affected individual each generation changes \(q\) by only \(\Delta q=-q^2(1-q)/(1-q^2)\approx-q^2\approx-4\times10^{-4}\) per generation at this frequency — a relative reduction of about \(2\) per cent per generation, and slower still as \(q\) falls. This is why deleterious recessives persist at appreciable frequencies (Mutation–selection balance).

  2. A sample of \(1000\) individuals genotyped at one autosomal locus gives \(450\) \(AA\), \(300\) \(Aa\) and \(250\) \(aa\). (a) Test the sample against Hardy–Weinberg proportions. (b) Supposing the sample is an equal-sized pooling of two subpopulations that are each internally in Hardy–Weinberg proportions, find their allele frequencies and verify the decomposition. (c) State what happens if the pooled population then mates at random for one generation.
    Solution

    (a) Count alleles: \(\hat p=(2\times450+300)/2000=1200/2000=0.600\), \(\hat q=0.400\). Expected: \(n\hat p^2=360\), \(2n\hat p\hat q=480\), \(n\hat q^2=160\). Observed minus expected is \(+90,\ -180,\ +90\) — the \(1:-2:1\) pattern of Step 8.

    \(\hat F=1-300/480=1-0.625=0.375\), so by Step 12, \(\chi^2=n\hat F^{\,2}=1000(0.375)^2=140.6\) on \(1\) degree of freedom. Against \(3.841\) this is overwhelming (\(P\approx10^{-32}\)): a \(37.5\) per cent deficit of heterozygotes.

    (b) Wahlund: \(F=\operatorname{Var}(p)/(\bar p\bar q)\), so \(\operatorname{Var}(p)=0.375\times0.600\times0.400=0.0900\). For two equal-sized groups with frequencies \(\bar p\pm\delta\) the variance is \(\delta^2\), hence \(\delta=\sqrt{0.0900}=0.300\) and \(p_1=0.900\), \(p_2=0.300\).

    Verification. Subpopulation 1 (\(500\) individuals at \(p=0.9\)): \(0.81,0.18,0.01\), i.e. \(405,\ 90,\ 5\). Subpopulation 2 (\(500\) at \(p=0.3\)): \(0.09,0.42,0.49\), i.e. \(45,\ 210,\ 245\). Totals: \(450,\ 300,\ 250\) — exactly the observed counts. Each subpopulation satisfies Hardy–Weinberg exactly; the pooled sample fails it decisively.

    (c) One generation of random mating across the merged population sets \(F\) to zero (Step 7) at the unchanged allele frequency \(\bar p=0.600\), giving \(360,\ 480,\ 160\). The deficit disappears in a single generation, which is itself a diagnostic: a heterozygote deficit that persists after admixture indicates continuing structure or non-random mating rather than a historical merger.

  3. A population is founded with allele frequencies \(p_f=0.80\) in females and \(p_m=0.40\) in males at an autosomal locus. Find the genotype frequencies among the offspring, the allele frequency in that generation, the value of \(F\), and the genotype frequencies one generation later. Verify the identity \(F=-(p_f-p_m)^2/(4\bar p\bar q)\), and say whether a sample of \(500\) offspring would detect the departure.
    Solution

    Offspring genotype frequencies are products of the two sex-specific gamete pools (Step 9): \(P'=p_fp_m=0.80\times0.40=0.320\); \(H'=p_fq_m+q_fp_m=(0.80)(0.60)+(0.20)(0.40)=0.480+0.080=0.560\); \(Q'=q_fq_m=(0.20)(0.60)=0.120\). Sum \(=1.000\).

    Allele frequency: \(p'=0.320+\tfrac12(0.560)=0.600=\bar p=\tfrac12(0.80+0.40)\), as required, and it is the same in both sexes because autosomal transmission is symmetric.

    \(F=1-H'/(2p'q')=1-0.560/(2\times0.600\times0.400)=1-0.560/0.480=1-1.1667=-0.1667\): a heterozygote excess of one sixth.

    Identity check: \(-(p_f-p_m)^2/(4\bar p\bar q)=-(0.40)^2/(4\times0.600\times0.400)=-0.160/0.960=-0.1667\). Agreement.

    Next generation: both sexes now have \(p=0.600\), so one round of random mating gives \(0.360,\ 0.480,\ 0.160\) — Hardy–Weinberg proportions attained in generation two, not generation one.

    Detection: \(\chi^2=n F^2=500\times(0.1667)^2=500\times0.02778=13.9\) on \(1\) degree of freedom, far above \(3.841\) (\(P\approx2\times10^{-4}\)). Yes, easily detected — and a heterozygote excess of this size in a founder population is a much better clue to sex-biased founding than to any exotic biology.

  4. The ABO locus carries three alleles: \(I^A\) and \(I^B\), codominant with each other, and \(i\), recessive to both, at frequencies \(p,q,r\) with \(p+q+r=1\). A sample of \(1000\) gives phenotypes \(O:490\), \(A:320\), \(B:150\), \(AB:40\). (a) Write the four phenotype frequencies in terms of \(p,q,r\). (b) Estimate the three allele frequencies. (c) State the number of degrees of freedom a Hardy–Weinberg test would carry here, and compute the expected heterozygosity. (d) Say what a non-zero discrepancy \(D=1-(\hat p+\hat q+\hat r)\) would mean.
    Solution

    (a) From Step 11, genotype frequencies are \(p^2, q^2, r^2, 2pq, 2pr, 2qr\). Grouping by phenotype: \(O=r^2\); \(A=p^2+2pr\); \(B=q^2+2qr\); \(AB=2pq\). These sum to \((p+q+r)^2=1\).

    (b) Note that \(A+O=p^2+2pr+r^2=(p+r)^2\) and \(B+O=(q+r)^2\). Solve in symbols first: \(r=\sqrt{O}\), \(p=1-\sqrt{B+O}\), \(q=1-\sqrt{A+O}\).

    Numerically: \(\hat r=\sqrt{0.490}=0.700\); \(\hat p=1-\sqrt{0.150+0.490}=1-\sqrt{0.640}=1-0.800=0.200\); \(\hat q=1-\sqrt{0.320+0.490}=1-\sqrt{0.810}=1-0.900=0.100\). Check: \(0.200+0.100+0.700=1.000\).

    Independent check on the model: predicted \(AB=2pq=2(0.200)(0.100)=0.040\), i.e. \(40\) individuals, matching the observed \(40\) exactly. The \(AB\) class was not used in estimating the frequencies, so this is a genuine test of fit, and here the fit is exact.

    (c) Four phenotype classes, minus one for the total, minus two free allele frequencies estimated (three frequencies constrained to sum to one) leaves \(4-1-2=1\) degree of freedom. Equivalently, by Step 11 with \(k=3\) alleles there are \(k(k-1)/2=3\) degrees of freedom for a genotype-level test, but phenotypes here merge \(AA\) with \(AO\) and \(BB\) with \(BO\), removing two.

    Expected heterozygosity: \(H=1-\sum_ip_i^2=1-(0.040+0.010+0.490)=1-0.540=0.460\).

    (d) The square-root estimators are consistent only if the population really is in Hardy–Weinberg proportions, and they are not maximum-likelihood estimators, so \(\hat p+\hat q+\hat r\) need not equal one in a real sample. A small \(D\) reflects sampling error; a large one indicates departure from the model — population structure, non-random mating, or misclassified phenotypes. Bernstein’s correction rescales the three estimates by \(1+D/2\) (adding \(D/2\) to \(\hat r\) first) to restore the constraint; a maximum-likelihood fit by expectation–maximisation over the unobserved \(AA\)/\(AO\) and \(BB\)/\(BO\) split is the modern alternative.

  5. At an autosomal locus with \(p=0.600\) and \(q=0.400\), zygotes are formed in Hardy–Weinberg proportions but \(aa\) individuals have relative viability \(1-s\) with \(s=0.200\), the other two genotypes having viability \(1\). (a) Find the genotype and allele frequencies among the surviving adults. (b) Compute \(F\) for the adults and the \(\chi^2\) a sample of \(1000\) adults would give; state whether the selection would be detected. (c) Find the genotype frequencies of the next generation of zygotes and explain the general lesson.
    Solution

    (a) Zygotes: \(p^2=0.360\), \(2pq=0.480\), \(q^2=0.160\). Survivors, before normalisation: \(0.360,\ 0.480,\ 0.160(0.800)=0.128\). Mean fitness \(\bar w=1-sq^2=1-0.200(0.160)=0.968\), which is also the sum \(0.360+0.480+0.128\).

    Adult frequencies: \(0.360/0.968=0.37190\); \(0.480/0.968=0.49587\); \(0.128/0.968=0.13223\). Sum \(=1.00000\).

    Adult allele frequencies, in symbols first: \(p'=(p^2+pq)/\bar w=p/\bar w\) and \(q'=q(1-sq)/\bar w\). Numerically \(p'=0.600/0.968=0.61983\) and \(q'=0.400(1-0.080)/0.968=0.368/0.968=0.38017\); the change is \(\Delta q=-0.01983\) per generation.

    (b) \(2p'q'=2(0.61983)(0.38017)=0.47128\), so \(F=1-0.49587/0.47128=1-1.05217=-0.05217\): a heterozygote excess, because the culling removed only homozygotes. The closed form is \(F=-spq/(1-sq)=-(0.200)(0.600)(0.400)/(1-0.080)=-0.048/0.920=-0.05217\), in agreement.

    \(\chi^2=nF^2=1000(0.05217)^2=2.72\) on \(1\) degree of freedom, below the critical \(3.841\). The selection would not be detected: a twenty per cent viability cost, which is enormous by the standards of natural populations, is invisible to a Hardy–Weinberg test on \(1000\) adults. The sample size required is \(n\ge3.841/(0.05217)^2\approx1411\) individuals for even marginal significance.

    (c) Surviving adults mate at random, so their gamete pool has allele frequency \(p'=0.61983\) and their offspring are in Hardy–Weinberg proportions at that frequency: \(0.38419,\ 0.47128,\ 0.14453\). The lesson is that selection acting between zygote and adult leaves every newborn cohort exactly on \(\mathcal{H}\) while the allele frequency marches steadily downwards. Hardy–Weinberg equilibrium is therefore not evidence that a population is not evolving: the equilibrium is restored each generation by random mating, and the evolution shows up in the drift of \(p\) between cohorts, not in the proportions within one. Detecting it requires either sampling the same cohort at two life stages or comparing allele frequencies across generations.