Skills you’ll gain in this topic:
- Identify the conditions necessary for Hardy-Weinberg equilibrium.
- Use Hardy-Weinberg equations to calculate allele and genotype frequencies.
- Explain why some populations stay stable while others evolve.
- Predict genetic outcomes based on selective pressures and environmental factors.
- Relate Hardy-Weinberg principles to real-world examples of evolution.

Using Hardy-Weinberg to Predict Population Changes
The Hardy-Weinberg equilibrium is a theoretical model that describes how allele frequencies in a population will remain constant over time in the absence of certain influences, such as natural selection, genetic drift, mutation, and migration.
In general, The model assumes that the population is large, randomly mating, and not subject to any influences that would affect the frequency of alleles. (We'll dive deeper into these conditions later!)
Under these conditions, the frequency of alleles in the population will remain constant from generation to generation. Applications-wise, the Hardy-Weinberg equilibrium provides a baseline against which actual population data can be compared to assess whether evolution is occurring.
The Five Conditions
The Hardy-Weinberg equilibrium is a model in which allele frequencies will not change if these five conditions exist:
- No mutation: new alleles are not added to the gene pool, so the existing alleles are passed on to the next generation.
- No selection: no natural or artificial selection is acting on the population, so no allele is favored over another.
- No gene flow: there is no movement of individuals between populations or migration that would introduce new alleles or remove existing alleles.
- Infinite population size: the population is so large that random fluctuations in allele frequency (genetic drift) do not occur.
- Random mating: mating is completely random and not influenced by any genetic or environmental factors. Of course, each of these five things are impossible for a natural situation. A population will never be infinite, and mutation is not something that can be controlled! That’s why this simply acts as a model to calculate genotypic ratios under these assumptions (which, of course, are false).
Calculated Ratios
The calculated ratios under this control population can serve as a null hypothesis for evolution. The allele frequencies in a population are calculated from the genotypic ratios. Here’s how:
Although this equation may look like a lot, it actually isn’t too bad. If you think about it, we only have two variables! The ‘p’ in the equations can represent the frequency of allele 1 in the population, and the ‘q’ will represent the frequency of the second allele. These numbers will be decimals, as they will represent the percentage of the population that has each phenotype (which is why it adds up to 1!).
For the first equation, p2 represents the frequency of a homozygous dominant genotype, 2pq represents the frequency of a heterozygous genotype, and q2 represents the frequency of the homozygous recessive genotype. Keeping all that in mind, the first thing to do in the process of calculating is to determine the frequency of the recessive genotype. This is the only genotype that can be determined from the phenotypic ratios (a dominant phenotype could be either homozygous dominant or heterozygous).
The frequency of the recessive genotype will be equal to q2. Therefore, q can be found by taking the square root of that number. Then, subtract this number from 1 to find p, or the frequency of the dominant phenotype in a population.
Once the variable p is found, it can be put into the first equation to find the genotypic ratios of a population.
Image courtesy of Giphy.For example, if there is a population of 100 birds, 84 of them have white feathers and 16 of them have grey feathers. Here’s how we would solve:
Example Problem
A rare genetic disorder is caused by a recessive allele, "a", in a population. The frequency of the allele in the population is 0.02. Using the Hardy-Weinberg equilibrium, calculate the frequency of the dominant allele, "A", and the frequency of individuals who are homozygous recessive (aa) and heterozygous (Aa) for the disorder. Explain how you arrived at your calculations and what assumptions of the Hardy-Weinberg equilibrium are being made in this scenario.
To solve this question, you would first assign the frequency of the recessive allele, "a", as "q" and the frequency of the dominant allele, "A", as "p". Since "A" and "a" are codominant, the sum of p and q is equal to 1.
The equation for calculating Hardy-Weinberg equilibrium is p^2 + 2pq + q^2 = 1.
We know that q = 0.02, so we can substitute that into the equation, to calculate p:
p = 1 - q = 1 - 0.02 = 0.98
The frequency of individuals who are homozygous recessive (aa) is: q^2 = 0.02^2 = 0.0004, or 0.04%.
The frequency of individuals who are heterozygous (Aa) is: 2pq = 2(0.98)(0.02) = 0.0392, or 3.92%.
With this problem, we are making the assumptions of the Hardy-Weinberg equilibrium such as:
- There is no mutation
- No selection
- No gene flow
- Infinite population size
- Random mating.
It is also good to remember that this equilibrium is theoretical and only holds true under these assumptions, real world populations almost never meet all these criteria.
Check out the AP Bio Unit 7 Replays or watch the 2021 Unit 7 Cram
Vocabulary
The following words are mentioned explicitly in the College Board Course and Exam Description for this topic.
| Term | Definition |
|---|---|
| allele frequencies | The proportion or percentage of a specific allele in a population's gene pool. |
| genotype frequencies | The proportion or percentage of each genotype combination in a population. |
| Hardy-Weinberg Equilibrium | A model describing a non-evolving population where allele and genotype frequencies remain constant across generations. |
| large population size | A condition for Hardy-Weinberg Equilibrium where a population is large enough to prevent random changes in allele frequencies due to chance events. |
| migration | The movement of individuals (and their alleles) into or out of a population; must be absent for Hardy-Weinberg Equilibrium. |
| mutations | Random changes in DNA sequences that create new genetic variations in populations. |
| natural selection | A major mechanism of evolution in which individuals with more favorable phenotypes are more likely to survive and reproduce, passing advantageous traits to subsequent generations. |
| non-evolving population | A population in which allele frequencies do not change over time because evolutionary forces are absent. |
| null hypothesis | A baseline model used for comparison; in this context, Hardy-Weinberg Equilibrium serves as a reference point to detect when populations are evolving. |
| random mating | A condition where individuals in a population mate without preference for specific genotypes; required for Hardy-Weinberg Equilibrium. |
Frequently Asked Questions
What is Hardy-Weinberg equilibrium and why do we need to know it?
Hardy-Weinberg equilibrium is a mathematical model that describes allele and genotype frequencies in a non-evolving population. It assumes five conditions: large population size, no migration (gene flow), no new mutations, random mating, and no natural selection. Those conditions are never fully met in nature, so H–W serves as the null hypothesis: if observed frequencies differ from expectations (using p + q = 1 and p^2 + 2pq + q^2 = 1), evolution is occurring. You need to know it because it gives a baseline to detect evolutionary forces (genetic drift, gene flow, mutation, nonrandom mating, selection). On the AP exam you’ll be asked to calculate allele/genotype frequencies, state the null hypothesis, and interpret deviations—skills tied to LO 7.5.A and EK 7.5.A. Review the CED keywords (p, q, p^2, 2pq, q^2, founder/bottleneck effects) and practice problems on Fiveable (topic study guide: https://library.fiveable.me/ap-biology/unit-7/hardy-weinberg-equilibrium/study-guide/DQK5SLWcKmZatpBgPXmV; unit overview: https://library.fiveable.me/ap-biology/unit-7; practice: https://library.fiveable.me/practice/ap-biology).
How do you calculate allele frequencies using the Hardy-Weinberg equation?
Hardy-Weinberg gives you a quick way to get allele frequencies from genotype counts when a population is (hypothetically) not evolving. Use p for one allele frequency and q for the other, with p + q = 1 and p² + 2pq + q² = 1. Steps: 1. If you have genotype counts, convert to frequencies by dividing by total individuals. Example: 100 individuals: 36 AA, 48 Aa, 16 aa → f(AA)=0.36, f(Aa)=0.48, f(aa)=0.16. 2. Use p² = f(AA) and q² = f(aa) if the population is in H-W. Here p = sqrt(0.36)=0.6, q = sqrt(0.16)=0.4. 3. Or calculate directly from genotypes: p = [2(AA) + (Aa)] / (2N). From counts above: p = [2·36 + 48]/200 = 120/200 = 0.6; q = 1 − p = 0.4. 4. Check: p² (0.36) + 2pq (0.48) + q² (0.16) = 1. On the AP exam you may be asked to compute p or q from genotype data or to test if a population is in Hardy-Weinberg equilibrium (compare observed vs expected genotype frequencies). For extra practice, see the Topic 7.5 study guide (https://library.fiveable.me/ap-biology/unit-7/hardy-weinberg-equilibrium/study-guide/DQK5SLWcKmZatpBgPXmV) and lots of practice problems (https://library.fiveable.me/practice/ap-biology).
I'm confused about the difference between p and q in Hardy-Weinberg - which one is which?
p and q are just labels for the two alleles at a single gene. By definition in the CED: p = frequency of allele 1 and q = frequency of allele 2, and p + q = 1. In the Hardy-Weinberg genotype model those allele frequencies predict genotype frequencies: p² = frequency of the homozygote for allele 1 (AA), 2pq = frequency of heterozygotes (Aa), and q² = frequency of the homozygote for allele 2 (aa). Important points: - Which allele you call p vs. q is arbitrary—pick the allele you care about (e.g., a disease allele) and call its frequency p. - If you know genotype counts you can calculate allele frequencies (EK 7.5.A.2). - Use the equations as a null model to test for evolution (EK 7.5.A.1). For a clear walk-through and practice problems, see the Topic 7.5 study guide (https://library.fiveable.me/ap-biology/unit-7/hardy-weinberg-equilibrium/study-guide/DQK5SLWcKmZatpBgPXmV) and more practice questions (https://library.fiveable.me/practice/ap-biology).
What are the 5 conditions needed for Hardy-Weinberg equilibrium and why are they important?
Hardy-Weinberg needs five conditions: (1) very large population size (no genetic drift), (2) no migration/gene flow, (3) no new mutations, (4) random mating, and (5) no natural selection. These matter because if any are broken allele/genotype frequencies change over generations—so HW gives a null hypothesis (a non-evolving population) you can test with p + q = 1 and p² + 2pq + q² = 1. Practically, HW lets you spot processes like drift (small populations), gene flow (migration), mutation, nonrandom mating (inbreeding or assortative mating), or selection when observed frequencies deviate from expected. On the AP exam you’ll often state these conditions and use HW as a model to calculate allele frequencies or justify why a population is evolving (LO 7.5.A; EK 7.5.A.1). For extra review and practice problems tied to Topic 7.5, see the Fiveable study guide (https://library.fiveable.me/ap-biology/unit-7/hardy-weinberg-equilibrium/study-guide/DQK5SLWcKmZatpBgPXmV) and the Unit 7 overview (https://library.fiveable.me/ap-biology/unit-7).
Why does Hardy-Weinberg never actually happen in real populations if it's so important?
Hardy-Weinberg almost never happens because its five strict conditions are basically impossible in nature: a very large population, no migration (no gene flow), no new mutations, random mating, and no natural selection. Real populations are finite (so genetic drift and bottlenecks matter), individuals move between populations (gene flow), mutations constantly introduce new alleles, mates are often chosen nonrandomly, and selection acts all the time. The CED calls H-W a “null hypothesis” for this reason—it’s a baseline model you use to detect evolution. If observed genotype frequencies deviate from p² + 2pq + q², one or more evolutionary forces (genetic drift, gene flow, mutation, nonrandom mating, or selection) are acting. On the AP exam you’ll use H-W to calculate allele frequencies and test the null (often with chi-square)—practice those calculations and interpretations. Review the Topic 7.5 study guide (https://library.fiveable.me/ap-biology/unit-7/hardy-weinberg-equilibrium/study-guide/DQK5SLWcKmZatpBgPXmV) and drill practice problems (https://library.fiveable.me/practice/ap-biology) to get fast at spotting which condition is broken.
How do I solve Hardy-Weinberg problems step by step for the AP exam?
Step-by-step for AP-style Hardy-Weinberg problems (straightforward method you can use on the exam): 1. Check assumptions: state that H-W models a non-evolving population (large size, no migration, no mutation, random mating, no selection)—this is your null hypothesis (EK 7.5.A.1). 2. Identify what you’re given (genotype counts, phenotype % or one allele freq). If you have counts, convert to frequencies by dividing by total N. 3. If you’re given genotype frequencies, get allele frequencies: p = freq(AA) + ½ freq(Aa); q = 1 − p (EK 7.5.A.2). If you’re given p or q directly, use p + q = 1. 4. Use p and q in p² + 2pq + q² = 1 to predict genotype frequencies or expected counts (multiply by N). 5. If problem asks whether population is in equilibrium, compare observed vs expected (use chi-square if asked—AP allows calculators). State which H-W condition might be violated (selection, drift, gene flow, nonrandom mating). 6. Always label p and q and show substitution steps (AP graders want clear math and reasoning). For more examples and practice, check the Topic 7.5 study guide (https://library.fiveable.me/ap-biology/unit-7/hardy-weinberg-equilibrium/study-guide/DQK5SLWcKmZatpBgPXmV) and hit practice questions (https://library.fiveable.me/practice/ap-biology).
What's the difference between allele frequency and genotype frequency in Hardy-Weinberg?
Allele frequency = how common a single version (allele) of a gene is in the whole population (p and q). For a two-allele locus p + q = 1 (e.g., p = frequency of A, q = frequency of a). Genotype frequency = how common a genotype is (AA, Aa, aa) among individuals. In Hardy-Weinberg equilibrium genotype frequencies are predicted from allele frequencies: p² (AA) + 2pq (Aa) + q² (aa) = 1. So allele freq is about single copies in the gene pool; genotype freq is about combinations in individuals. Important AP point: you can calculate allele frequencies from observed genotype counts (EK 7.5.A.2) and use H-W as a null hypothesis to test for evolution (EK 7.5.A.1). For more practice and examples that match the CED, check the Topic 7.5 study guide (https://library.fiveable.me/ap-biology/unit-7/hardy-weinberg-equilibrium/study-guide/DQK5SLWcKmZatpBgPXmV) and the practice bank (https://library.fiveable.me/practice/ap-biology).
Can someone explain what p² + 2pq + q² = 1 actually means in simple terms?
Think of p and q as the two allele frequencies in a population (p + q = 1). The equation p² + 2pq + q² = 1 just breaks the population’s genotypes into proportions you’d expect in a non-evolving (Hardy-Weinberg) population: - p² = frequency of homozygote for allele 1 (AA) - 2pq = frequency of heterozygotes (Aa) - q² = frequency of homozygote for allele 2 (aa) So if p = 0.6 and q = 0.4, expect 0.36 AA, 0.48 Aa, 0.16 aa. Those numbers are predictions only when the five H-W conditions hold: large population, no migration, no new mutations, random mating, and no natural selection (CED EK 7.5.A.1). On the AP exam you’ll use this model as a null hypothesis: compare observed genotype counts to H-W expectations (often with chi-square) to decide if evolution (allele frequencies changing) is happening. For more practice and a focused study guide, check the Topic 7.5 Hardy-Weinberg study guide (https://library.fiveable.me/ap-biology/unit-7/hardy-weinberg-equilibrium/study-guide/DQK5SLWcKmZatpBgPXmV) and the Unit 7 overview (https://library.fiveable.me/ap-biology/unit-7). For drills, use Fiveable practice problems (https://library.fiveable.me/practice/ap-biology).
Why is Hardy-Weinberg called a null hypothesis if it never really occurs?
Because Hardy-Weinberg (H–W) gives a precise, testable prediction for a non-evolving population, it’s used as the null hypothesis: “allele frequencies won't change; genotype frequencies = p² + 2pq + q².” The CED even lists the five perfect conditions (large population, no migration, no mutations, random mating, no selection)—which, in nature, are never fully met. That doesn’t make the model useless. Instead, it gives you a baseline expectation. If your observed genotype frequencies differ significantly from p²:2pq:q² (you’d often use a chi-square on the AP exam), you reject the null and infer one or more evolutionary forces (genetic drift, gene flow, mutation, nonrandom mating, or selection) are acting. On AP tasks you’ll sometimes be asked to “state the null hypothesis” or use H–W to calculate expected frequencies (p + q = 1), so treat H–W as the clear “no evolution” claim you test against. For a quick review and practice problems, see the Topic 7.5 study guide (https://library.fiveable.me/ap-biology/unit-7/hardy-weinberg-equilibrium/study-guide/DQK5SLWcKmZatpBgPXmV) and more practice at (https://library.fiveable.me/practice/ap-biology).
How does population size affect Hardy-Weinberg equilibrium and what counts as "large enough"?
Population size matters because one Hardy-Weinberg condition is “a large population size.” In small populations random sampling causes allele frequencies to wander (genetic drift) so the HW null model breaks down. That’s why founder effects and bottlenecks can rapidly change p and q and shift genotype frequencies away from p²+2pq+q². In contrast, very large populations make random fluctuations negligible, so allele frequencies stay near HW expectations unless other forces (selection, migration, mutation, nonrandom mating) act. There’s no single magic cutoff in the CED—“large” means large enough that drift is negligible. Practically, populations with effective size (Ne) in the low hundreds or less show noticeable drift; Ne in the thousands makes drift much weaker. Remember HW is a null hypothesis on the exam: if you detect changes in frequencies, one cause could be small population size (drift) rather than selection. For review and practice, see the Topic 7.5 study guide (https://library.fiveable.me/ap-biology/unit-7/hardy-weinberg-equilibrium/study-guide/DQK5SLWcKmZatpBgPXmV) and Unit 7 overview (https://library.fiveable.me/ap-biology/unit-7); practice questions are at (https://library.fiveable.me/practice/ap-biology).
What happens to allele frequencies when Hardy-Weinberg conditions are violated?
Hardy-Weinberg is the null model: if i) large population, ii) no migration, iii) no new mutations, iv) random mating, and v) no natural selection hold, allele frequencies stay constant. If any condition is violated, allele frequencies change. - Genetic drift (small population, bottleneck, founder effect): frequencies change randomly from generation to generation; rare alleles can be lost or fixed. - Gene flow (migration): alleles move between populations, making them more similar. - Mutation: creates new alleles and slowly shifts frequencies. - Nonrandom mating (inbreeding, assortative mating): changes genotype frequencies (and can expose recessive alleles), which can alter effective allele frequencies over time. - Natural selection: alleles linked to higher fitness increase directionally. On the AP, treat HW as a null hypothesis: if observed frequencies deviate from p² + 2pq + q², one of those forces is acting. For a focused review, see the Topic 7 study guide (https://library.fiveable.me/ap-biology/unit-7/hardy-weinberg-equilibrium/study-guide/DQK5SLWcKmZatpBgPXmV) and try practice problems (https://library.fiveable.me/practice/ap-biology).
I don't understand how to use Hardy-Weinberg to predict if a population is evolving - can someone help?
Hardy-Weinberg (H-W) is the “null” model: if a population meets five conditions (large size, no migration, no new mutations, random mating, no natural selection) allele frequencies don’t change. To test whether a population is evolving, do this: 1) Get genotype counts (AA, Aa, aa). 2) Calculate allele frequencies: p = freq(A) = (2·AA + Aa) / (2·N); q = 1 − p. 3) Use p and q to get expected genotype frequencies: p² (AA), 2pq (Aa), q² (aa), multiply by N for expected counts. 4) Compare observed vs expected. Small differences → population might be in H-W (not evolving). Big differences → evolution is occurring. Use a chi-square test or qualitatively note which H-W assumptions are violated (drift, gene flow, selection, nonrandom mating, mutation). On the AP exam you’ll often be asked to calculate p and q, give expected genotype frequencies (p²+2pq+q²=1), and state H-W as a null hypothesis. For a quick refresher and practice problems, check the Topic 7.5 study guide (https://library.fiveable.me/ap-biology/unit-7/hardy-weinberg-equilibrium/study-guide/DQK5SLWcKmZatpBgPXmV) and the practice problem bank (https://library.fiveable.me/practice/ap-biology).
How do migration and mutations mess up Hardy-Weinberg equilibrium?
Hardy-Weinberg assumes no migration and no new mutations (CED EK 7.5.A.1). Migration (gene flow) changes allele frequencies by adding or removing alleles when individuals move between populations—immigrants can raise the frequency of alleles that were rare (or bring in alleles that were absent), so p and q no longer sum to the same values generation-to-generation. Mutation creates new alleles (or converts one allele to another), so it directly changes p and q as well. Even though mutation rates are usually low, over many generations new alleles can spread or provide raw material for selection. Both processes therefore violate the Hardy-Weinberg conditions (ii and iii), so genotype frequencies (p², 2pq, q²) will deviate from expected values and the null model fails. On the AP exam you’ll be asked to identify these violations and predict direction of allele-frequency change—practice with the Topic 7.5 study guide (https://library.fiveable.me/ap-biology/unit-7/hardy-weinberg-equilibrium/study-guide/DQK5SLWcKmZatpBgPXmV) and more problems at (https://library.fiveable.me/practice/ap-biology).
What's the connection between Hardy-Weinberg and natural selection in evolution?
Hardy-Weinberg (HW) is the “null model” for a non-evolving population: if p + q = 1 and p² + 2pq + q² hold, allele frequencies don’t change. One of the five HW conditions is “no natural selection” (CED EK 7.5.A.1.v). So natural selection directly breaks HW: when certain genotypes have higher fitness, their allele frequencies change (directional, stabilizing, or disruptive selection), and the population moves away from HW expectations. Practically, you calculate expected genotype frequencies from p and q, compare to observed (using chi-square on the AP exam), and a significant difference suggests evolution—often selection. HW is a useful null hypothesis for spotting selection, drift, migration, nonrandom mating, or mutation (CED EK 7.5.A.1). For a focused review, see the Topic 7.5 study guide (https://library.fiveable.me/ap-biology/unit-7/hardy-weinberg-equilibrium/study-guide/DQK5SLWcKmZatpBgPXmV) and unit practice problems (https://library.fiveable.me/practice/ap-biology).
Why do we assume random mating in Hardy-Weinberg when that's not realistic?
Good question—we assume random mating in Hardy-Weinberg because the model is a simplified null hypothesis, not because it’s realistic. By listing five strict conditions (large population, no migration, no mutation, random mating, no selection—EK 7.5.A.1), the Hardy-Weinberg model gives a baseline expectation: if none of those forces act, allele frequencies (p and q) stay constant and genotype frequencies follow p² + 2pq + q². That makes it easy to detect evolution: when real populations deviate from HW, you can point to which assumption(s) are broken (e.g., assortative mating or inbreeding changes genotype frequencies; selection or migration changes allele frequencies). So random mating is an assumption because it isolates other causes of change and gives you a testable null hypothesis for AP exam questions (LO 7.5.A). For a quick review and practice with problems, see the Topic 7.5 study guide (https://library.fiveable.me/ap-biology/unit-7/hardy-weinberg-equilibrium/study-guide/DQK5SLWcKmZatpBgPXmV) or the Unit 7 page (https://library.fiveable.me/ap-biology/unit-7).


