In a large randomly mating population without selection, mutation or migration, allele frequencies stay constant and genotype frequencies reach p², 2pq, q² after one generation.
Explanation
Random union of gametes carrying $A$ with probability $p$ and $a$ with probability $q$ gives the binomial genotype frequencies, and the allele frequencies in the next generation are again $p$ and $q$. For X-linked genes or unequal frequencies in the sexes, equilibrium is approached over several generations.
The law is the null model of population genetics: deviations reveal selection, inbreeding (excess homozygotes), population structure (Wahlund effect), assortative mating, or genotyping errors. For rare recessive conditions most copies of the allele are in heterozygous carriers: the carrier frequency $2pq\approx2q$ greatly exceeds $q^2$.
Example 1
A recessive condition affects 1 in 2500 newborns. Assuming Hardy–Weinberg, find the allele frequency and the carrier frequency.
Solution
$q^2=1/2500$, $q=0.020$, $p=0.980$; carriers $2pq\approx0.039$, about 1 in 26 — a hundred times more common than affected individuals.
Example 2
A sample has 380 MM, 440 MN and 180 NN individuals. Estimate the allele frequencies and test for Hardy–Weinberg proportions.
Solution
$p=\frac{2\cdot380+440}{2000}=0.60$, $q=0.40$. Expected: 360, 480, 160. $\chi^2=\frac{20^2}{360}+\frac{40^2}{480}+\frac{20^2}{160}\approx1.11+3.33+2.50=6.94>3.84$ (1 d.f.): significant deficit of heterozygotes, suggesting inbreeding or substructure.