
The Hardy-Weinberg Principle — The Null Model of Population Genetics
In 1908, G.H. Hardy and Wilhelm Weinberg independently resolved a critical misconception in early genetics: the idea that dominant alleles would automatically increase in frequency each generation and eventually eliminate recessive alleles from a population. Hardy, a pure mathematician, showed algebraically that allele frequencies remain stable under random mating — dominance has no effect on allele frequency dynamics in an ideal population.
The Hardy-Weinberg principle establishes the baseline expectation for a non-evolving population. It states that for a diploid locus with two alleles A (frequency p) and a (frequency q), where p + q = 1, the expected genotype frequencies after a single generation of random mating are p², 2pq, and q² — and these frequencies will remain constant in every subsequent generation, provided the five equilibrium conditions hold.
The Hardy-Weinberg Equation
p² + 2pq + q² = 1
p²
AA genotype
Homozygous dominant
2pq
Aa genotype
Heterozygous carrier
q²
aa genotype
Homozygous recessive
Also: p + q = 1 (allele frequencies must sum to 1)
The equation is derived from the binomial expansion of (p + q)² = p² + 2pq + q². It reflects the fact that, during random mating, each parent independently passes one of their two alleles to the offspring. The probability of AA is p × p = p²; of Aa is (p × q) + (q × p) = 2pq; of aa is q × q = q². For further mathematical derivation, the NCBI Human Molecular Genetics chapter on population genetics provides a rigorous treatment.
Five Conditions for Hardy-Weinberg Equilibrium
HWE only holds when all five of the following idealised conditions are met simultaneously. In practice, no real population perfectly satisfies all five — but large, randomly mating populations often approximate HWE at most loci, making it a useful practical baseline.
No mutation
New mutations at the locus of interest do not arise, and existing alleles are not converted to other alleles during DNA replication. In practice, mutation rates at individual loci are so low (~10⁻⁸ per generation) that this condition is approximately met at most human loci on generational timescales.
Random mating (panmixia)
All individuals in the population mate randomly without any preference for or against specific genotypes. Non-random mating includes inbreeding (preferential mating between relatives), assortative mating (preference for similar phenotypes), and disassortative mating — all of which alter heterozygosity without changing allele frequencies.
No gene flow
No individuals migrate into or out of the population carrying different allele frequencies. Immigration of individuals from a genetically distinct population introduces new alleles and can rapidly shift allele and genotype frequencies away from HWE expectations.
Infinite (large) population size
In finite populations, allele frequencies drift randomly from generation to generation by chance — a process called genetic drift. Drift is strongest in small populations (effective population size Ne < 100) and can cause significant HWE deviation even without any selection or other forces.
No natural selection
All three genotypes (AA, Aa, aa) must have identical fitness — equal probability of surviving to reproductive age and equal reproductive success. Any fitness difference between genotypes (selective advantage or disadvantage) will alter genotype frequencies and eventually shift allele frequencies away from equilibrium.
Real-World Applications of Hardy-Weinberg in Genetics
Medical genetics — estimating carrier frequency for recessive diseases
HWE allows clinicians to estimate the frequency of heterozygous carriers for autosomal recessive conditions from disease prevalence data alone. If the frequency of affected individuals (q²) is known, then q = √(q²), p = 1 − q, and the carrier frequency = 2pq.
Example: Cystic Fibrosis in European populations
Disease frequency (q²): 1/2500 = 0.0004
Recessive allele frequency (q): √0.0004 = 0.02
Dominant allele frequency (p): 1 − 0.02 = 0.98
Carrier frequency (2pq): 2 × 0.98 × 0.02 ≈ 0.039 ≈ 1 in 25
GWAS quality control — detecting genotyping errors
In genome-wide association studies (GWAS), Hardy-Weinberg testing is a standard quality control step. Control samples should be in HWE at the vast majority of loci. Systematic HWE deviation in control samples at a specific SNP typically indicates a genotyping error — cluster plot misalignment, batch effects, or platform-specific artefacts — rather than a genuine biological signal. Loci with HWE p-values below 10⁻⁶ in controls are typically excluded from analysis.
Forensic genetics — DNA profile interpretation
Forensic DNA databases assume HWE when calculating the probability of a random match between a crime scene profile and an unrelated individual. The probability of a specific heterozygous genotype at a locus is estimated as 2p₁p₂ (where p₁ and p₂ are the frequencies of the two alleles) under HWE. Deviations from HWE in the relevant population database can affect the accuracy of match probability calculations used in court.
Conservation biology — detecting inbreeding in threatened species
Small or fragmented populations of endangered species often show HWE deviation — specifically, a deficit of heterozygotes relative to HWE predictions. This heterozygosity deficit is a key indicator of inbreeding depression. Conservation geneticists use HWE testing across multiple microsatellite loci to quantify inbreeding coefficients and guide breeding programmes designed to maximise genetic diversity.
Worked Example — HWE Calculation and Chi-Square Test
A geneticist surveys a population of 1000 individuals for the MN blood group system and observes: 360 MM (AA), 480 MN (Aa), and 160 NN (aa) individuals. Is this population in Hardy-Weinberg equilibrium?
Step 1 — Calculate allele frequencies
Total alleles = 2 × 1000 = 2000
p (M allele) = (2 × 360 + 480) ÷ 2000 = 1200 ÷ 2000 = 0.60
q (N allele) = (2 × 160 + 480) ÷ 2000 = 800 ÷ 2000 = 0.40
Check: p + q = 0.60 + 0.40 = 1.00 ✓
Step 2 — Calculate expected genotype counts
Expected MM = p² × N = 0.36 × 1000 = 360
Expected MN = 2pq × N = 0.48 × 1000 = 480
Expected NN = q² × N = 0.16 × 1000 = 160
Step 3 — Chi-square test
χ² = (360−360)²/360 + (480−480)²/480 + (160−160)²/160
χ² = 0 + 0 + 0 = 0.000
χ² (0.000) < critical value (3.841)
Try this example yourself: enter 360, 480, 160 in the "Observed genotype counts" mode above.
Frequently Asked Questions — Hardy-Weinberg Equilibrium
What is Hardy-Weinberg equilibrium?
What is the Hardy-Weinberg equation p² + 2pq + q² = 1?
How do you calculate allele frequency from genotype counts?
What are the five conditions for Hardy-Weinberg equilibrium?
How do you test for deviation from Hardy-Weinberg equilibrium?
What does deviation from Hardy-Weinberg equilibrium mean?
How is Hardy-Weinberg equilibrium used in medical genetics?
What is the carrier frequency formula in Hardy-Weinberg genetics?
Related Tools
Punnett Square Calculator
Individual cross genetics — monohybrid to pentahybrid with genotypic and phenotypic ratios.
Open CalculatorBaby Genetics Calculator
Polygenic trait probabilities for eye colour, hair colour, and blood type.
Open CalculatorBlood Type Calculator
ABO and Rh factor inheritance — includes codominance and carrier analysis.
Open CalculatorIncomplete Dominance Calculator
Genetics crosses with blended intermediate phenotypes.
Open Calculator