Health Tools

Hardy-Weinberg Equilibrium Guide: The Equation That Reveals When Evolution Is Happening

11 min readBy KBC Grandcentral Research Team

The Hardy-Weinberg principle, independently derived in 1908 by British mathematician G.H. Hardy and German physician Wilhelm Weinberg, provides a mathematical null hypothesis for evolution. If a population's allele frequencies match the Hardy-Weinberg prediction, evolution is not occurring. Deviations tell you exactly how and why it is.

Allele Poolp = freq(A) · q = freq(a)p + q = 1Hardy-Weinberg Equationp² + 2pq + q² = 1A (p)a (q)A (p)a (q)AA (p²)Aa (pq)Aa (pq)aa (q²)5 HWE Conditions:1. Random mating2. No mutation3. No migration4. No natural selection5. Large population sizeThe Null Hypothesis of Evolution

Key Takeaways

  • p² + 2pq + q² = 1 predicts genotype frequencies from allele frequencies under no evolution
  • p = dominant allele frequency, q = recessive allele frequency; p + q = 1
  • q² = frequency of homozygous recessive — the only directly observable genotype from phenotype
  • Deviations from HWE reveal selection, inbreeding, genetic drift, migration, or assortative mating
  • Used in medical genetics to estimate carrier frequencies for autosomal recessive diseases like cystic fibrosis

The Hardy-Weinberg Equation Explained

Consider a gene with two alleles: A (dominant, frequency p) and a (recessive, frequency q). Since there are only two alleles at this locus, p + q = 1. In a randomly mating population with no evolutionary forces, the expected genotype frequencies after one generation are:

  • AA (homozygous dominant): p² — probability both alleles drawn from pool are A
  • Aa (heterozygous carrier): 2pq — two ways to get one A and one a
  • aa (homozygous recessive): q² — probability both alleles are a

These frequencies sum to 1: p² + 2pq + q² = 1. This is a mathematical identity (it's just (p+q)² expanded) — which is why the principle holds for any allele frequencies, not just 50/50.

Practical Application: Estimating Carrier Frequency

Cystic fibrosis (CF) is an autosomal recessive disease. Approximately 1 in 2,500 Europeans are born with CF (homozygous recessive, aa). Using Hardy-Weinberg to find the carrier frequency:

Cystic Fibrosis Carrier Frequency Calculation

Step 1:q² = 1/2500 = 0.0004 (frequency of affected individuals)
Step 2:q = √0.0004 = 0.02 (frequency of the CF allele)
Step 3:p = 1 − q = 1 − 0.02 = 0.98 (frequency of normal allele)
Step 4:2pq = 2 × 0.98 × 0.02 = 0.0392 ≈ 1 in 25 people carry one CF allele

This closely matches observed carrier rates (~1/22–1/25 in Caucasian populations), validating the HWE approach for estimating carrier frequencies of recessive diseases.

The 5 Conditions and What Violations Mean

Random mating

Assortative mating (people choosing partners by phenotype) increases homozygosity; inbreeding increases q²

No mutation

New mutations shift allele frequencies slowly; mutation pressure in both directions creates mutation-selection balance

No migration (gene flow)

Immigrants introduce new alleles; gene flow homogenizes frequencies between populations

No natural selection

Differential survival/reproduction shifts p and q over generations — the mechanism of Darwinian evolution

Large population size

Small populations experience genetic drift — random allele frequency changes. Can fix deleterious alleles or eliminate beneficial ones

Calculate Hardy-Weinberg Frequencies

Hardy-Weinberg Calculator

Calculate allele and genotype frequencies, determine if a population is in Hardy-Weinberg equilibrium, and estimate carrier frequencies for recessive traits.

Open Hardy-Weinberg Calculator →