GENETICS • POPULATION GENETICS & EVOLUTIONARY GENETICS

Hardy-Weinberg & Evolutionary Change — Use Hardy–Weinberg to detect evolutionary change (intro)

Learn how a simple equation reveals whether a population is evolving or staying the same.

Historical Context & Motivation

After Charles Darwin published On the Origin of Species in 1859, scientists knew that populations change over time. But a big question remained: how can you actually prove a population is evolving? You need a way to compare what a non-evolving population looks like with what you actually observe in nature. That is exactly the problem the Hardy–Weinberg principle was designed to solve.

1859
Darwin's Natural Selection
Charles Darwin publishes his theory of evolution by natural selection, explaining that traits helpful for survival become more common over generations.
1866
Mendel's Inheritance Laws
Gregor Mendel discovers the rules of heredity using pea plants, showing that traits are passed down through discrete units we now call alleles (different versions of a gene).
1908
Hardy–Weinberg Principle
Mathematician G. H. Hardy and physician Wilhelm Weinberg independently show that allele frequencies in a population will not change on their own — unless some force like natural selection is acting.
1930s–40s
Modern Synthesis
Scientists combine Darwin's ideas with Mendel's genetics. The Hardy–Weinberg equation becomes a key tool for detecting when populations are evolving.

The central question Hardy and Weinberg answered is: If nothing is causing a population to evolve, what should we expect the gene pool to look like? Once you know the answer to that question, you can compare real populations to this expectation. If they don't match, something is causing evolution.

Core Principles & Definitions

Before diving into the math, let's nail down a few key ideas. A population is a group of organisms of the same species living in the same area that can interbreed. The collection of all the alleles in that population is called the gene pool. Evolution, at its most basic level, is a change in allele frequencies (how common each version of a gene is) in a population over time.

1

Hardy–Weinberg Equilibrium

A state where allele frequencies do not change from generation to generation. The population is not evolving.
2

Allele Frequency

The fraction (or percentage) of a specific allele out of all the alleles for that gene in a population. We use the letters p and q to represent two allele frequencies.
3

The Five Conditions

For equilibrium to hold, a population must have: no mutations, random mating, no natural selection, extremely large size, and no migration (gene flow).
4

Null Hypothesis Tool

Hardy–Weinberg acts like a 'control' in an experiment. If a real population's data doesn't match Hardy–Weinberg predictions, then evolution is occurring.
5

Genotype Frequency

The proportion of individuals in a population with a particular genotype (like AA, Aa, or aa). Hardy–Weinberg lets you predict these from allele frequencies.
KEY TAKEAWAY
Think of the Hardy–Weinberg principle like the calm, flat surface of a swimming pool. If no one jumps in, the water stays perfectly still. If you come back and see ripples, you know something disturbed the water. Similarly, if allele frequencies change from what Hardy–Weinberg predicts, you know some evolutionary force — like natural selection, migration, or genetic drift — is acting on the population.

Visual Explanation

The diagram below shows what happens to allele and genotype frequencies under Hardy–Weinberg equilibrium versus when evolution is occurring. On the left, the population stays in equilibrium across generations. On the right, a force like natural selection pushes allele frequencies in one direction.

Left: Under Hardy–Weinberg equilibrium, the allele frequencies (p and q) stay at 0.5 across all three generations. Right: When an evolutionary force like natural selection acts, allele A increases in frequency while allele a decreases and eventually disappears — this is evolution in action.

Notice that in the equilibrium panel, every generation has the exact same mix of A and a alleles. Nothing is pushing the alleles in one direction. In the evolution panel, something (perhaps natural selection favoring A) causes the A allele to become more and more common. By generation 3, allele a has vanished entirely. The Hardy–Weinberg model gives you the "expected" picture on the left, so you can spot the "unexpected" picture on the right.

Mathematical Framework

The Hardy–Weinberg principle uses two simple equations. The first describes allele frequencies, and the second predicts genotype frequencies. Together, they let you calculate exactly what a non-evolving population should look like.

ALLELE FREQUENCY EQUATION
p + q = 1
p = frequency of the dominant allele (e.g., A). q = frequency of the recessive allele (e.g., a). Since these are the only two alleles for this gene, their frequencies must add up to 1 (100%).
GENOTYPE FREQUENCY EQUATION
p² + 2pq + q² = 1
= frequency of homozygous dominant (AA). 2pq = frequency of heterozygous (Aa). = frequency of homozygous recessive (aa). These three genotypes account for every individual, so they must also add to 1.

Where does p² + 2pq + q² come from? It is simply the expansion of (p + q)². When organisms mate randomly, each parent donates one allele. The chance of getting two A alleles is p × p = p². The chance of getting one of each (Aa) can happen two ways (A from mom and a from dad, or a from mom and A from dad), giving 2 × p × q = 2pq. The chance of two a alleles is q × q = q².

CONNECTING THE EQUATIONS
(p + q)² = p² + 2pq + q² = 1
This is just the FOIL expansion you may have learned in algebra. Since p + q = 1, squaring both sides gives 1² = 1. This is the heart of Hardy–Weinberg.
💡 Why Only Two Alleles?
In real life, a gene can have more than two alleles. The Hardy–Weinberg model with p and q works for the simplest case — one gene with two alleles. This is the perfect starting point for learning the concept. Once you're comfortable, you can expand to three or more alleles.

The Five Conditions for Equilibrium

Hardy–Weinberg equilibrium is like an ideal scenario — it only holds when five strict conditions are met. In reality, these conditions are almost never perfectly satisfied. That's actually the point! When you check a real population and find it doesn't match Hardy–Weinberg predictions, you can figure out which condition was violated and therefore which evolutionary force is at work.

All five conditions must be true simultaneously for the population to remain in Hardy–Weinberg equilibrium. Violating even one opens the door for evolutionary change.
The five conditions and their evolutionary consequences when violated
ConditionWhat It MeansIf Violated, This Happens
No MutationDNA copying is perfect — no new alleles appearNew alleles enter the gene pool, changing frequencies over time
Random MatingOrganisms choose mates without preference for or against any genotypeGenotype ratios shift (though allele frequencies may still stay the same)
No Natural SelectionAll genotypes survive and reproduce equally wellFavorable alleles increase; harmful alleles decrease
Large PopulationThe population is so big that random chance can't significantly shift allele frequenciesGenetic drift causes random changes, especially in small groups
No MigrationNo organisms enter or leave the populationGene flow adds or removes alleles, altering frequencies

Worked Example

Suppose you are studying a population of 500 flowers. The flower color gene has two alleles: R (red, dominant) and r (white, recessive). You count 80 white flowers (genotype rr). Is this population in Hardy–Weinberg equilibrium?

Detecting Evolution in a Flower Population
1
Step 1 — Find q² from the dataWhite flowers have the genotype rr, so they represent q². There are 80 white flowers out of 500 total, so q² = 80 ÷ 500 = 0.16.
q² = 0.16
2
Step 2 — Find q by taking the square rootTo get q, take the square root of 0.16. q = √0.16 = 0.4. This means the r allele makes up 40% of all alleles in the population.
q = 0.4
3
Step 3 — Find p using p + q = 1Since p + q = 1, we get p = 1 − 0.4 = 0.6. The R allele makes up 60% of the gene pool.
p = 0.6
4
Step 4 — Predict expected genotype frequenciesUsing the Hardy–Weinberg equation: p² = (0.6)² = 0.36, so 36% should be RR. 2pq = 2 × 0.6 × 0.4 = 0.48, so 48% should be Rr. q² = 0.16, so 16% should be rr. Out of 500 flowers, that predicts 180 RR, 240 Rr, and 80 rr.
Expected: 180 RR, 240 Rr, 80 rr
5
Step 5 — Compare expected vs. observedNow you would compare these expected numbers to the actual counts you observe. If you counted 180 RR, 240 Rr, and 80 rr — they match! The population is likely in equilibrium. But suppose you actually observed 200 RR, 220 Rr, and 80 rr. The genotype ratios would not match the prediction, suggesting at least one of the five conditions is being violated and the population may be evolving.
Match → equilibrium; Mismatch → evolution likely occurring

Strengths & Limitations

Like any model in science, the Hardy–Weinberg principle has both powerful uses and important limitations. Understanding both helps you apply the model wisely.

Strengths and limitations of the Hardy–Weinberg model
StrengthsLimitations
Provides a clear mathematical baseline — you know exactly what "no evolution" looks likeThe five conditions are almost never perfectly met in real populations, so true equilibrium is rare
Easy to use — requires only basic algebra (squares and square roots)Only works for a single gene with two alleles in its basic form
Tells you that evolution IS happening, which prompts you to investigate which force is responsibleDoes not tell you WHICH evolutionary force is acting — further investigation is needed
Widely used in medicine, conservation biology, and forensic scienceAssumes diploid organisms with sexual reproduction — doesn't apply to all life
KEY TAKEAWAY
The Hardy–Weinberg equation is like a speed limit sign for evolution. The sign itself doesn't make cars go a particular speed — it sets the expectation. When a car (population) goes faster or slower than the posted limit (the equilibrium prediction), you know some force (engine power, brakes, wind) is acting. The model doesn't tell you which force — you have to investigate further.

Connection to Advanced Population Genetics

The basic Hardy–Weinberg model you've learned here is just the beginning. As you advance in genetics, you'll encounter more sophisticated tools that build directly on this foundation. The table below shows how the introductory ideas connect to more complex analyses.

From introductory to advanced population genetics
Introductory ConceptAdvanced Extension
Two alleles (p and q)Multiple alleles (p + q + r + ... = 1) for genes like blood type
Visual comparison of expected vs. observedChi-square (χ²) statistical test to formally measure deviation
Identifying that evolution is happeningMeasuring selection coefficients, migration rates, and effective population size
One generation snapshotTracking allele frequency change across many generations using population models
Assuming simple dominanceApplying Hardy–Weinberg to codominance, incomplete dominance, and X-linked genes

In AP Biology and college-level genetics, you'll use a test called the chi-square test to mathematically determine whether the differences between observed and expected genotype counts are large enough to be meaningful. For now, the most important idea is that Hardy–Weinberg gives you the null hypothesis — the prediction of what happens when evolution is not occurring.

Practice Problems

PROBLEM 1CONCEPTUAL
A scientist discovers that the allele frequencies in a population of beetles have stayed exactly the same for 20 generations. What does this tell you about the population? List at least two of the five conditions that must be met for this to happen.
PROBLEM 2BASIC CALCULATION
In a population of 1,000 rabbits, 90 have short ears (the recessive phenotype, genotype ee). Calculate the frequencies of the e and E alleles (q and p).
PROBLEM 3INTERMEDIATE
Using the rabbit population from Problem 2 (p = 0.7, q = 0.3, 1,000 rabbits), calculate the expected number of rabbits with each genotype (EE, Ee, ee) under Hardy–Weinberg equilibrium. If you actually observed 510 EE, 400 Ee, and 90 ee, does this population appear to be in equilibrium?
PROBLEM 4APPLIED
Cystic fibrosis is caused by a recessive allele (f). In a certain human population, about 1 in 2,500 people is born with cystic fibrosis (genotype ff). Use Hardy–Weinberg to estimate what fraction of the population are carriers (Ff) — people who carry one copy of the allele but don't have the disease.
PROBLEM 5CRITICAL THINKING
A small island has a population of 50 lizards. After a hurricane, only 10 lizards survive. Before the hurricane, the frequency of allele A was p = 0.6. After the hurricane, you measure p = 0.9. Explain which Hardy–Weinberg condition was violated, why the allele frequency changed, and whether this counts as evolution. Could natural selection explain this change instead?

Lesson Summary

The Hardy–Weinberg principle provides a mathematical model of a non-evolving population. Its two core equations — p + q = 1 for allele frequencies and p² + 2pq + q² = 1 for genotype frequencies — predict what a population should look like when five conditions are met: no mutation, random mating, no natural selection, large population size, and no migration.

Because real populations almost never satisfy all five conditions perfectly, the model serves as a powerful null hypothesis. When you compare observed genotype frequencies to expected Hardy–Weinberg frequencies and find a mismatch, you have evidence that evolution is occurring. The next step is to investigate which evolutionary force — natural selection, genetic drift, gene flow, mutation, or non-random mating — is responsible.

Varsity Tutors • Genetics • Hardy-Weinberg & Evolutionary Change — Use Hardy–Weinberg to detect evolutionary change (intro)