Pro 🔒~20 min

Hardy-Weinberg Equilibrium

Allele frequencies, genotype ratios, and conditions for genetic equilibrium

How it works

The Hardy-Weinberg principle states that allele and genotype frequencies in a population remain constant from generation to generation in the absence of evolutionary forces. Five conditions must be met: (1) no mutation, (2) random mating, (3) no natural selection, (4) infinite population size (no genetic drift), and (5) no gene flow (migration). Given allele frequencies p and q (where p + q = 1), genotype frequencies are AA = p², Aa = 2pq, aa = q². When any condition is violated, evolution occurs. Natural selection changes frequencies based on fitness differences. Genetic drift causes random fluctuations more pronounced in small populations. Mutation introduces new alleles at low rates. Migration introduces alleles from other populations. Non-random mating (assortative mating, inbreeding) changes genotype but not allele frequencies.

Upgrade to Pro to access this experiment

Step-by-step

  1. Set the initial p frequency and population size, then press Simulate.
  2. The bar chart shows current genotype frequencies compared to Hardy-Weinberg predictions.
  3. The line chart tracks p and q over generations.
  4. Introduce selection, mutation, or reduce population size to observe deviations from equilibrium.

Key formulas

  • p+q=1p + q = 1Allele frequency: p = dominant allele frequency, q = recessive allele frequency
  • p2+2pq+q2=1p^2 + 2pq + q^2 = 1Genotype frequencies: AA = p², Aa = 2pq, aa = q² under Hardy-Weinberg equilibrium
  • Δp=pqs(ph+q)1sq2\Delta p = \frac{pqs(ph + q)}{1 - sq^2}Change in allele frequency per generation under selection (s = selection coefficient, h = dominance)

Frequently asked questions

If p = 0.7, what are the expected genotype frequencies under Hardy-Weinberg?
AA = 0.7² = 0.49, Aa = 2(0.7)(0.3) = 0.42, aa = 0.3² = 0.09.
In a population of 50 individuals, is Hardy-Weinberg maintained? Why or why not?
No — small populations experience genetic drift, causing random allele frequency changes each generation.
If 16% of a population shows the recessive phenotype, what is the carrier (heterozygote) frequency?
Q² = 0.16 → q = 0.4 → p = 0.6 → 2pq = 2(0.6)(0.4) = 0.48 = 48% carriers.