AP BIOLOGY • NATURAL SELECTION

Hardy-Weinberg Equilibrium

The null model that reveals when—and why—populations evolve.

Historical Context & Motivation

In the decades following Darwin's publication of On the Origin of Species (1859), biologists faced a persistent conceptual challenge: if natural selection favors certain traits, wouldn't dominant alleles inevitably replace recessive ones in a population? This so-called blending inheritance objection suggested that variation would be diluted over generations, ultimately undermining the raw material upon which selection acts. The rediscovery of Mendel's work in 1900 provided the particulate model of inheritance that could preserve variation, but mathematicians still needed a formal proof that allele frequencies would remain stable in the absence of evolutionary forces.

1859
Darwin's Natural Selection
Charles Darwin publishes On the Origin of Species, establishing the theory of evolution by natural selection but lacking a mechanistic model of heredity.
1900
Rediscovery of Mendel
De Vries, Correns, and von Tschermak independently rediscover Mendel's laws of particulate inheritance, resolving the blending-inheritance paradox and showing that alleles are discrete units.
1903
Yule's Objection
Statistician Udny Yule argues that dominant alleles should increase in frequency over time—a misunderstanding that spurred formal mathematical analysis of allele dynamics in populations.
1908
Hardy & Weinberg
Independently, British mathematician G. H. Hardy and German physician Wilhelm Weinberg demonstrate that allele frequencies remain constant across generations under specific idealized conditions, establishing the Hardy-Weinberg principle.
1918–1930s
Modern Synthesis
Fisher, Haldane, and Wright integrate Mendelian genetics with Darwinian selection, using the Hardy-Weinberg model as the baseline "null hypothesis" for detecting evolutionary change in populations.

The central question Hardy and Weinberg answered was deceptively simple: What happens to allele and genotype frequencies in a population when no evolutionary forces are acting? Their answer—that frequencies remain constant indefinitely—provides the critical null model against which biologists measure real evolutionary change. Without this baseline, it would be impossible to determine whether an observed shift in allele frequency reflects natural selection, genetic drift, gene flow, mutation, or nonrandom mating.

Core Principles & Conditions

The Hardy-Weinberg equilibrium (HWE) states that both allele frequencies and genotype frequencies in a sexually reproducing, diploid population will remain constant from generation to generation, provided five stringent conditions are met. Violation of any one condition introduces an evolutionary mechanism that can shift allele frequencies. In practice, no natural population perfectly satisfies all five conditions, which is precisely the point: deviations from HWE tell us which evolutionary forces are at work.

1

No Mutation

Alleles are not created, destroyed, or converted into other alleles. Mutation introduces new alleles and alters frequencies, albeit usually very slowly (rates ~10−5 to 10−9 per locus per generation).
2

No Natural Selection

All genotypes have equal fitness—equal probabilities of survival and reproduction. When genotypes differ in fitness, selection changes allele frequencies directionally toward advantageous alleles.
3

No Gene Flow

The population is completely isolated: no immigration of individuals carrying different allele frequencies and no emigration removing alleles from the gene pool.
4

Infinitely Large Population

Random sampling error (genetic drift) is negligible. In finite populations, allele frequencies fluctuate stochastically each generation, with drift effects inversely proportional to population size.
5

Random Mating

Individuals pair without regard to genotype (panmixia). Nonrandom mating—such as assortative mating or inbreeding—alters genotype frequencies without changing allele frequencies.
KEY TAKEAWAY
Think of the Hardy-Weinberg model as a control experiment for evolution. Just as a chemist uses a control to isolate the effect of one variable, population geneticists use HWE as the expected outcome when nothing is happening. If observed genotype frequencies deviate significantly from HWE predictions, at least one of the five conditions has been violated, and evolution is occurring. The equilibrium itself is not the interesting biology—the departures from it are.

Visual Explanation: The Gene Pool

This Punnett square shows how gamete frequencies (p and q) combine during random mating to produce Hardy-Weinberg genotype proportions. With p = 0.6 for allele A and q = 0.4 for allele a, the expected genotype frequencies are AA = 0.36, Aa = 0.48, and aa = 0.16. These proportions remain stable every subsequent generation as long as all five conditions hold.

The diagram above illustrates the fundamental logic of the Hardy-Weinberg model. Each parent contributes one allele to the offspring, and if mating is random, the probability of any gamete combination is simply the product of the individual allele frequencies. The frequency of the homozygous dominant (AA) genotype equals p², the heterozygous (Aa) genotype equals 2pq (because Aa can arise two ways—A from mother and a from father, or vice versa), and the homozygous recessive (aa) genotype equals q². The critical insight is that if you recalculate allele frequencies from these offspring genotypes, you recover the original p and q values—hence the equilibrium is self-sustaining.

Mathematical Framework

The Hardy-Weinberg principle is expressed through two complementary equations. The first describes the relationship between allele frequencies, and the second describes the expected genotype frequencies that result from random mating. Together, these equations form the quantitative backbone of population genetics, and the AP Biology exam regularly tests your ability to apply them in both forward (predicting genotypes from alleles) and reverse (inferring allele frequencies from phenotype data) directions.

ALLELE FREQUENCY EQUATION
p + q = 1
p = frequency of the dominant allele; q = frequency of the recessive allele. For a locus with only two alleles, these frequencies must sum to 1. If the frequency of allele A is 0.7, then the frequency of allele a is necessarily 0.3.
GENOTYPE FREQUENCY EQUATION
p² + 2pq + q² = 1
= frequency of the homozygous dominant genotype (AA); 2pq = frequency of the heterozygous genotype (Aa); = frequency of the homozygous recessive genotype (aa). This is simply the binomial expansion of (p + q)², which represents all possible combinations of two alleles drawn at random from the gene pool.

Deriving Genotype Frequencies from Phenotype Data

In most AP Biology problems, the entry point is the recessive phenotype because it corresponds to a single genotype (aa). If you observe that 16% of a population expresses the recessive phenotype, then q² = 0.16, and q = √0.16 = 0.4. From there, p = 1 − q = 0.6. You can then calculate all three genotype frequencies: p² = 0.36 (AA), 2pq = 0.48 (Aa), and q² = 0.16 (aa). This reverse-engineering approach is the most common problem-solving strategy on the exam.

COMMON PROBLEM-SOLVING STRATEGY
q = √(frequency of recessive phenotype) → p = 1 − q
Start with the recessive phenotype frequency (which equals q²), take the square root to find q, then subtract from 1 to find p. This approach works because the recessive phenotype is the only phenotype that maps to a single, unambiguous genotype.
📝 AP Exam Tip
Calculators are permitted on the AP Biology exam. When taking the square root of q², be careful to distinguish between frequencies (which are decimals or proportions that sum to 1) and percentages. If a problem states "9% of the population shows the recessive phenotype," then q² = 0.09 (not 9). Always convert percentages to decimals before applying the equations.

When Equilibrium Breaks: The Five Evolutionary Forces

The true power of the Hardy-Weinberg model lies not in the equilibrium itself but in identifying departures from equilibrium. Each of the five conditions maps directly to an evolutionary mechanism. When observed genotype frequencies deviate significantly from HWE predictions (often tested via a chi-square goodness-of-fit test), at least one mechanism is at work. The following diagram and table summarize how each violation shifts allele or genotype frequencies.

This concept map shows the five evolutionary mechanisms that violate Hardy-Weinberg conditions. Four of them (selection, drift, gene flow, mutation) alter allele frequencies directly. Nonrandom mating is unique in that it redistributes genotype frequencies without changing the underlying allele frequencies—for example, inbreeding increases homozygosity at the expense of heterozygosity.
Summary of HWE violations and their evolutionary consequences
HWE Condition ViolatedEvolutionary MechanismEffect on Allele FrequenciesBiological Example
No mutationMutationIntroduces new alleles; very slow change per generationSickle-cell allele (HbS) arising by point mutation in β-globin gene
No selectionNatural selectionDirectional, stabilizing, or disruptive change in allele frequenciesAntibiotic resistance alleles increasing in bacterial populations under drug pressure
No gene flowGene flow (migration)Homogenizes allele frequencies between populationsPollen dispersal between isolated plant populations introducing novel alleles
Infinite populationGenetic driftRandom fluctuation; can fix or lose alleles, especially in small populationsBottleneck effect in cheetahs reducing genetic diversity after population crash
Random matingNonrandom matingAlters genotype frequencies only (↑ homozygosity); allele frequencies unchangedSelf-fertilization in certain plant species increasing homozygous genotype proportions

Worked Example: Cystic Fibrosis in a Population

Cystic fibrosis (CF) is an autosomal recessive disorder caused by mutations in the CFTR gene. In populations of European descent, approximately 1 in 2,500 individuals is born with CF. Using Hardy-Weinberg equations, we can estimate the carrier frequency—a clinically important value for genetic counseling.

Estimating Carrier Frequency for Cystic Fibrosis
1
Step 1 — Identify the Known ValueThe problem states that 1 in 2,500 individuals expresses the CF phenotype. Because CF is autosomal recessive, only individuals homozygous for the recessive allele (genotype ff) show the disease. Therefore, the frequency of the homozygous recessive genotype is q² = 1/2,500 = 0.0004.
q² = 0.0004
2
Step 2 — Solve for qTake the square root of q² to find the frequency of the recessive allele: q = √0.0004 = 0.02. This means 2% of all alleles at this locus in the population are the CF-causing allele.
q = 0.02
3
Step 3 — Solve for pUsing the allele frequency equation p + q = 1, we find p = 1 − 0.02 = 0.98. The normal CFTR allele has a frequency of 98%.
p = 0.98
4
Step 4 — Calculate Carrier (Heterozygote) FrequencyCarriers are heterozygous (Ff), so their frequency is 2pq = 2 × 0.98 × 0.02 = 0.0392. Approximately 3.92% of the population—roughly 1 in 25 individuals—carries one copy of the CF allele without showing symptoms.
2pq = 0.0392 (≈ 1 in 25)
5
Step 5 — Verify the SolutionCheck: p² + 2pq + q² = (0.98)² + 0.0392 + (0.02)² = 0.9604 + 0.0392 + 0.0004 = 1.0000 ✓. All genotype frequencies sum to 1, confirming our calculations are internally consistent.
Sum = 1.0000 ✓
🧬 Clinical Significance
This result explains why recessive genetic disorders can persist in populations at unexpectedly high allele frequencies. Although only 0.04% of individuals are affected, nearly 4% are carriers. Because carriers are phenotypically normal, natural selection cannot "see" and eliminate the recessive allele when it is hidden in heterozygotes. This is sometimes called the heterozygote reservoir effect.

Strengths & Limitations of the Hardy-Weinberg Model

Like all models in biology, the Hardy-Weinberg equilibrium simplifies reality to make it analyzable. Understanding both its utility and its constraints is essential for interpreting population genetic data and for answering free-response questions on the AP Biology exam, which frequently ask you to evaluate the assumptions of a model and explain why deviations occur.

Comparative analysis of HWE model utility
StrengthsLimitations
Provides a clear null hypothesis for detecting evolution in populationsAll five conditions are virtually never met simultaneously in natural populations
Allows estimation of carrier frequencies for recessive alleles from phenotype data aloneAssumes a simple two-allele, one-locus system; many traits are polygenic or have multiple alleles
Establishes the mathematical foundation for all of population geneticsCannot identify which specific evolutionary force is acting—only that one or more conditions are violated
Simple and computationally accessible; requires only basic algebraAssumes diploid, sexually reproducing organisms; does not apply to haploid or asexual species
Applies to any autosomal locus with discrete alleles, making it broadly generalizableEquilibrium is achieved in one generation of random mating, which may mislead students into thinking populations reach equilibrium instantly despite ongoing evolution
KEY TAKEAWAY
The Hardy-Weinberg model functions in population genetics much the way Newton's first law functions in physics: it describes what happens when no net force acts. An object in motion stays in motion unless a force acts upon it; a population's allele frequencies remain constant unless an evolutionary force acts upon them. Both are idealized baselines that make deviations meaningful and measurable.

Connection to Advanced Population Genetics

The Hardy-Weinberg principle is the starting point for a rich body of theory in population genetics. Once you understand what happens when no evolutionary forces act, the next step is to model what happens when they do. The table below connects HWE to more advanced models you may encounter in college-level genetics or evolutionary biology courses.

How HWE connects to advanced population genetics models
Hardy-Weinberg (Baseline)Advanced ExtensionKey Addition
Two alleles at one locusMulti-allele HWEExtends to 3+ alleles (e.g., ABO blood group with IA, IB, i); all allele frequencies still sum to 1
No selection (all genotypes equally fit)Selection modelsAssigns fitness coefficients (w) to each genotype; Δp depends on selection coefficient (s) and dominance
Infinite populationDrift models (Wright-Fisher)Models stochastic changes in allele frequency as a function of effective population size (Ne)
No mutationMutation-selection balanceEquilibrium allele frequency determined by balance between mutation rate (μ) and selection coefficient (s)
No gene flowIsland model / metapopulationsModels migration rate (m) between subpopulations and its homogenizing effect on allele frequencies

For the AP Biology exam, you do not need to solve problems involving selection coefficients or effective population sizes, but understanding that these advanced models build upon the Hardy-Weinberg framework will deepen your conceptual understanding. On free-response questions, demonstrating awareness that HWE is a simplification—and articulating precisely which assumptions are violated in a given scenario—earns full credit and signals mature biological reasoning.

Practice Problems

1
A population of 10,000 butterflies is in Hardy-Weinberg equilibrium for a wing-color gene with two alleles. Over several generations, a researcher observes that allele frequencies remain constant but the frequency of heterozygotes decreases while homozygote frequencies increase. Which of the following best explains this observation?
2
In a population of wildflowers, red flower color (R) is dominant over white flower color (r). A survey reveals that 36% of the plants have white flowers. Assuming Hardy-Weinberg equilibrium, what is the expected frequency of heterozygous (Rr) plants?
3
A researcher collects genotype data from 500 individuals at a single locus with two alleles (M and N, codominant). She observes: MM = 230, MN = 218, NN = 52. She performs a chi-square goodness-of-fit test and finds χ² = 0.15 (critical value at α = 0.05 with 1 degree of freedom = 3.84). Which conclusion is best supported?
PROBLEM 4APPLIED
A population of lizards on an island has a gene for scale pattern with two alleles: smooth (S, dominant) and rough (s, recessive). A researcher hypothesizes that after a hurricane reduces the population from 5,000 to 80 individuals, genetic drift will cause the population to deviate from Hardy-Weinberg equilibrium. (a) Describe an experimental approach the researcher could use to test this hypothesis. Include what data should be collected, when measurements should be taken, and what comparisons should be made (2 points). (b) Predict the expected results if the hypothesis is supported, and explain why a small population is more susceptible to changes in allele frequency due to drift (1 point). (c) Identify ONE confounding variable that could also explain a deviation from HWE after the hurricane, and explain how the researcher could control for it (1 point).
PROBLEM 5CRITICAL THINKING
A researcher studies a coat-color gene in a population of 1,000 mice. The gene has two alleles: B (black, dominant) and b (brown, recessive). She collects the following data over three generations: Generation 1: BB = 490, Bb = 420, bb = 90 Generation 3: BB = 550, Bb = 390, bb = 60 (a) Calculate the allele frequencies (p and q) for Generation 1 and determine the expected Hardy-Weinberg genotype frequencies. Show your work (1 point). (b) Compare the observed Generation 1 genotype frequencies to the expected HWE frequencies. Is the population in HWE in Generation 1? Justify your answer (1 point). (c) Calculate allele frequencies for Generation 3. Have the allele frequencies changed between Generation 1 and Generation 3? (1 point). (d) Based on the pattern of change from Generation 1 to Generation 3, identify the most likely evolutionary mechanism at work and explain your reasoning using the data (1 point).

Hardy-Weinberg Equilibrium — Summary

The Hardy-Weinberg equilibrium provides the foundational null model for population genetics. It predicts that in a population satisfying five conditions—no mutation, no natural selection, no gene flow, infinite population size, and random mating—both allele frequencies (p + q = 1) and genotype frequencies (p² + 2pq + q² = 1) remain constant from generation to generation. The typical problem-solving approach begins with the recessive phenotype frequency (which equals q²), takes the square root to find q, then uses p = 1 − q to derive all other values.

Departures from HWE indicate that evolution is occurring. Natural selection, genetic drift, gene flow, and mutation alter allele frequencies directly, while nonrandom mating changes genotype frequencies without affecting allele frequencies. On the AP Biology exam, you should be prepared to calculate expected genotype frequencies, identify violated conditions, explain how specific mechanisms cause deviations, and apply a chi-square goodness-of-fit test to determine whether observed data significantly depart from HWE predictions.

Varsity Tutors • AP Biology • Hardy-Weinberg Equilibrium