The Hardy-Weinberg Equilibrium as a Null Model

Why don't recessive genetic diseases simply vanish over time? This happens despite selection often working against them. A student's first instinct is different. A rare harmful allele, present in only a few percent of the population, should be steadily bred out. It should disappear. Yet cystic fibrosis, sickle-cell trait, and thousands of other recessive conditions persist. They remain across generations at roughly stable frequencies. Understanding why requires a baseline expectation. We need to know what genotype frequencies should look like in the complete absence of evolution. That means a population that is not changing at all. That baseline is the Hardy-Weinberg equilibrium. It is arguably the single most important null model in evolutionary biology. It is not a description of what usually happens in nature. Almost no real population perfectly satisfies its conditions. Its power lies precisely in being a deliberately unrealistic idealization. It describes a population with no selection, no mutation, no migration, no drift, and random mating. By calculating what genotype frequencies would look like under this fiction, biologists gain a yardstick. Real, evolving populations can be measured against it. Deviation from the Hardy-Weinberg prediction is a signature. It shows that something interesting is actually acting: selection, drift, migration, or mutation. This logic mirrors Newton's first law in physics. An object in motion stays in motion unless a force acts on it. Similarly, allele and genotype frequencies stay constant across generations. This holds unless an evolutionary force acts on them. The Hardy-Weinberg principle formalizes this idea mathematically. It applies to a randomly mating, sexually reproducing population. It gives the idea a name: equilibrium. It was derived independently by the mathematician Godfrey Hardy and the physician Wilhelm Weinberg in 1908. This happened partly in response to a genuine controversy. The controversy concerned whether dominant traits should mechanically increase in frequency over time. This article develops the five assumptions underlying Hardy-Weinberg equilibrium. It derives the p² + 2pq + q² genotype expectation from first principles. It walks through the classical evidence and reasoning. This evidence established the principle as a cornerstone of population genetics. It also works through quantitative examples. These include a clinical carrier-frequency calculation. It also includes a case of detecting selection from a chi-square deviation. It closes by tracing how this 1908 mathematical exercise underpins modern genetic counseling. It also underpins conservation genetics and genome-wide association studies.

Key takeaways
  • Hardy-Weinberg equilibrium predicts genotype frequencies p², 2pq, q² from allele frequencies p and q, and predicts these frequencies stay constant across generations.
  • The prediction holds only under five idealized conditions: no selection, no mutation, no migration, infinite population size (no drift), and random mating.
  • It is a null model: real populations are tested against it, and statistically significant deviation reveals that an evolutionary force is operating.
  • The genotype frequencies are reached in a single generation of random mating starting from any allele frequency, then remain fixed as long as assumptions hold.
  • Chi-square goodness-of-fit tests compare observed genotype counts to Hardy-Weinberg expected counts to detect deviations (e.g., inbreeding, selection against homozygotes).
  • The principle underlies practical tools: estimating unseen recessive carrier frequencies, quality-control checks in genome-wide association studies, and forensic/conservation genetics.
The core insight

If allele frequencies are p and q, genotype frequencies settle at p² : 2pq : q² after one generation of random mating and stay there forever unless some evolutionary force disturbs them — so any measured deviation from that ratio is direct evidence that evolution is happening.

The core idea

The Hardy-Weinberg principle addresses a single question: if you know the frequencies of alleles at a locus, what genotype frequencies do you expect purely from the mechanics of sexual reproduction, with no other forces involved? Consider a single autosomal locus with two alleles, A and a, with frequencies p and q respectively, where p + q = 1. Under random mating, gametes carrying A and a combine as if drawn independently at random from the gene pool — like drawing marbles from a well-mixed jar. The probability of an AA offspring is the probability of drawing A twice, p × p = p². The probability of aa is q × q = q². The probability of Aa is 2pq, because there are two ways to obtain a heterozygote — A from the mother and a from the father, or a from the mother and A from the father — each with probability pq. This gives the celebrated expectation:

p² + 2pq + q² = 1 The Hardy-Weinberg theorem makes two distinct claims that are often conflated. First, an equilibrium claim: these genotype frequencies are reached after just one generation of random mating, regardless of the starting genotype frequencies, and then remain constant generation after generation. Second, a conservation claim: the allele frequencies p and q themselves do not change across generations. Both claims depend on a set of idealizing assumptions holding simultaneously. If any one assumption is violated, allele frequencies, genotype frequencies, or both can shift — and that shift is, by definition, evolution (a change in allele frequencies in a population over time). The five assumptions required for Hardy-Weinberg equilibrium to hold are: 1. No selection — all genotypes have equal survival and reproductive success (equal fitness). 2. No mutation — alleles do not change into other alleles at an appreciable rate. 3. No gene flow / migration — no individuals (and their alleles) enter or leave the population. 4. Infinite population size — no genetic drift, i.e., no random sampling error in which alleles get passed to the next generation. 5. Random mating — individuals do not choose mates based on genotype at this locus (no assortative mating, no inbreeding, no sexual selection at this locus). Two further, usually implicit conditions are also required: the population must be diploid and sexually reproducing, and the locus must be autosomal (not sex-linked, which requires a modified treatment because males are hemizygous). Because virtually every real population violates at least one of these five assumptions to some degree, the point of the model is never to claim that real populations are in Hardy-Weinberg equilibrium. The point is to use the predicted p² : 2pq : q² ratios as a precise, falsifiable expectation, and interpret departures from it as evidence about which evolutionary force is at work and how strongly.

Mechanism — how the equilibrium is reached and maintained

Step 1: Define the gene pool. Consider a population with genotype frequencies at some starting generation: freq(AA) = X, freq(Aa) = Y, freq(aa) = Z, with X + Y + Z = 1. Calculate the allele frequencies by counting alleles: each AA individual contributes two A alleles, each Aa contributes one A and one a, and each aa contributes two a alleles. So: p = freq(A) = X + ½Y q = freq(a) = Z + ½Y Note this works regardless of whether the starting population is itself in Hardy-Weinberg proportions — allele frequency is just gene counting.

Step 2: Random union of gametes. Under random mating, each parent's genotype is irrelevant to which gametes it contributes to the pool; all that matters is the population-wide frequency of A versus a gametes, p and q. Fusing gametes at random is mathematically identical to independently drawing two alleles from a jar containing a fraction p of A alleles and q of a alleles. The binomial expansion of (p + q)² = p² + 2pq + q² gives exactly the probability of each possible zygote genotype.

Step 3: One generation is sufficient. Crucially, this derivation makes no reference to the previous generation's genotype frequencies (X, Y, Z) — only to the allele frequencies (p, q) that those genotypes produced. This means that no matter how skewed the starting genotype distribution is (even a population made entirely of AA and aa homozygotes with no heterozygotes at all), a single generation of random mating brings genotype frequencies to p², 2pq, q² directly.

Step 4: Stability across further generations. Does the next generation, bred from p² : 2pq : q² parents, also produce allele frequency p? Compute it: new p = freq(AA) + ½freq(Aa) = p² + ½(2pq) = p² + pq = p(p+q) = p(1) = p. The allele frequency is unchanged. Since allele frequencies don't change, and genotype frequencies are determined solely by allele frequencies under random mating, the genotype frequencies p² : 2pq : q² persist indefinitely — this is the equilibrium.

Step 5: What breaks it. Each assumption's violation acts through a distinct mechanism:

  • Selection changes the genotype frequencies after zygote formation but before the next generation's gametes are counted — e.g., if aa individuals have lower survival, fewer a alleles enter the next gene pool, so q decreases.
  • Mutation changes A to a (or vice versa) at some low rate μ per generation, slowly shifting p and q even with no selection at all.
  • Migration mixes gene pools with different allele frequencies, pulling the recipient population's p toward the donor population's p.
  • Drift occurs because real populations are finite; the alleles actually transmitted are a finite random sample from the parental gene pool, so p fluctuates by chance, especially strongly in small populations.
  • Non-random mating (inbreeding or assortative mating) does not change allele frequencies by itself, but it redistributes genotype frequencies — inbreeding increases homozygote frequencies above p² and q² and decreases heterozygote frequency below 2pq, even though p and q stay the same.

This last point is important and often missed: non-random mating is the one assumption whose violation changes genotype frequencies without changing allele frequencies. Everything else (selection, mutation, drift, migration) changes allele frequencies too.

Figure
Figure 1 — Genotype frequencies as a function of allele frequency p
Allele frequency p (freq. of A) Genotype frequency 0 1 0.5 max 2pq = 0.5 at p=0.5 p² (AA) q² (aa) 2pq (Aa) p = 0.5, q = 0.5
Figure
Figure 2 — One generation of random mating restores Hardy-Weinberg proportions
Generation 0 (skewed) → random mating → Generation 1 (equilibrium) Generation 0 genotypes AA = 0.49 Aa = 0.00 aa = 0.51 p = 0.7, q = 0.3 (no heterozygotes at all!) random mating, one generation Generation 1 genotypes AA = p² = 0.49 Aa = 2pq = 0.42 aa = q² = 0.09 Same p = 0.7, q = 0.3 Allele frequencies unchanged — only genotype distribution reorganizes to p² : 2pq : q² in ONE generation.

The evidence

The theoretical origin (1908). The Hardy-Weinberg principle did not arise from a single decisive laboratory experiment in the way that, say, the Meselson-Stahl experiment confirmed DNA replication. It arose to settle a conceptual dispute in early genetics. After the rediscovery of Mendel's laws around 1900, some biologists (including the prominent researcher Reginald Punnett) were puzzled by a genuine empirical observation: the dominant human trait brachydactyly (short fingers/toes) remained rare in the population across generations, rather than spreading to dominate as naive intuition about "dominant" alleles might suggest. Punnett discussed this puzzle with the mathematician G. H. Hardy, who quickly showed with simple algebra that dominance has nothing to do with whether an allele becomes more common — frequency change requires an actual evolutionary force, not just the property of being dominant. Hardy published this reasoning in a short 1908 letter to Science. Independently and almost simultaneously, the German physician Wilhelm Weinberg derived the identical result in the context of studying twin births and Mendelian trait segregation in human pedigrees, publishing in German the same year. Neither man considered the result to be a major discovery at the time — Hardy in particular regarded it as an elementary algebraic remark unworthy of much attention, and it is somewhat ironic that a pure mathematician who considered "applied" mathematics distasteful produced one of biology's foundational equations.

Why this counts as evidence, not just algebra. The genuine empirical test of Hardy-Weinberg comes from confronting the predicted p² : 2pq : q² ratios with real population genotype data and asking whether they match. This has been done thousands of times across species and loci. A classic textbook-level test uses human MN blood groups, controlled by two co-dominant alleles (M and N) at a single locus, with genotypes MM, MN, and NN directly distinguishable by simple blood typing (no dominance to obscure heterozygotes, making this an unusually clean test locus). Large surveys of human populations (for example, studies compiled across many ethnic groups through the twentieth century) consistently found genotype counts matching Hardy-Weinberg expectations to within sampling error, when mating with respect to blood group is indeed effectively random (nobody chooses mates by MN type). This concordance across dozens of independent populations is what elevates Hardy-Weinberg from "a plausible algebraic idealization" to "an empirically validated null expectation" — when the assumptions plausibly hold, the ratios really do appear.

Equally important: documented deviations reveal real evolutionary forces. The scientific payoff of the model comes as much from populations that fail the test. Sickle-cell allele frequencies in regions of endemic malaria show a large excess of heterozygotes (HbA/HbS) relative to Hardy-Weinberg expectation calculated from allele frequency alone — direct evidence of heterozygote advantage (balancing selection), later explained mechanistically by Anthony Allison's studies in the 1950s showing that heterozygotes have both usable red blood cell function and resistance to Plasmodium falciparum. Conversely, human populations tested for many recessive Mendelian disease loci in isolated, historically small founding populations (e.g., certain island or religious-isolate populations) show excess homozygosity relative to Hardy-Weinberg expectation, consistent with inbreeding (non-random mating) rather than selection. In both cases, the Hardy-Weinberg ratio is the ruler; the deviation is the measurement of an evolutionary force, precisely as the model was designed to allow.

Modern statistical test. Contemporary population genetics formalizes this comparison with a chi-square goodness-of-fit test: expected genotype counts (Np², N·2pq, Nq², where N is sample size) are compared against observed counts, with degrees of freedom = (number of genotype classes − number of alleles estimated from data) = 1 for a two-allele locus. A significantly large chi-square statistic (p < 0.05) is grounds to reject the null hypothesis that the population is in Hardy-Weinberg equilibrium — this exact test is now a mandatory quality-control step in genome-wide association studies, discussed further below.

Worked examples

Example 1 — Estimating carrier frequency for a recessive disease (clinical genetics). Cystic fibrosis (CF) is an autosomal recessive condition. Suppose in a particular population the disease incidence at birth is observed to be 1 in 2,500 live births. Assume Hardy-Weinberg equilibrium holds (no strong selection differential specifically on CF carriers, random mating with respect to CF genotype, and a population large enough that drift is negligible for this calculation — reasonable first approximations for a large outbred population). Step 1: The disease genotype is aa (homozygous recessive), so: q² = 1/2500 = 0.0004 Step 2: Solve for q: q = √0.0004 = 0.02 Step 3: Then p = 1 − q = 0.98 Step 4: The frequency of unaffected carriers (heterozygotes, Aa) is: 2pq = 2 × 0.98 × 0.02 = 0.0392 ≈ 1 in 25.5 people This is the calculation genetic counselors actually use: from a measured disease incidence, back out the allele frequency, and from that estimate the much higher, clinically crucial carrier frequency — roughly 100 times more common than the disease itself here (1/25 vs 1/2500), because 2pq scales roughly as 2q when q is small, while q² scales as q². This asymmetry — carriers vastly outnumbering affected individuals — is the central reason recessive diseases persist at stable low frequency without being selected away: most copies of the recessive allele are "hidden" in unaffected heterozygotes, invisible to selection acting only on the aa phenotype.

Example 2 — Detecting selection via chi-square deviation (a population genetics scenario). A population geneticist samples 1,000 adult beetles at a locus controlling pigmentation, with alleles D (dark, dominant) and d (light, recessive). Genotyping (using a molecular marker that distinguishes all three genotypes directly, avoiding the dominance problem) gives:

GenotypeObserved count
DD360
Dd480
dd160

Step 1: Calculate allele frequencies by gene counting. Total alleles = 2 × 1000 = 2000 Count of D alleles = 2(360) + 480 = 1200 → p = 1200/2000 = 0.6 Count of d alleles = 2(160) + 480 = 800 → q = 800/2000 = 0.4 (Check: p + q = 1.0 ✓) Step 2: Calculate Hardy-Weinberg expected genotype frequencies and counts. p² = 0.36 → expected DD = 360 2pq = 2(0.6)(0.4) = 0.48 → expected Dd = 480 q² = 0.16 → expected dd = 160 Step 3: Compare observed to expected — they are identical in this case. Chi-square = 0, no significant deviation. This particular sample is fully consistent with Hardy-Weinberg equilibrium: no evidence of selection, non-random mating, or other force from this snapshot alone. Now suppose instead a second sampling of 1,000 beetles from a population living where visual predators hunt by sight gives:

GenotypeObservedExpected (from same p=0.6, q=0.4)
DD300360
Dd620480
dd80160

Chi-square = Σ (Observed − Expected)² / Expected = (300−360)²/360 + (620−480)²/480 + (80−160)²/160 = 3600/360 + 19600/480 + 6400/160 = 10.0 + 40.8 + 40.0 = 90.8 With 1 degree of freedom, the critical chi-square value at p = 0.05 is 3.84. A value of 90.8 is vastly larger, so the null hypothesis of Hardy-Weinberg equilibrium is decisively rejected. The pattern — a large excess of heterozygotes and deficit of both homozygote classes — is the classic signature of heterozygote advantage (balancing/overdominant selection), analogous to the sickle-cell case: here plausibly because heterozygous pigmentation confers some camouflage or thermoregulatory intermediate advantage that either homozygote lacks. The chi-square test does not by itself prove the mechanism, but it rigorously proves that some evolutionary force is acting, and the direction of deviation narrows the hypothesis space for further investigation.

Common misconceptions & traps

MisconceptionCorrection
"Hardy-Weinberg describes real populations accurately."It is a deliberately idealized null model; real populations are tested against it, and are expected to deviate.
"Dominant alleles become more common over time because they are dominant."Dominance is a relationship between genotype and phenotype, not a force that changes allele frequency; this was the exact misconception Hardy's 1908 letter refuted.
"If genotype frequencies aren't p²:2pq:q² this generation, evolution already happened before."One generation of random mating alone restores these ratios even from wildly skewed starting genotype frequencies, if allele frequencies didn't change — so a single non-equilibrium snapshot doesn't by itself prove an evolutionary force, only a repeated or persistent deviation with unchanged allele frequency, or independent knowledge of mating structure, distinguishes transient from forced deviation.
"Non-random mating (inbreeding) changes allele frequencies."Inbreeding changes genotype frequencies (more homozygotes, fewer heterozygotes) but leaves allele frequencies p and q unchanged — it redistributes existing alleles, it doesn't add or remove them.
"A rare recessive disease allele should be selected away to near-zero quickly."Most copies of a rare recessive allele reside in heterozygous carriers invisible to selection on the recessive phenotype, so the allele can persist stably for very long times even under some selection against homozygotes.
"Hardy-Weinberg applies to any trait, including polygenic and sex-linked ones, the same way."The classic p²+2pq+q² formula strictly applies to a single autosomal, two-allele locus; sex-linked loci and multi-allelic or polygenic traits require modified versions of the model.

The scientist behind it

Godfrey Harold Hardy (1877–1947) was one of the most celebrated pure mathematicians of his generation, a Cambridge don renowned for his work in number theory and mathematical analysis, and famous for his essay A Mathematician's Apology, in which he expressed open pride in doing mathematics with no practical application whatsoever. It is a genuinely ironic footnote to his career that his most widely cited and practically useful contribution to science is a short population-genetics letter he apparently regarded as a trivial exercise, worked out after a conversation with the geneticist Reginald Punnett (of Punnett square fame) about why dominant traits were not overrunning populations. Hardy published the algebra in a one-page letter to Science in 1908, almost as an aside, and reportedly never returned to the subject. Wilhelm Weinberg (1862–1937) was a practicing German physician in Stuttgart with a substantial side career in human genetics and biostatistics, publishing on twin studies, the statistical detection of heritability in human pedigrees, and — independently of Hardy and in the same year — the identical p² + 2pq + q² equilibrium result, embedded within a broader 1908 paper on Mendelian inheritance in humans. Weinberg's contribution went largely unrecognized outside German-speaking scientific circles for decades, and the principle was often called simply "Hardy's law" in English-language literature until the mid-twentieth century, when historians of science and geneticists such as Curt Stern drew attention to Weinberg's independent and, in some respects, more thorough treatment, leading to the now-standard joint attribution.

Origins · 1 minGodfrey Harold Hardy and how this was discovered
GH
Godfrey Harold Hardy
1877–1947 · Cambridge mathematician who derived the equilibrium algebra almost as a mathematical aside, in dialogue with geneticist Reginald Punnett, while working chiefly in pure number theory

History
- 1900 — Mendel's laws of inheritance rediscovered by de Vries, Correns, and Tschermak, igniting early genetics.
- 1908 — G. H. Hardy publishes the equilibrium algebra in a short letter to Science, prompted by a puzzle raised by Reginald Punnett.
- 1908 — Wilhelm Weinberg independently derives the identical result in German, embedded in a paper on human Mendelian inheritance.
- 1930s–1950s — Ronald Fisher, Sewall Wright, and J. B. S. Haldane build the mathematical theory of population genetics (the "Modern Synthesis") on top of the Hardy-Weinberg baseline, formalizing selection, drift, and mutation as forces perturbing it.
- 1954 — Anthony Allison documents heterozygote advantage at the sickle-cell locus in malarial regions, a landmark empirical demonstration of Hardy-Weinberg deviation revealing balancing selection.

Where this matters today

Clinical genetics and carrier screening. As shown in Example 1, clinicians and genetic counselors routinely use q² = observed disease incidence to estimate allele frequency q, and then 2pq to estimate the much larger carrier frequency in a population — information directly used in reproductive counseling, especially for conditions like cystic fibrosis, Tay-Sachs disease, and various hemoglobinopathies, particularly when screening panels are designed for specific ethnic populations with known elevated carrier frequencies.

Genome-wide association studies (GWAS) quality control. Every modern GWAS pipeline includes a mandatory Hardy-Weinberg equilibrium test at every genotyped marker across the control samples. A marker showing a strongly significant deviation from Hardy-Weinberg proportions in controls is usually flagged and excluded, not because deviation is biologically impossible, but because in practice it far more often signals a genotyping error (e.g., poor clustering of alleles on a microarray) than a genuine biological signal — Hardy-Weinberg testing here functions as a data-quality filter used across essentially the entire field of human genetics.

Conservation genetics. Wildlife biologists monitoring endangered populations test genetic samples against Hardy-Weinberg expectations to detect excess homozygosity, a warning sign of inbreeding depression in small, fragmented populations — a critical early-warning tool used, for example, in managing genetically bottlenecked populations of species such as cheetahs and Florida panthers, where breeding programs are then designed specifically to restore heterozygosity.

Forensic genetics. DNA profiling match-probability calculations (used in courts to state, for instance, "this genetic profile is expected in 1 in 400 billion individuals") rely on the assumption of Hardy-Weinberg (and linkage) equilibrium across the STR markers used, allowing genotype frequencies at each independent locus to be multiplied together — a direct practical descendant of the p² + 2pq + q² formula.

Agriculture and breeding. Plant and animal breeders exploit deliberate departures from Hardy-Weinberg assumptions — intense artificial selection and non-random (assortative) mating — to shift allele and genotype frequencies rapidly toward desired traits, using Hardy-Weinberg as the explicit baseline against which the efficiency of a breeding program's selection differential is measured each generation.

Ask the tutor: How would the Hardy-Weinberg calculation change if I needed to account for an X-linked recessive disease instead of an autosomal one?

Does a population ever perfectly satisfy all five Hardy-Weinberg assumptions in nature?

Essentially never, and that's expected. Real populations always experience at least some mutation, some finite population size (hence some drift), and usually some degree of migration or non-random mating. The point of the model is not to describe real populations accurately but to provide an exact, falsifiable mathematical baseline. Biologists use it the way physicists use a frictionless plane: nobody thinks real inclines are frictionless, but the idealization lets you isolate and quantify the effect of friction (or, in biology, selection, drift, mutation, and migration) by comparing real outcomes to the frictionless prediction. Some large, outbred populations with strong stabilizing selection approximate it closely at particular neutral loci, which is precisely why such loci are useful for the quality-control and forensic applications described above.

Why does it only take one generation of random mating to reach Hardy-Weinberg proportions, rather than many generations?

Because genotype frequencies in offspring depend only on the allele frequencies among the gametes that combine to form them, not on how those alleles happened to be packaged into genotypes in the parental generation. Random mating is mathematically equivalent to randomly drawing two alleles from the population's gene pool to form each zygote, exactly like the binomial expansion (p+q)². This calculation uses only p and q, so it doesn't matter whether the parental generation was already at p²:2pq:q² or wildly skewed (even entirely homozygous with no heterozygotes at all) — the very next generation of zygotes, formed by random union of gametes, immediately shows p², 2pq, q² proportions, as demonstrated in Figure 2.

If a population shows a significant chi-square deviation from Hardy-Weinberg expectations, does that always mean selection is occurring?

No — a significant deviation only tells you that some Hardy-Weinberg assumption is violated; it does not by itself identify which one. Excess homozygosity could mean selection against heterozygotes, but could equally mean inbreeding, a Wahlund effect (population substructure being sampled as if it were one panmictic population), or genotyping error. Excess heterozygosity could mean heterozygote-advantage selection (as in the sickle-cell case) but could also arise from certain forms of negative assortative mating. Follow-up work — tracking allele frequency changes over generations, testing for population substructure, or direct fitness measurements — is needed to distinguish among these candidate mechanisms once a deviation is detected.

How is Hardy-Weinberg equilibrium modified for a sex-linked locus, like an X-linked gene in mammals?

Because males are hemizygous (one X, one Y) while females are diploid at X-linked loci, the simple p²+2pq+q² formula applies only to females: female genotype frequencies are still p²(XᴬXᴬ) + 2pq(XᴬXᵃ) + q²(XᵃXᵃ). Males, however, simply show genotype frequencies p(Xᴬ Y) and q(Xᵃ Y) directly, equal to the allele frequencies themselves, because they carry only one allele. A further subtlety is that if allele frequencies differ between the sexes at the outset (for instance after migration introduces a new frequency in one sex only), it can take several generations, not one, for male and female allele frequencies to converge and for the equilibrium proportions to be reached, because sons inherit their X only from their mother while daughters inherit an X from each parent.

Can Hardy-Weinberg equilibrium be extended beyond two alleles or beyond a single locus?

Yes. With three alleles A₁, A₂, A₃ at frequencies p, q, r (p+q+r=1), the expected genotype frequencies come from expanding (p+q+r)², giving classes p², q², r² for the three homozygotes and 2pq, 2pr, 2qr for the three heterozygote classes — the logic is identical, just a trinomial rather than binomial expansion. For multiple loci, an analogous concept called linkage equilibrium describes when allele combinations across loci are statistically independent; this is a separate condition from Hardy-Weinberg equilibrium at each individual locus, and populations can be in Hardy-Weinberg equilibrium at every locus individually while still being in linkage disequilibrium between loci, especially if the loci are physically close on a chromosome or under strong recent selection.

Why is Hardy-Weinberg equilibrium described as a "null model" rather than a "law" of evolution?

Calling it a null model emphasizes its role as a statistical hypothesis to be tested and, usually, rejected — much like a null hypothesis of "no difference between groups" in an experiment. Nobody expects the null hypothesis to literally describe reality; its function is to give a precise, quantitative prediction against which real data are compared, so that a significant deviation becomes interpretable evidence of a real effect. Hardy-Weinberg plays exactly this role for evolutionary change: the "real effect" being detected is the action of selection, drift, migration, mutation, or non-random mating, and the size and direction of the deviation help identify and quantify which force, or combination of forces, is responsible.

Does Hardy-Weinberg equilibrium being violated mean the population is adapting or "evolving for the better"?

No — deviation from Hardy-Weinberg equilibrium indicates only that allele or genotype frequencies are changing (or genotype ratios are distorted), not that the change is adaptive, beneficial, or directional in any particular sense. Genetic drift, for example, causes deviation and allele frequency change that is entirely random with respect to fitness, and can even fix a harmful allele by chance in a small population. Evolution, in the strict population-genetic sense used here, is simply a change in allele frequencies over time; it carries no built-in implication of progress, improvement, or a fixed target, and the Hardy-Weinberg framework is deliberately agnostic about the direction or value of whatever change it detects.

Before this

Where this leads