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.

Genetics emblem with a DNA helix, genetic code, and microscope
Inside this lesson 10 sections 5 questions 8 figures

SECTION 1

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.

SECTION 2

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.

SECTION 3

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.

Hardy–Weinberg Equilibrium vs. Evolutionary ChangeEQUILIBRIUM (No Evolution)EVOLUTION DETECTEDGeneration 1AAaap = 0.5, q = 0.5Generation 2AAaap = 0.5, q = 0.5Generation 3AAaap = 0.5, q = 0.5✓ Frequencies unchangedGeneration 1AAaap = 0.5, q = 0.5Generation 2AAAap = 0.75, q = 0.25Generation 3AAAAp = 1.0, q = 0.0✗ Frequencies shifted — evolution!
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.

SECTION 4

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=1p + 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

p2+2pq+q2=1p² + 2pq + q² = 1

p² = frequency of homozygous dominant (AA). 2pq = frequency of heterozygous (Aa). q² = 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)2=p2+2pq+q2=1(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.

SECTION 5

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.

Five Conditions for Hardy–Weinberg EquilibriumIf ANY condition is violated, the population may be evolvingH–WEQUILIBRIUM1. No MutationNo new alleles created2. Random MatingNo mate preference3. No SelectionAll genotypes equally fit4. Large PopulationNo genetic drift5. No MigrationNo gene flow in or out
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.
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

The five conditions and their evolutionary consequences when violated

SECTION 6

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. 1

    Step 1 — Find q² from the data

    White 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. 2

    Step 2 — Find q by taking the square root

    To 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. 3

    Step 3 — Find p using p + q = 1

    Since 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. 4

    Step 4 — Predict expected genotype frequencies

    Using 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. 5

    Step 5 — Compare expected vs. observed

    Now 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

SECTION 7

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.

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

Strengths and limitations of the Hardy–Weinberg model

✦

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.

SECTION 8

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.

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

From introductory to advanced population genetics

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.

SECTION 9

Practice Problems

Question 1: CONCEPTUAL

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.
Show answer
This tells you the population is in Hardy–Weinberg equilibrium, meaning it is not evolving with respect to that gene. For this to happen, the population must satisfy the five Hardy–Weinberg conditions. Two examples are: (1) no natural selection — all genotypes survive and reproduce equally well, and (2) the population must be very large so genetic drift doesn't randomly change allele frequencies. Other valid answers include no mutation, random mating, and no migration.

Question 2: BASIC 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).
Show answer
Short-eared rabbits are ee, so q² = 90 ÷ 1,000 = 0.09. Taking the square root gives q = √0.09 = 0.3. Since p + q = 1, p = 1 − 0.3 = 0.7. So the frequency of the recessive allele e is 0.3 (30%), and the frequency of the dominant allele E is 0.7 (70%).

Question 3: INTERMEDIATE

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?
Show answer
Expected frequencies: p² = 0.49 (EE), 2pq = 0.42 (Ee), q² = 0.09 (ee). Multiply each by 1,000 to get expected counts: 490 EE, 420 Ee, and 90 ee. The observed counts are 510 EE, 400 Ee, and 90 ee. There is a difference: we see 20 more EE and 20 fewer Ee than expected. This suggests the population may not be in perfect equilibrium — for example, non-random mating (perhaps EE individuals preferring other EE mates) could explain the excess of homozygotes. A formal statistical test (chi-square) would tell us if this deviation is significant or just due to chance.

Question 4: APPLIED

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.
Show answer
If 1 in 2,500 people has cystic fibrosis, then q² = 1/2,500 = 0.0004. Taking the square root gives q = √0.0004 = 0.02. Since p + q = 1, p = 0.98. The carrier frequency is 2pq = 2 × 0.98 × 0.02 = 0.0392, or about 3.9%. This means roughly 1 in 25 people in this population carries one copy of the cystic fibrosis allele without showing symptoms. This is a real-world application used by genetic counselors to estimate disease risk.

Question 5: CRITICAL 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?
Show answer
The most clearly violated condition is large population size. When the population crashed from 50 to just 10 survivors, random chance determined which individuals (and which alleles) survived. This is called genetic drift, and specifically this extreme example is known as a bottleneck effect. The allele frequency changed from p = 0.6 to p = 0.9 not because allele A was 'better,' but because the survivors happened to carry more A alleles. Yes, this counts as evolution because the allele frequencies changed. Natural selection could also explain the shift if, for example, AA lizards were stronger and more likely to survive the hurricane — but we would need additional evidence (like data showing AA lizards had higher survival rates) to distinguish drift from selection. This problem illustrates why Hardy–Weinberg is so useful: it tells you evolution happened, then you investigate the cause.

SUMMARY

Lesson Summary

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)