In short
The Hardy–Weinberg principle describes a population that is not evolving: its allele and genotype frequencies stay constant from generation to generation. For a gene with two alleles, p + q = 1 (allele frequencies) and p² + 2pq + q² = 1 (genotype frequencies: p² homozygous dominant, 2pq heterozygous, q² homozygous recessive). Equilibrium requires five conditions: no mutation, random mating, no natural selection, a very large population (no drift) and no gene flow. Real populations rarely meet them all, which makes Hardy–Weinberg a null hypothesis: if observed frequencies differ from expected, the population is evolving.
What you need to know
- State the five conditions for Hardy–Weinberg equilibrium.
- Use p + q = 1 and p² + 2pq + q² = 1 to calculate allele and genotype frequencies.
- Use Hardy–Weinberg as a null model to test whether a population is evolving.
- Explain which condition is violated in a given scenario.
The two equations
Let p be the frequency of the dominant allele (A) and q the frequency of the recessive allele (a). Because there are only two alleles, p + q = 1.
If mating is random, the chance that an offspring receives A from both parents is p × p = p². The chance of aa is q². The chance of a heterozygote is 2pq, because it can receive A from the mother and a from the father, or the other way round. So p² + 2pq + q² = 1. Both equations are on the AP Biology formula sheet.
Worked example
In a population of 1,000 moths, 160 are white (the recessive phenotype, aa) and the rest are brown.
- q² = 160 ÷ 1,000 = 0.16
- q = √0.16 = 0.4
- p = 1 − 0.4 = 0.6
- Homozygous dominant: p² = 0.36, so about 360 moths are AA.
- Heterozygous: 2pq = 2 × 0.6 × 0.4 = 0.48, so about 480 moths are Aa (carriers of the white allele).
- Check: 0.36 + 0.48 + 0.16 = 1.00.
A common mistake is to say p = 0.84 because 84% of the moths are brown. That figure (p² + 2pq) is a phenotype frequency, not an allele frequency.
The same steps work in reverse. If you are told the allele frequencies, square them and multiply to predict genotype numbers, then compare those predictions with what is actually counted in the population. A large mismatch is the signal that one of the five conditions below is not being met.
The five conditions
| Condition | If violated | Example |
|---|---|---|
| No mutation | New alleles enter the gene pool | A new antibiotic-resistance allele appears |
| Random mating | Genotype frequencies change | Females prefer brightly coloured males; inbreeding |
| No natural selection | Allele frequencies change towards fitter alleles | Pesticide kills susceptible insects |
| Very large population | Genetic drift changes frequencies by chance | A small island population |
| No gene flow | Alleles enter or leave with migrants | Individuals migrate between herds |
Because at least one condition is almost always violated, natural populations are rarely in perfect equilibrium. Hardy–Weinberg is useful precisely as a baseline: comparing expected and observed numbers (often with a chi-square test, Topic 5.3) shows whether, and sometimes how, a population is evolving.
Key terms
- Hardy–Weinberg equilibrium
- A state in which allele and genotype frequencies remain constant across generations.
- p
- The frequency of the dominant allele.
- q
- The frequency of the recessive allele.
- p² / 2pq / q²
- The expected frequencies of homozygous dominant, heterozygous and homozygous recessive genotypes.
- Null model
- A baseline expectation, here of no evolution, against which observed data are compared.
Common mistakes
p equals the proportion of individuals with the dominant phenotype.
The dominant phenotype includes p² + 2pq; find q from q² first.
Dominant alleles will become more common over time.
In equilibrium, frequencies stay the same whatever dominance is.
Hardy–Weinberg describes real populations.
It describes an idealised, non-evolving population used as a comparison.
How this topic is tested
- Write the equations at the top of your answer and show each step; points are often given for setting up the calculation.
- Round only at the end, and give answers as decimals unless asked for percentages or numbers of individuals.
- When asked which condition is violated, link the scenario to one specific condition and explain how it changes allele frequencies.
Practice questions
Original AP-style multiple-choice questions. Pick an answer to see the explanation.
Question 1 · SP 5 · Statistical Tests and Data Analysis
In a population in Hardy–Weinberg equilibrium, 9% of individuals show a recessive trait. What is the frequency of the dominant allele?
Question 2 · SP 5 · Statistical Tests and Data Analysis
Using the same population (q = 0.3), what percentage of individuals are heterozygous?
Question 3 · SP 1 · Concept Explanation
Which situation violates a Hardy–Weinberg condition through non-random mating?
Question 4 · SP 5 · Statistical Tests and Data Analysis
In a population of 400 plants, the expected number of white-flowered plants under Hardy–Weinberg is 64, but researchers count 100. What can be concluded?
Question 5 · SP 5 · Statistical Tests and Data Analysis
Cystic fibrosis affects about 1 in 2,500 people of European ancestry. Assuming equilibrium, what is the approximate frequency of carriers?
Free-response practice
Write your answer first, then mark it against the scoring guide.
Analyze Data (short answer) · 4 points
In a population of 500 snails, shell colour is controlled by one gene: brown (B) is dominant to yellow (b). In 2020, 45 snails were yellow. In 2025, after birds that prefer yellow snails moved into the area, 20 of 500 snails were yellow.
- (a) Calculate the frequency of the b allele in 2020, assuming Hardy–Weinberg equilibrium.
- (b) Calculate the expected number of heterozygous snails in 2020.
- (c) Identify the Hardy–Weinberg condition violated between 2020 and 2025.
- (d) Explain why the b allele did not disappear completely.
Scoring guide: one point for each of the following
Part (a)
- q² = 45/500 = 0.09, so q = 0.3.
Part (b)
- 2pq = 2 × 0.7 × 0.3 = 0.42; 0.42 × 500 = 210 snails.
Part (c)
- No natural selection (birds selectively ate yellow snails).
Part (d)
- Recessive alleles are hidden in heterozygous (brown) snails, which are not targeted by the birds, so b persists in the population.
Connected topics
Frequently asked questions
Do I need to memorise the Hardy–Weinberg equations?
They are on the formula sheet, but you need to know what each term means and how to use them quickly.
Can Hardy–Weinberg be used for genes with three alleles?
Yes, the equations extend to more alleles (p + q + r = 1), but AP questions almost always use two alleles.
Why can't you find p directly from the dominant phenotype?
The dominant phenotype includes both AA and Aa individuals, which can't be told apart by appearance.