Hardy-Weinberg Practice Problems with Answers: A full breakdown
The Hardy-Weinberg principle is a foundational concept in population genetics that explains how allele and genotype frequencies remain constant in a population under specific conditions. This principle, developed independently by British mathematician G.H. Hardy and German physician Wilhelm Weinberg in the early 20th century, provides a mathematical framework to study genetic variation. It is widely used in evolutionary biology, conservation genetics, and medical research to predict genetic diversity and identify factors driving evolutionary change. In this article, we will explore Hardy-Weinberg practice problems with answers, breaking down the theory, its applications, and common pitfalls.
Understanding the Hardy-Weinberg Principle
The Hardy-Weinberg principle states that in a large, randomly mating population with no mutation, migration, natural selection, or genetic drift, the allele and genotype frequencies will remain constant from one generation to the next. This equilibrium is known as Hardy-Weinberg equilibrium (HWE). The principle is based on two key equations:
Quick note before moving on But it adds up..
- Allele frequency equation: $ p + q = 1 $, where $ p $ is the frequency of the dominant allele and $ q $ is the frequency of the recessive allele.
- Genotype frequency equation: $ p^2 + 2pq + q^2 = 1 $, where $ p^2 $ represents the frequency of homozygous dominant individuals, $ 2pq $ represents the frequency of heterozygous individuals, and $ q^2 $ represents the frequency of homozygous recessive individuals.
These equations assume that:
- The population is large (to minimize genetic drift).
Still, - No migration (no gene flow between populations). Day to day, - No mutations occur. - Mating is random (no preference for specific genotypes). - No natural selection (all genotypes have equal survival and reproductive success).
When these conditions are met, the genetic structure of the population remains stable over time. Deviations from HWE can indicate evolutionary forces at work, such as selection, mutation, or genetic drift Surprisingly effective..
Detailed Explanation of the Hardy-Weinberg Equations
To apply the Hardy-Weinberg principle, You really need to understand how allele and genotype frequencies are calculated. Let’s break down the equations:
1. Allele Frequencies
The frequency of an allele (e.g., $ p $ or $ q $) is calculated by dividing the number of copies of that allele by the total number of alleles in the population. Here's one way to look at it: in a population of 100 individuals (200 alleles), if 30 alleles are of type $ A $ and 170 are of type $ a $, the frequencies would be:
- $ p = \frac{30}{200} = 0.15 $
- $ q = \frac{170}{200} = 0.85 $
2. Genotype Frequencies
Using the allele frequencies, genotype frequencies can be calculated:
- Homozygous dominant ($ AA $): $ p^2 $
- Heterozygous ($ Aa $): $ 2pq $
- Homozygous recessive ($ aa $): $ q^2 $
To give you an idea, if $ p = 0.That said, 6 $ and $ q = 0. Still, 4 $:
- $ p^2 = 0. Plus, 6^2 = 0. 36 $ (36% of the population is $ AA $)
- $ 2pq = 2 \times 0.Still, 6 \times 0. Which means 4 = 0. Here's the thing — 48 $ (48% of the population is $ Aa $)
- $ q^2 = 0. 4^2 = 0.
These frequencies must sum to 1, confirming the validity of the equations.
Step-by-Step Guide to Solving Hardy-Weinberg Practice Problems
Solving Hardy-Weinberg problems involves a systematic approach. Here’s a step-by-step guide:
Step 1: Identify the alleles and their frequencies
Determ
Step 1: Identify the alleles and their frequencies
Begin by deciding which allele you will treat as the “dominant” (often the one you have data for). In most textbook problems you are given either:
- The phenotype frequencies (e.g., 9 % of individuals display the recessive trait).
- The genotype frequencies for one or more classes (e.g., 25 % are homozygous dominant).
From this information you can calculate either p or q directly, then use the relationship (p+q=1) to obtain the other allele frequency.
Tip: If you are given the proportion of recessive phenotypes, that proportion equals (q^{2}). Take the square root to obtain q, then compute p = 1 – q Still holds up..
Step 2: Compute the expected genotype frequencies
Plug the allele frequencies into the genotype frequency equation:
[ \begin{aligned} \text{Expected }AA &= p^{2} \ \text{Expected }Aa &= 2pq \ \text{Expected }aa &= q^{2} \end{aligned} ]
These are the expected proportions if the population is in Hardy‑Weinberg equilibrium That alone is useful..
Step 3: Convert expected proportions to expected counts (optional)
If you are working with a finite sample (e.g., 200 individuals), multiply each expected proportion by the total sample size to obtain the expected counts. This step is useful when you later perform a chi‑square goodness‑of‑fit test Practical, not theoretical..
[ \text{Expected count}{AA}=p^{2}\times N,\qquad \text{Expected count}{Aa}=2pq\times N,\qquad \text{Expected count}_{aa}=q^{2}\times N ]
Step 4: Compare observed and expected values
Create a table that juxtaposes the observed data with the expected values:
| Genotype | Observed (O) | Expected (E) | (O-E) | ((O-E)^{2}/E) |
|---|---|---|---|---|
| AA | … | … | … | … |
| Aa | … | … | … | … |
| aa | … | … | … | … |
| Total | N | N | — | χ² |
If you are only interested in checking whether the population could be in equilibrium, a visual inspection (e.g., “the observed heterozygote frequency is much lower than 2pq”) may be sufficient. For a formal test, proceed to Step 5.
Step 5: Perform a chi‑square goodness‑of‑fit test (optional but common)
The chi‑square statistic is calculated as shown in the table above:
[ \chi^{2}= \sum \frac{(O-E)^{2}}{E} ]
Degrees of freedom (df) for a Hardy‑Weinberg test are 1 (three genotype classes minus one allele frequency parameter).
Compare the calculated χ² value to the critical value from a χ² distribution table (α = 0.05, df = 1 → critical value ≈ 3.84).
- If χ² ≤ 3.84 → fail to reject the null hypothesis; the population does not deviate significantly from HWE.
- If χ² > 3.84 → reject the null hypothesis; some evolutionary force is likely acting.
Caution: The chi‑square test assumes that each expected count is ≥ 5. In practice, if any expected count falls below this threshold, use an exact test (e. g., Fisher’s exact test) or combine genotype classes where biologically appropriate.
Common Pitfalls and How to Avoid Them
| Pitfall | Why It Happens | How to Fix It |
|---|---|---|
| Treating phenotypic counts as genotype counts | Recessive phenotypes equal (q^{2}), but dominant phenotypes combine (p^{2}) and (2pq). In practice, | Separate the dominant phenotype into its two genotype components using the allele frequencies you calculate. In practice, |
| Forgetting that (p+q=1) | Working with only one allele frequency and neglecting the complementary frequency. Practically speaking, | Always write down (q = 1-p) (or vice‑versa) before plugging numbers into the genotype equations. Day to day, |
| Using small sample sizes | Random sampling error inflates apparent deviations. On top of that, | Ensure the sample size is ≥ 30 individuals for each genotype class, or apply an exact test. On top of that, |
| Misapplying the chi‑square test when expected counts < 5 | The χ² approximation breaks down with low expected frequencies. | Switch to an exact test or use a Monte‑Carlo simulation to obtain a p‑value. |
| Assuming equilibrium without testing | Populations often look “close enough” but are subtly shifting. | Always run the χ² (or exact) test unless you have independent evidence that all HWE assumptions hold. |
Worked Example
Problem: In a population of 500 pea plants, 180 display the purple flower phenotype (dominant) and 320 display the white flower phenotype (recessive). The purple allele (P) is dominant over the white allele (p). Determine whether the population is in Hardy‑Weinberg equilibrium Simple as that..
Solution
-
Identify the recessive phenotype frequency
The white phenotype corresponds to genotype pp, so[ \frac{320}{500}=0.64 = q^{2} ]
-
Calculate (q) and (p)
[ q = \sqrt{0.64}=0.80,\qquad p = 1 - q = 0.
-
Compute expected genotype frequencies
[ \begin{aligned} p^{2} &= 0.So 20^{2}=0. 04 \quad (\text{PP})\ 2pq &= 2(0.20)(0.80)=0.32 \quad (\text{Pp})\ q^{2} &= 0.80^{2}=0 Which is the point..
-
Convert to expected counts
[ \begin{aligned} E_{PP} &= 0.04\times500 = 20\ E_{Pp} &= 0.32\times500 = 160\ E_{pp} &= 0.
-
Observed counts (we only know phenotypes, so we must infer the heterozygote count)
*All 320 white plants are pp (observed = 320).
*The 180 purple plants consist of PP + Pp.
Since we do not know the split, we first estimate it using the expected proportions:[ \text{Expected purple} = E_{PP}+E_{Pp}=20+160=180 ]
The observed purple count (180) exactly matches the expected total, so we can proceed with the chi‑square using the three genotype classes we have derived Worth knowing..
-
Chi‑square calculation
[ \chi^{2}= \frac{(20-20)^{2}}{20}+ \frac{(160-160)^{2}}{160}+ \frac{(320-320)^{2}}{320}=0 ]
With df = 1, χ² = 0 < 3.84 → Fail to reject HWE. The population appears to be in equilibrium.
Interpretation: The observed numbers perfectly match the expectations under Hardy‑Weinberg, suggesting that none of the five classic forces (selection, mutation, migration, drift, non‑random mating) are currently perturbing this locus in the studied pea population Worth keeping that in mind..
When Deviations Are Meaningful
Even a modest χ² that exceeds the critical value can be biologically informative. Below are three classic scenarios and what they typically imply:
| Deviation Pattern | Likely Evolutionary Force | Example |
|---|---|---|
| Deficit of heterozygotes (observed (2pq) < expected) | Inbreeding or population substructure (Wahlund effect) | Small isolated villages showing fewer Aa individuals than predicted. |
| Shift in allele frequencies (e.g. | ||
| Excess of heterozygotes | Heterozygote advantage (overdominance) or negative assortative mating | Sickle‑cell trait (AS) conferring malaria resistance. , (p) markedly different from historic values) |
When a deviation is detected, the next step is to gather ecological or demographic data that can pinpoint the underlying cause The details matter here..
Extending the Hardy‑Weinberg Framework
While the classic single‑locus, two‑allele model is a cornerstone of population genetics, real‑world scenarios often demand more complexity:
- Multiple alleles – For blood‑type loci (IA, IB, i), the genotype frequency expansion becomes (p^{2}+q^{2}+r^{2}+2pq+2pr+2qr = 1).
- Multiple loci (linkage disequilibrium) – When alleles at different loci are non‑independent, the product of individual locus frequencies no longer predicts multilocus genotype frequencies.
- Sex‑linked genes – X‑linked loci have different genotype expectations for males (hemizygous) and females (diploid).
- Polyploidy – In organisms with more than two chromosome sets, the binomial expansion changes (e.g., for tetraploids the genotype frequencies follow a multinomial distribution).
In each case, the underlying principle remains: if the appropriate assumptions hold, allele and genotype frequencies will remain constant across generations. The mathematics simply expands to accommodate additional complexity No workaround needed..
Quick Reference Cheat‑Sheet
| Concept | Formula | Typical Use |
|---|---|---|
| Allele frequency | (p = \frac{2N_{AA}+N_{Aa}}{2N}) | Convert genotype counts to allele proportions |
| Genotype frequencies (expected) | (p^{2},;2pq,;q^{2}) | Predict distribution under HWE |
| Heterozygote excess/deficit | Compare observed (2pq) to expected | Test for inbreeding, selection |
| Chi‑square statistic | (\chi^{2}= \sum\frac{(O-E)^{2}}{E}) | Formal test of HWE |
| Degrees of freedom | (df = \text{#genotype classes} - \text{#alleles estimated}) | Usually 1 for a biallelic locus |
| Critical χ² (α = 0.05, df = 1) | 3.84 | Threshold for rejecting HWE |
Conclusion
The Hardy‑Weinberg equilibrium provides a simple yet powerful null model for genetic variation in a population. By mastering the two core equations—(p+q=1) and (p^{2}+2pq+q^{2}=1)—students and researchers can:
- Quantify allele and genotype frequencies from raw data.
- Detect whether a population is evolving, using chi‑square or exact tests.
- Interpret the biological meaning of any deviation, linking it to forces such as selection, drift, migration, mutation, or non‑random mating.
Remember that the elegance of the model rests on its assumptions. In practice, no natural population meets every condition perfectly, but the degree of deviation from Hardy‑Weinberg tells a story about the evolutionary pressures at work. By applying the step‑by‑step workflow outlined above—and by staying alert to common pitfalls—readers can confidently analyze genetic data, draw meaningful conclusions, and lay the groundwork for deeper investigations into the dynamics of evolution.