The Hardy–Weinberg Principle and Equilibrium Conditions

The Hardy-Weinberg principle states that allele and genotype frequencies in a population remain constant from generation to generation if no evolutionary forces act, and for a gene with two alleles the genotype frequencies are p² + 2pq + q² = 1, where p + q = 1. In brief: p is the frequency of the dominant allele (A) and q is the frequency of the recessive allele (a). The frequency of homozygous dominant individuals is p², heterozygotes 2pq and homozygous recessive q². If the observed frequencies differ from the Hardy-Weinberg predictions, one or more of the conditions is not met, and evolution may be occurring.

The principle is the null model of population genetics, and it is also used in practice to estimate the carrier frequency of genetic diseases. This guide defines the gene pool and allele frequency, states the five conditions for equilibrium, shows how to carry out calculations step by step, tests for equilibrium with a chi-squared test, discusses applications and limitations and corrects common mistakes.

What are a gene pool and allele frequency?

A population is a group of interbreeding individuals of one species in the same area. Its gene pool is the total of all alleles of all genes in all its members. The allele frequency is the proportion of a particular allele among all alleles of that gene in the population. For a gene with two alleles, A and a:

allele frequency of A = p, allele frequency of a = q, and p + q = 1

The genotype frequency is the proportion of individuals with each genotype. Evolution, in the sense of population genetics, is a change in allele frequencies in a population from one generation to the next. To judge whether evolution is happening, we need a reference for what to expect if nothing is changing, and the Hardy-Weinberg principle provides it.

What are the Hardy-Weinberg equations?

If gametes combine at random, as in the Punnett square of Aa × Aa with allele frequencies p and q, the offspring genotypes occur in proportions given by the expansion of (p + q)²:

A (p) a (q) A (p) a (q) AA p² Aa pq Aa pq aa q²

After one generation of random mating, the genotype frequencies reach these values, and the allele frequencies stay constant: the new frequency of A is p² + pq = p(p + q) = p. This holds for as long as the conditions below are maintained.

The usual first step in problems is to find q from the recessive phenotype, the only phenotype for which the genotype is certain: q² = (number of recessive individuals) ÷ (total population), then q = √q², and p = 1 − q.

What are the conditions for equilibrium?

Five conditions need to be met for a population to be in Hardy-Weinberg equilibrium:

  1. No mutation: alleles do not change from one form to another, and no new alleles appear.
  2. Random mating: individuals pair by chance, without any preference for particular genotypes (no assortative mating or inbreeding).
  3. No gene flow: no migration of individuals or gametes into or out of the population.
  4. Very large population size: to avoid random changes in allele frequencies (genetic drift).
  5. No natural selection: all genotypes have the same chance of surviving and reproducing.

No real population fully meets all five conditions, but many loci are close enough for the equation to be a good approximation, especially for genes that do not affect fitness, like blood groups. Each condition is a possible cause of evolution when it is violated: mutation creates new alleles, non-random mating changes genotype frequencies, gene flow and drift change allele frequencies, and selection changes allele frequencies in a direction that favors fitness. These forces are explained in the following articles.

Hardy-Weinberg frequencies for different values of q

Genotype frequencies expected at Hardy-Weinberg equilibrium
q p AA (p²) Aa (2pq) aa (q²)
0.10.90.810.180.01
0.20.80.640.320.04
0.30.70.490.420.09
0.50.50.250.500.25
0.70.30.090.420.49

The table shows two things: heterozygotes reach a maximum of 50 percent when p = q = 0.5, and when an allele is rare, most copies of it are in heterozygotes. At q = 0.1, the aa frequency is only 1 percent (q²), but 18 percent of the population are carriers (2pq), 18 times as many.

Hardy-Weinberg genotype frequencies as a function of the recessive allele frequency 0 0.25 0.5 0.75 1 0 0.25 0.5 0.75 1 Allele frequency q (p = 1 − q) Genotype frequency AA (p²) aa (q²) Aa (2pq)
Expected genotype frequencies at Hardy-Weinberg equilibrium for every value of q. The heterozygote curve (dashed) peaks at 0.50 when p = q = 0.5. At q = 0.1 the curves read 0.81, 0.18 and 0.01, as in the table above: most copies of a rare allele are carried by heterozygotes.

Worked examples

Example 1: find the frequencies from the recessive phenotype

In a population of 500 flowers, 45 have white petals (recessive, aa), and the rest are red (genotypes AA or Aa). Assume Hardy-Weinberg equilibrium.

  1. q²: 45 ÷ 500 = 0.09.
  2. q: √0.09 = 0.3. p: 1 − 0.3 = 0.7.
  3. Genotype frequencies: AA = p² = 0.49; Aa = 2pq = 2 × 0.7 × 0.3 = 0.42; aa = q² = 0.09. The sum is 0.49 + 0.42 + 0.09 = 1.00.
  4. Numbers of plants: AA = 0.49 × 500 = 245; Aa = 0.42 × 500 = 210; aa = 45.

So 210 plants are heterozygous carriers of the white allele, although they look red.

245 210 45 AA Aa aa p² = 0.49 2pq = 0.42 q² = 0.09 245 + 210 + 45 = 500

Example 2: carrier frequency of a disease

Cystic fibrosis affects about 1 in 2 500 people of European descent, and it is autosomal recessive.

  1. q² = 1 ÷ 2 500 = 0.0004, so q = √0.0004 = 0.02.
  2. p = 1 − 0.02 = 0.98.
  3. Carriers: 2pq = 2 × 0.98 × 0.02 = 0.0392, i.e. 3.9 percent, about 1 in 25.

This means that about 1 in 25 people carry the allele, even though only 1 in 2 500 are affected. Most copies of the allele are “hidden” in healthy carriers, which is why the disease cannot be eliminated by preventing affected people from reproducing.

Example 3: testing whether a population is in equilibrium

A sample of 500 individuals has 280 AA, 160 Aa and 60 aa.

  1. Allele frequencies: count the alleles in 1 000 (2 × 500): A = 2 × 280 + 160 = 720, so p = 0.72, and q = 0.28.
  2. Expected numbers: AA = 0.72² × 500 = 0.5184 × 500 = 259.2; Aa = 2 × 0.72 × 0.28 × 500 = 201.6; aa = 0.28² × 500 = 0.0784 × 500 = 39.2.
  3. Chi-squared test: χ² = Σ (observed − expected)² ÷ expected = (280 − 259.2)² ÷ 259.2 + (160 − 201.6)² ÷ 201.6 + (60 − 39.2)² ÷ 39.2 = 1.67 + 8.58 + 11.04 = 21.29.
  4. Degrees of freedom: 3 genotype classes − 1 − 1 (one parameter, p, was estimated from the data) = 1. The critical value at the 5 percent level is 3.84.
  5. Conclusion: 21.29 is greater than 3.84, so the population is not in Hardy-Weinberg equilibrium. There are fewer heterozygotes (160 observed against 201.6 expected) and more homozygotes than expected, which suggests inbreeding, non-random mating, or population structure (for example two groups with different allele frequencies mixed in the sample).

Example 4: one generation of selection

Start from p = 0.7 and q = 0.3 (as in Example 1). Suppose the aa plants have a relative fitness of 0.5 (they produce half as many offspring), and the others have 1.

  1. Mean fitness: w̄ = p² × 1 + 2pq × 1 + q² × 0.5 = 0.49 + 0.42 + 0.045 = 0.955.
  2. New q: q′ = (pq × 1 + q² × 0.5) ÷ w̄ = (0.21 + 0.045) ÷ 0.955 = 0.2670.
  3. Change: q fell from 0.300 to 0.267, so p rose from 0.700 to 0.733. Selection has changed the allele frequencies: the population is evolving, and the Hardy-Weinberg frequencies in the next generation would be calculated from the new values.

What are the applications?

How was the principle discovered?

Godfrey Hardy, an English mathematician, and Wilhelm Weinberg, a German physician, independently published the principle in 1908. Hardy wrote a short letter to the journal Science to answer a question from the geneticist Reginald Punnett, who had been asked why a dominant trait such as brachydactyly (short fingers) does not become more common. Weinberg’s contribution was more detailed, and included extensions for multiple alleles and for families. Ronald Fisher, J. B. S. Haldane and Sewall Wright developed population genetics in the 1920s and 1930s on this basis, and merged Darwin’s selection with Mendelian genetics in the modern synthesis.

Which mistakes are common?

Mistake 1: Using the percentage of the dominant phenotype as p²

The dominant phenotype includes AA and Aa. Start from the recessive phenotype, which is q².

Mistake 2: Forgetting the factor 2 in 2pq

The heterozygote can arise in two ways (A from either parent), so 2pq is the frequency.

Mistake 3: Believing that Hardy-Weinberg means the population cannot evolve

It describes what happens when no forces act. When they do, frequencies change.

Mistake 4: Confusing allele and genotype frequencies

An allele frequency of q = 0.3 does not mean that 30 percent of individuals are aa. The aa frequency is q² = 0.09.