AP Biology · Unit 7 · Topic 7.5

    7.5 Hardy–Weinberg Equilibrium

    Reviewed by P V Satish, Senior Faculty of Science and Academic Consultant · PG Life Sciences, PGD Biotechnology · 20+ years teaching NEET and AP · Special interest in biotechnology, biochemistry and the basics of physics
    Updated

    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.

    1. q² = 160 ÷ 1,000 = 0.16
    2. q = √0.16 = 0.4
    3. p = 1 − 0.4 = 0.6
    4. Homozygous dominant: p² = 0.36, so about 360 moths are AA.
    5. Heterozygous: 2pq = 2 × 0.6 × 0.4 = 0.48, so about 480 moths are Aa (carriers of the white allele).
    6. 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

    ConditionIf violatedExample
    No mutationNew alleles enter the gene poolA new antibiotic-resistance allele appears
    Random matingGenotype frequencies changeFemales prefer brightly coloured males; inbreeding
    No natural selectionAllele frequencies change towards fitter allelesPesticide kills susceptible insects
    Very large populationGenetic drift changes frequencies by chanceA small island population
    No gene flowAlleles enter or leave with migrantsIndividuals 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.

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

    2. Question 2 · SP 5 · Statistical Tests and Data Analysis

      Using the same population (q = 0.3), what percentage of individuals are heterozygous?

    3. Question 3 · SP 1 · Concept Explanation

      Which situation violates a Hardy–Weinberg condition through non-random mating?

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

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

    1. (a) Calculate the frequency of the b allele in 2020, assuming Hardy–Weinberg equilibrium.
    2. (b) Calculate the expected number of heterozygous snails in 2020.
    3. (c) Identify the Hardy–Weinberg condition violated between 2020 and 2025.
    4. (d) Explain why the b allele did not disappear completely.

    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.

    Free Unit 7 cheat sheet

    Every topic in Unit 7: Natural Selection on a few printable pages: the core idea, key terms, the two traps students fall into and what the exam asks.

    We'll use your email to tell you when new AP Biology practice material is ready. No spam, and we'll delete it if you ask.

    Ready to test yourself on the whole course?Unit 7 is one of 8 units on the exam. Take a full-length AP Biology practice exam: 60 multiple-choice + 6 free-response questions, with explanations and an estimated 1–5 score. $14.99 · try 5 questions free.

    AP® is a trademark registered by College Board, which is not affiliated with, and does not endorse, this website.