Hardy-Weinberg Practice Problems
Master population genetics with 10 fully worked examples, step-by-step solutions, and the 5 essential conditions for Hardy-Weinberg equilibrium
The Hardy-Weinberg principle is the foundation of population genetics because it serves as the null hypothesis of evolution. When a population is in Hardy-Weinberg equilibrium, allele frequencies remain constant across generations — meaning evolution is NOT occurring. Conversely, if observed genotype frequencies deviate from Hardy-Weinberg predictions, it’s evidence that one or more evolutionary forces are acting on the population. This makes Hardy-Weinberg equilibrium the critical baseline for detecting natural selection, genetic drift, mutation, migration, and non-random mating in real populations.
This comprehensive guide covers everything you need to master Hardy-Weinberg practice problems: the 5 conditions required for Hardy-Weinberg equilibrium, a proven step-by-step method for solving any Hardy-Weinberg problem, and 10 fully worked practice problems ranging from basic calculations to advanced exam-level questions including X-linked traits, multiple alleles, and equilibrium testing. Each practice problem includes complete algebraic steps, boxed final answers, and real-world biological context.
What Does the Hardy-Weinberg Principle State?
The Hardy-Weinberg principle states that allele and genotype frequencies in a population will remain constant from generation to generation in the absence of evolutionary influences. This mathematical model allows us to predict the expected frequency of genotypes in a population based solely on allele frequencies.
The Hardy-Weinberg equilibrium is governed by two fundamental equations:
where p = frequency of the dominant allele and q = frequency of the recessive allele
where p² = frequency of homozygous dominant, 2pq = frequency of heterozygous, and q² = frequency of homozygous recessive
These equations describe the relationship between allele frequencies and genotype frequencies. If you know the frequency of one allele, you can calculate all genotype frequencies. If you know the frequency of one genotype (most commonly the recessive phenotype, which equals q²), you can work backward to find all other values.
For a complete mathematical derivation of these equations, detailed explanations of each variable, and an interactive solver that shows every calculation step, see our Hardy-Weinberg Calculator →
The 5 Conditions for Hardy-Weinberg Equilibrium
For a population to remain in Hardy-Weinberg equilibrium, all five of the following conditions must be met simultaneously. These conditions for Hardy-Weinberg equilibrium represent an idealized scenario that rarely (if ever) occurs in nature, which is precisely why the model is so useful — deviations from these conditions indicate that evolution is occurring.
No Mutations
Allele frequencies must not change due to new genetic variants arising. In reality, mutations occur constantly due to DNA replication errors, radiation exposure, and chemical mutagens. While individual mutation rates are low (typically 10⁻⁸ to 10⁻⁹ per base pair per generation), they are a persistent source of new alleles that can alter gene pool composition over time.
No Gene Flow (Migration)
No individuals can enter or leave the population, bringing new alleles in or removing existing alleles. Real populations experience immigration and emigration constantly. For example, pollen dispersal in plants and animal migration patterns introduce alleles from neighboring populations, violating this requirement for Hardy-Weinberg equilibrium and causing allele frequencies to shift.
Random Mating
All individuals must have an equal opportunity to mate with any other individual — no sexual selection, no inbreeding, no assortative mating. Real populations violate this condition through mate choice based on phenotypic traits, geographic proximity, behavioral compatibility, and many other factors. Non-random mating changes genotype frequencies without necessarily changing allele frequencies.
No Genetic Drift
The population must be infinitely large (or large enough that sampling error is negligible). Small populations are highly susceptible to genetic drift — random changes in allele frequencies due to chance events. The founder effect (when a small group establishes a new population) and bottleneck effect (when a population undergoes a drastic size reduction) are dramatic real-world examples of how genetic drift violates this condition for Hardy-Weinberg equilibrium in endangered species and isolated populations.
No Natural Selection
All genotypes must have equal fitness — equal survival rates and equal reproductive success. This is perhaps the most commonly violated condition in nature. Natural selection acts when different genotypes confer different survival or reproductive advantages. For example, sickle cell carriers (heterozygotes) have higher fitness in malaria-endemic regions than either homozygote, directly violating the requirement that all genotypes reproduce equally.
Critical Concept: In reality, NO population perfectly satisfies all 5 conditions for Hardy-Weinberg equilibrium. Hardy-Weinberg is a theoretical baseline used to detect when evolution IS occurring, by comparing observed genotype frequencies to expected equilibrium frequencies. When real-world data deviates significantly from Hardy-Weinberg predictions, it tells us which evolutionary mechanisms are active and how strongly they’re acting on the population.
How to Solve Hardy-Weinberg Problems — Step-by-Step Method
Every Hardy-Weinberg problem, regardless of complexity, can be solved using this universal five-step method. Master this approach and you’ll be able to tackle any Hardy-Weinberg practice problem with confidence:
- Identify what’s given — Read the problem carefully and determine what information you have. Is it the number of individuals with a recessive phenotype? The frequency of heterozygotes? The actual allele frequency? Write down the given value and identify which variable it represents.
- Determine the variable type — Is the given value q² (homozygous recessive frequency), p² (homozygous dominant), 2pq (heterozygote frequency), q (recessive allele frequency), p (dominant allele frequency), or raw count data that needs to be converted to frequencies? This determines your starting point.
- Solve for q or p first — Most problems give you q² (the recessive phenotype frequency, which is directly observable). Take the square root to find q, then subtract from 1 to find p. If you’re given 2pq (heterozygote frequency), you’ll need to solve a quadratic equation: 2pq = 2p(1-p), which gives you p² – p + (heterozygote freq)/2 = 0.
- Calculate all other values — Once you have p and q, calculate p², 2pq, and q² systematically. Show your work for each calculation. If the problem asks for the number of individuals (not just frequency), multiply each genotype frequency by the total population size.
- Sanity-check your answer — Verify that p + q = 1 (within rounding error) and that p² + 2pq + q² = 1. All frequencies must be between 0 and 1. If you get values outside this range or negative numbers, check your algebra. This final verification step catches the majority of calculation errors.
Check your work instantly and see complete step-by-step solutions with our Hardy-Weinberg Calculator →
Hardy-Weinberg Practice Problems — 10 Worked Examples
The following Hardy-Weinberg practice problems progress from basic calculations to advanced exam-level questions. Each practice problem is fully worked with step-by-step algebraic solutions, boxed final answers, and biological context explaining why the problem matters in real-world genetics and evolution.
Problem 1: Basic Hardy-Weinberg Calculation (Given q²)
- The frequency of the recessive allele (q)
- The frequency of the dominant allele (p)
- The expected number of heterozygous carriers in the population
= 0.0392 × 10,000 = 392 individuals
p² + 2pq + q² = 0.9604 + 0.0392 + 0.0004 = 1.00 ✓
Problem 2: Given Allele Frequency (p), Find All Genotype Frequencies
- Homozygous dominant (RR)
- Heterozygous (Rr)
- Homozygous recessive (rr)
q = 0.3 (frequency of r allele)
Problem 3: Given Heterozygote Frequency (2pq) — Quadratic Solution
We know: q = 1 – p
Therefore: 2p(1-p) = 0.48
-2p² + 2p – 0.48 = 0
Divide by -2: p² – p + 0.24 = 0
p = [1 ± √(1 – 0.96)] / 2
p = [1 ± √0.04] / 2
p = [1 ± 0.2] / 2
p = 0.6 or p = 0.4
If p = 0.4, then q = 1 – 0.4 = 0.6
(Both solutions are mathematically valid — they represent the same population with alleles labeled differently)
2pq = 2(0.6)(0.4) = 0.48 (matches given) ✓
q² = (0.4)² = 0.16
Problem 4: Testing Hardy-Weinberg Equilibrium with Observed Data
- AA: 490 individuals
- Aa: 420 individuals
- aa: 90 individuals
Observed Aa frequency = 420/1000 = 0.42
Observed aa frequency = 90/1000 = 0.09
p = 0.49 + ½(0.42) = 0.49 + 0.21 = 0.70
q (frequency of a) = aa + ½Aa
q = 0.09 + ½(0.42) = 0.09 + 0.21 = 0.30
Verify: p + q = 0.70 + 0.30 = 1.00 ✓
Expected 2pq = 2(0.70)(0.30) = 0.42
Expected q² = (0.30)² = 0.09
———|———-|———-|——-
AA | 0.49 | 0.49 | ✓ Yes
Aa | 0.42 | 0.42 | ✓ Yes
aa | 0.09 | 0.09 | ✓ Yes
Expected Aa = 0.42 × 1000 = 420 individuals
Expected aa = 0.09 × 1000 = 90 individuals
Problem 5: Multiple Alleles (Three-Allele System)
- p (frequency of IA) = 0.30
- q (frequency of IB) = 0.20
- r (frequency of i) = 0.50
(p + q + r)² = p² + q² + r² + 2pq + 2pr + 2qr = 1
Where:
p² = IAIA (blood type A)
q² = IBIB (blood type B)
r² = ii (blood type O) ← this is what we need
2pq = IAIB (blood type AB)
2pr = IAi (blood type A)
2qr = IBi (blood type B)
= (0.50)²
= 0.25
Type B = q² + 2qr = (0.20)² + 2(0.20)(0.50) = 0.04 + 0.20 = 0.24
Type AB = 2pq = 2(0.30)(0.20) = 0.12
Type O = r² = 0.25
Verify: 0.39 + 0.24 + 0.12 + 0.25 = 1.00 ✓
Problem 6: X-Linked Recessive Trait — Critical Exam Question
- What is the frequency of the color blindness allele (q)?
- What percentage of females are expected to be color blind?
- What percentage of females are carriers?
MALES (XY): Only one X chromosome
• Affected male frequency = q (NOT q²)
• Males express whatever allele they inherit
FEMALES (XX): Two X chromosomes
• Affected female frequency = q²
• Carrier female frequency = 2pq
• Standard Hardy-Weinberg applies
For X-linked traits in males: frequency = q
Therefore: q = 0.08
(NOT q² = 0.08 — this is the most common mistake!)
= (0.08)²
= 0.0064
= 0.64% of females
= 2(0.92)(0.08)
= 0.1472
= 14.72% of females
Affected females: 0.64%
Ratio: Males are affected 12.5× more often than females
(This is why X-linked recessive disorders predominantly affect males)
Problem 7: Population Size Projection with Hardy-Weinberg
- The number of rabbits with each genotype
- The number of rabbits with each phenotype
2pq (Bb) = 2(0.6)(0.4) = 0.48
q² (bb) = (0.4)² = 0.16
Verify: 0.36 + 0.48 + 0.16 = 1.00 ✓
Bb rabbits = 0.48 × 5,000 = 2,400
bb rabbits = 0.16 × 5,000 = 800
Total: 1,800 + 2,400 + 800 = 5,000 ✓
= 1,800 + 2,400 = 4,200
White rabbits = bb
= 800
White frequency = 800 / 5,000 = 0.16 = 16%
Note: White frequency = q² (homozygous recessive)
This is why we can work backwards from phenotype to allele frequency!
Problem 8: Reverse Problem — Given Dominant Phenotype, Find q
- What is the frequency of the recessive allele (q)?
- What percentage of round-seeded plants are heterozygous?
q² = 0.09
2pq (Rr) = 2(0.7)(0.3) = 0.42
q² (rr) = 0.09 (matches given) ✓
Fraction that are heterozygous = Rr / (RR + Rr)
= 0.42 / 0.91
= 0.4615
= 46.15%
Problem 9: Trick Question — Identifying Violated Conditions
Current population: 50 birds (small)
Founding population: 5 birds (extremely small)
This is a classic founder effect — when a small group establishes a new population, the founding individuals carry only a fraction of the genetic diversity from the source population. Random sampling means allele frequencies in founders differ from mainland by chance alone.
With only 50 individuals, genetic drift continues to cause random fluctuations in allele frequencies each generation.
The problem states the island was founded by migrants from the mainland. If migration continues (birds traveling between mainland and island), gene flow would introduce mainland alleles into the island population, altering allele frequencies.
However, if the island is isolated and no further migration has occurred, this condition might be met.
In small populations, individuals may be related (inbreeding). Non-random mating changes genotype frequencies without changing allele frequencies — this could explain why genotypes don’t match Hardy-Weinberg even if allele frequencies stabilized.
• Inbreeding (increases homozygosity)
• Continued genetic drift in small population
• Natural selection favoring certain genotypes
• Population hasn’t reached equilibrium yet
Problem 10: Comprehensive Multi-Part Problem (Exam-Level)
- 100 individuals have sickle cell disease (HbSHbS)
- 1,800 individuals are carriers (HbAHbS)
- 8,100 individuals are normal (HbAHbA)
Part B: Calculate the expected genotype frequencies if the population were in Hardy-Weinberg equilibrium.
Part C: Compare observed vs. expected frequencies. Is this population in Hardy-Weinberg equilibrium?
Part D: If not in equilibrium, which condition is likely violated and why? (Hint: Consider that carriers have increased resistance to malaria.)
Observed HbAHbS = 1,800 / 10,000 = 0.18
Observed HbSHbS = 100 / 10,000 = 0.01
Verify: 0.81 + 0.18 + 0.01 = 1.00 ✓
p = (HbAHbA) + ½(HbAHbS)
p = 0.81 + ½(0.18)
p = 0.81 + 0.09 = 0.90
q (HbS) = frequency of HbS allele
q = (HbSHbS) + ½(HbAHbS)
q = 0.01 + ½(0.18)
q = 0.01 + 0.09 = 0.10
Verify: p + q = 0.90 + 0.10 = 1.00 ✓
Expected 2pq = 2(0.90)(0.10) = 0.18
Expected q² = (0.10)² = 0.01
Verify: 0.81 + 0.18 + 0.01 = 1.00 ✓
—————-|———-|———-|——–
HbAHbA | 0.81 | 0.81 | ✓ Yes
HbAHbS | 0.18 | 0.18 | ✓ Yes
HbSHbS | 0.01 | 0.01 | ✓ Yes
Conclusion: This population IS in Hardy-Weinberg equilibrium!
(Genotype frequencies exactly match predictions)
The population IS in Hardy-Weinberg equilibrium despite strong selection pressures:
• HbSHbS individuals have sickle cell disease (reduced fitness)
• HbAHbS individuals have malaria resistance (increased fitness)
• HbAHbA individuals are susceptible to malaria (reduced fitness)
This is balanced polymorphism — the heterozygote advantage creates a stable equilibrium where both alleles persist. The population has REACHED an equilibrium state, but it’s not a Hardy-Weinberg equilibrium in the strict sense because natural selection IS occurring (violates Condition 5).
However, the genotype frequencies happen to match Hardy-Weinberg predictions at this particular allele frequency. This demonstrates that matching Hardy-Weinberg ratios doesn’t always mean all 5 conditions are met — it can also indicate a population at a stable evolutionary equilibrium.
Common Mistakes on Hardy-Weinberg Problems
Hardy-Weinberg practice problems have several recurring traps that cause students to lose points on exams. Avoid these five common mistakes:
The most frequent error: seeing “1% of the population has the recessive trait” and writing q = 0.01, when the correct interpretation is q² = 0.01, so q = √0.01 = 0.1. Remember: the PHENOTYPE frequency of the recessive trait equals q² (the genotype frequency), not q (the allele frequency). Always ask yourself: “Am I looking at individuals (genotypes) or alleles?”
For X-linked recessive traits, affected males have frequency q (because they only have one X chromosome), while affected females have frequency q². If 4% of males are color blind, then q = 0.04, NOT q² = 0.04. This is the most commonly tested Hardy-Weinberg distinction on AP Biology exams and the easiest way to lose points if you don’t recognize X-linkage in the problem statement.
When given the heterozygote frequency, you must solve 2p(1-p) = 2pq, which expands to 2p – 2p² = given value. Students often make sign errors when rearranging to standard form (ap² + bp + c = 0) or forget to divide the discriminant properly. Always double-check by substituting your answer back into 2pq to verify it matches the given heterozygote frequency.
p and q are just labels for the two allele frequencies — the choice of which is p and which is q is arbitrary. Some problems use p for the recessive allele. Always read the problem statement carefully to see which allele each variable represents. The mathematical relationships (p+q=1, p²+2pq+q²=1) remain the same regardless of which allele you call p.
Problem says “32% of individuals are heterozygous” — is that 2pq = 0.32 (genotype frequency) or are they telling you an allele frequency? Context matters. If it says “individuals” or “plants” or “people,” it’s a genotype frequency. If it says “alleles in the gene pool” or “frequency of the A allele,” it’s an allele frequency. Misidentifying which type of frequency you’re given derails the entire calculation.
Frequently Asked Questions
What are the 5 conditions for Hardy-Weinberg equilibrium?
The 5 conditions for Hardy-Weinberg equilibrium are: (1) No mutations — allele frequencies aren’t changing due to new genetic variants, (2) No gene flow or migration — no individuals entering or leaving the population, (3) Random mating — no sexual selection or assortative mating, (4) No genetic drift — the population is infinitely large (or large enough that random sampling effects are negligible), and (5) No natural selection — all genotypes have equal survival and reproductive success. All five conditions must be met simultaneously for a population to remain in Hardy-Weinberg equilibrium. In reality, no natural population perfectly satisfies all five requirements, which is why Hardy-Weinberg serves as a theoretical baseline for detecting evolution.
What does it mean if a population violates Hardy-Weinberg equilibrium?
If a population violates Hardy-Weinberg equilibrium, it means evolution is occurring. When observed genotype frequencies deviate significantly from Hardy-Weinberg predictions, it indicates that one or more of the five conditions is not being met, and allele frequencies are changing over time. By identifying which conditions are violated, scientists can determine which evolutionary mechanisms are acting on the population — for example, an excess of homozygotes suggests inbreeding (non-random mating), while changing allele frequencies between generations indicate selection, migration, mutation, or drift.
How is Hardy-Weinberg used to detect evolution?
Hardy-Weinberg is used as a null hypothesis in population genetics. Scientists calculate the expected genotype frequencies assuming the population is in equilibrium (using p² + 2pq + q² = 1), then compare these predictions to observed frequencies in real populations using statistical tests like chi-square analysis. Significant deviations from expected frequencies indicate evolutionary forces are active. For example, if heterozygotes are more common than predicted, it might indicate heterozygote advantage (natural selection favoring Aa over AA or aa). This comparison method allows researchers to quantify the strength and direction of evolution in natural populations.
What is the difference between allele frequency and genotype frequency?
Allele frequency (represented by p and q) measures how common each variant of a gene is in the entire gene pool of a population. For example, if p = 0.7, then 70% of all copies of that gene in the population are the p allele. Genotype frequency (represented by p², 2pq, and q²) measures how common each combination of two alleles is in actual individuals. For example, q² = 0.09 means 9% of individuals are homozygous recessive (qq). The key difference: allele frequencies describe the gene pool, genotype frequencies describe individuals. Hardy-Weinberg connects these two levels: if you know allele frequencies (p and q), you can predict genotype frequencies (p², 2pq, q²).
Can a real population ever be in true Hardy-Weinberg equilibrium?
No, no real population perfectly satisfies all 5 conditions for Hardy-Weinberg equilibrium. Mutations occur constantly, populations experience gene flow through migration, mate choice is rarely completely random, all populations are finite (genetic drift always operates to some degree), and natural selection acts on virtually all traits. However, large populations with minimal evolutionary pressures can approximate Hardy-Weinberg closely enough that the model provides useful predictions. The value of Hardy-Weinberg isn’t in finding populations that perfectly match it, but in using deviations from equilibrium to detect and measure evolutionary change. It’s a baseline, not a description of reality.