Hardy-Weinberg Equilibrium — AP Biology Study Guide
For: AP Biology candidates sitting AP Biology.
Covers: Hardy-Weinberg Equilibrium (HWE) core assumptions, allele and genotype frequency calculation, the and formulas, chi-square goodness-of-fit testing for HWE, and detection of evolutionary deviation.
You should already know: Difference between alleles and genotypes, definition of microevolution, basic probability and chi-square goodness-of-fit testing.
A note on the practice questions: All worked questions in the "Practice Questions" section below are original problems written by us in the AP Biology style for educational use. They are not reproductions of past College Board / Cambridge / IB papers and may differ in wording, numerical values, or context. Use them to practise the technique; cross-check with official mark schemes for grading conventions.
1. What Is Hardy-Weinberg Equilibrium?
Hardy-Weinberg Equilibrium (HWE, also called the Hardy-Weinberg principle or law) is a null model in population genetics that describes a population that is not evolving. In a population at HWE, allele and genotype frequencies remain constant across generations, in the absence of any evolutionary forces. According to the AP Biology CED, HWE is a key topic within Unit 7 (Natural Selection), making up approximately 10-15% of the unit’s exam weight. HWE content appears in both multiple choice (MCQ) and free response (FRQ) sections of the AP exam: it is common to see 1-2 MCQ questions testing calculation or assumptions, and at least one partial or full FRQ question testing HWE deviation testing or application to real evolutionary questions. The standard notation convention, which you must memorize for the exam, defines as the frequency of the dominant allele in a bi-allelic system, and as the frequency of the recessive allele. Critically, HWE is not a model of how evolution works—it is a model of what happens when evolution does not occur, so we use it as a baseline to detect when evolution is happening.
2. Core Hardy-Weinberg Equations and Frequency Calculation
HWE is built on two core equations for bi-allelic loci (the only case AP Biology regularly tests). The first comes from the fact that the sum of all allele frequencies at a locus must equal 1 (100% of all alleles): The second equation for genotype frequencies comes directly from the product rule of probability. For a diploid individual, to get a homozygous dominant genotype (AA), you must inherit one A allele from each parent. The probability of inheriting A from each parent is , so the probability of AA is . For homozygous recessive (aa), the same logic gives . For heterozygotes, there are two possible combinations: A from mother + a from father, or a from mother + A from father. This gives . Summing these gives the second core equation:
Worked Example
In a population of wild sunflowers, 25% of individuals have yellow seeds (recessive trait), while brown seeds are dominant. Calculate the frequency of heterozygous brown-seeded individuals in the population, assuming HWE.
- Only recessive phenotypes have a known genotype, so yellow seeds = aa, meaning .
- Solve for : .
- Solve for using the allele frequency rule: .
- Calculate heterozygote frequency: .
- Check your work: , which adds up correctly.
Exam tip: Always start with q² when you know the recessive phenotype frequency. Only recessive individuals have a known genotype from their phenotype—dominant phenotypes can be either homozygous or heterozygous, so you cannot use their frequency directly to find p.
3. Hardy-Weinberg Equilibrium Assumptions
HWE only holds if five core assumptions are met. If any assumption is violated, allele and genotype frequencies will change across generations, meaning the population is evolving and is not in HWE. The five assumptions are:
- No mutation: No new alleles are created or modified at the locus.
- No genetic drift: The population is infinitely large, so random sampling of alleles does not cause frequency changes.
- No gene flow: No individuals enter or leave the population, so no alleles are gained or lost.
- Random mating: Individuals choose mates without reference to their genotype at the locus.
- No natural selection: All genotypes have equal survival and reproductive fitness (no genotype is more likely to reproduce than another).
The key purpose of these assumptions is to define the null case: any deviation from HWE predictions means at least one assumption is broken, and evolution is occurring.
Worked Example
A biologist studying a population of wild goats finds that males with longer horns (genotype LL or Ll) win 8x more fights for access to females than males with short horns (genotype ll), so they father far more offspring. All other conditions (no mutation, no migration, large population size) are met. Which HWE assumption is violated, and how will genotype frequencies deviate from HWE predictions?
- First, match the scenario to the assumptions: differential reproductive success based on genotype means the assumption of no natural selection is violated.
- The L allele for long horns confers a strong reproductive advantage, so it will be passed to the next generation at a higher rate than the l allele for short horns.
- Expected deviation: The frequency of the ll genotype will be lower than predicted by HWE, and the frequency of LL and Ll genotypes will be higher than HWE predictions.
- Confirm no other assumption is broken, per the problem constraints.
Exam tip: When asked to identify a violated assumption on the AP exam, match the scenario description directly: mating preference = non-random mating, migration = gene flow, new trait = mutation, small population = genetic drift, differential survival/reproduction = natural selection.
4. Chi-Square Testing for HWE Deviation
To formally test whether observed genotype frequencies differ significantly from HWE predictions, we use a chi-square goodness-of-fit test. The null hypothesis () is that the population is in HWE (no significant deviation, no evolution). The alternative hypothesis () is that the population is not in HWE (significant deviation, evolution is occurring). For this test, you calculate expected genotype counts based on HWE, compare them to observed counts, and use the chi-square statistic to determine if the difference is statistically significant. For bi-allelic HWE tests, degrees of freedom are always 1 (3 genotypes minus 2 estimated parameters: p and q). If your calculated chi-square value is larger than the critical value (usually 3.84 for p=0.05, df=1), you reject the null hypothesis and conclude the population is not in HWE.
Worked Example
A population of clover has the following observed genotype counts: AA = 40, Aa = 40, aa = 20. Total population size N=100. Test whether the population is in HWE, using a critical value of 3.84 for df=1, α=0.05.
- Calculate allele frequencies: Total alleles = 200. Number of A alleles = (2×40) + 40 = 120, so , .
- Calculate expected counts: , , .
- Calculate the chi-square statistic:
- Compare to critical value: 2.77 < 3.84, so we fail to reject the null hypothesis. The population is consistent with HWE.
Exam tip: Always use df = number of genotypes - 2 for HWE chi-square tests, not the default df = number of categories - 1 used for other chi-square tests. This is one of the most commonly tested mistakes on the AP exam.
5. Common Pitfalls (and how to avoid them)
- Wrong move: Calculating as , instead of . Why: Students confuse the frequency of the recessive allele () with the frequency of the recessive genotype (). Correct move: Always write down and label both equations at the start of every problem, clearly separating allele frequencies from genotype frequencies.
- Wrong move: Forgetting to multiply by 2 when calculating heterozygote frequency. Why: Students forget there are two distinct ways to inherit a heterozygous genotype, one from each parent. Correct move: Always write the full formula before plugging in values, so you do not miss the coefficient 2.
- Wrong move: Assuming that any deviation from HWE must be caused by natural selection. Why: Students associate evolution with natural selection, but any broken HWE assumption causes deviation. Correct move: Always match the scenario description to the specific broken assumption, do not default to natural selection automatically.
- Wrong move: Calculating degrees of freedom for HWE chi-square as instead of . Why: Most chi-square tests use , but HWE requires an extra correction because we estimate two parameters (p and q) from the data. Correct move: Memorize that for all standard two-allele HWE chi-square tests, df is always 1.
- Wrong move: Assuming dominant alleles are always more common than recessive alleles. Why: Students associate "dominant" inheritance with "dominant (common) frequency" from basic Mendelian genetics. Correct move: Always calculate frequencies from the given data—recessive alleles can be far more common than dominant alleles, so never assume .
- Wrong move: Using observed genotype frequencies to calculate expected HWE frequencies, instead of counting alleles first. Why: Students skip the step of calculating p from total alleles and use observed p directly. Correct move: Always count all alleles in the population (2 per diploid individual) to get p and q before calculating expected frequencies.
6. Practice Questions (AP Biology Style)
Question 1 (Multiple Choice)
In a population of lizards, the ability to produce toxin in their skin is controlled by a recessive allele. 4% of the lizard population produces toxin. What is the frequency of the dominant non-toxin producing allele in this population? A) 0.02 B) 0.2 C) 0.8 D) 0.96
Worked Solution: Toxin production is recessive, so only homozygous recessive lizards produce toxin, meaning . Solving for (the recessive toxin allele frequency) gives . The dominant non-toxin allele frequency is . The other options are common mistakes: A is q squared, B is the recessive allele frequency, D is 1 minus q squared. Correct answer: C.
Question 2 (Free Response)
A researcher studies a population of 1000 ferns where leaf shape is controlled by a single bi-allelic locus: curly leaves (C, dominant) and straight leaves (c, recessive). (a) 90 ferns in the population have straight leaves. Calculate the expected frequency of heterozygous curly-leaf ferns under HWE assumptions. (b) The researcher observes 420 heterozygous curly-leaf ferns in the population. Is this population in Hardy-Weinberg Equilibrium? Justify your answer. (c) A group of 100 ferns from a distant population is introduced to the study site, all of which are homozygous recessive cc. Explain how this introduction changes the probability of deviation from HWE.
Worked Solution: (a) Straight leaves are recessive, so . , so . Expected heterozygote frequency = . (b) Expected number of heterozygotes = , which matches the observed number exactly. Observed genotype frequencies match HWE predictions, so the population is in Hardy-Weinberg Equilibrium. (c) This introduction is gene flow, which violates the HWE assumption of no migration. The introduction adds a large number of c alleles to the population, so allele frequencies will change and the population will deviate from HWE. This increases the probability of deviation.
Question 3 (Application / Real-World Style)
Sickle cell anemia is an autosomal recessive disorder that affects approximately 1 in 1600 individuals in a population in sub-Saharan Africa. Assuming this population is in HWE for the sickle cell locus, calculate the frequency of carriers (heterozygous individuals) for sickle cell anemia, and interpret your result in context.
Worked Solution: Sickle cell anemia only occurs in homozygous recessive individuals, so . . . Carrier frequency = , or ~4.9%. This means approximately 1 out of every 21 people in this population is a carrier of the sickle cell allele, even though they do not have sickle cell anemia themselves.
7. Quick Reference Cheatsheet
| Category | Formula / Rule | Notes |
|---|---|---|
| Allele frequency sum (bi-allelic) | = dominant allele frequency, = recessive allele frequency | |
| Genotype frequency sum (HWE, bi-allelic) | = AA frequency, = Aa frequency, = aa frequency | |
| Allele frequency calculation | N = total number of diploid individuals, counts all alleles in the population | |
| Chi-square goodness-of-fit | O = observed genotype count, E = expected genotype count under HWE | |
| Degrees of freedom (HWE) | df = 1 for all standard 2-allele HWE tests | |
| No mutation | Core HWE assumption | No new alleles are introduced into the population |
| No genetic drift | Core HWE assumption | Population size is large, no random allele frequency changes |
| No gene flow | Core HWE assumption | No migration of individuals in/out of the population |
| Random mating | Core HWE assumption | Mating is not biased by genotype at the locus |
| No natural selection | Core HWE assumption | All genotypes have equal survival and reproductive fitness |
| Null hypothesis for HWE testing | Population is in HWE | Rejecting null means at least one evolutionary force is acting |
8. What's Next
Hardy-Weinberg Equilibrium is the foundational null model for all studies of microevolution, the next major topic in Unit 7 Natural Selection. Without mastering HWE calculations and null hypothesis testing for allele frequencies, you cannot quantify the magnitude or direction of evolutionary change in populations, making follow-up topics like measuring selection strength and genetic drift impossible to apply. HWE also provides the baseline for comparing allele frequencies between isolated populations, which is core to studying speciation and macroevolution later in the unit. The skills you learn here also translate to applications in human genetics, including calculating disease carrier frequencies for genetic counseling.
Microevolution, Genetic Drift, Modes of Natural Selection, Speciation