How to Calculate Allele Frequencies After Natural Selection Using Hardy-Weinberg Equilibrium with Selection Coefficients
Master population genetics with this complete walkthrough of calculating allele frequencies after natural selection. Learn how to apply Hardy-Weinberg equilibrium with selection coefficients, understand fitness values, and predict how populations evolve over time.

📹 Video Walkthrough: This Exact Problem
Watch the full solution for calculating allele frequencies after natural selection step-by-step using Hardy-Weinberg equilibrium with selection coefficients.
Table of Contents
The Problem
Calculate the new allele frequencies after one generation of selection:
In a population of butterflies, a gene controls wing color. The allele A produces dark wings (dominant), and allele a produces light wings (recessive).
The current allele frequencies are: p (frequency of A) = 0.6 and q (frequency of a) = 0.4. The population is in Hardy-Weinberg equilibrium.
Natural selection acts against the homozygous recessive genotype (aa). The selection coefficient against aa is s = 0.3, meaning 30% of aa individuals die before reproducing.
Calculate the new allele frequencies p' and q' after one generation of selection. Also calculate the mean fitness of the population.
This is one of those classic population genetics problems that shows up on every advanced biology exam. You've got Hardy-Weinberg equilibrium, natural selection, and you need to predict how the population changes. It looks straightforward, but there are a lot of places to mess up.
The trick here is understanding how selection changes the genotype frequencies, which then changes the allele frequencies. You can't just use the basic Hardy-Weinberg equation because selection is happening. If you're stuck on a similar problem, you can always generate a custom video solution on Torial.
Understanding Hardy-Weinberg Equilibrium

Hardy-Weinberg equilibrium describes a population where allele and genotype frequencies don't change from generation to generation. It assumes no selection, no mutation, no migration, random mating, and infinite population size.
p² + 2pq + q² = 1
Where p is the frequency of allele A, q is the frequency of allele a
Genotype frequencies: AA = p², Aa = 2pq, aa = q²
Important things to remember:
Key points about Hardy-Weinberg:
- p + q = 1 - The allele frequencies must sum to 1
- p² + 2pq + q² = 1 - The genotype frequencies must sum to 1
- Only works without selection - When selection acts, frequencies change
- Assumes random mating - No assortative mating or inbreeding
- Large population - No genetic drift affecting frequencies
For our problem, we start with p = 0.6 and q = 0.4, so the initial genotype frequencies are: AA = 0.36, Aa = 0.48, and aa = 0.16. But selection changes this. If you need more help visualizing population genetics, check out other biology videos in our library.
Natural Selection and Fitness
Natural selection changes genotype frequencies because some genotypes survive and reproduce better than others. We measure this with fitness values.
Fitness (w):
Fitness is the relative ability of a genotype to survive and reproduce compared to the most fit genotype.
w = 1.0 for the most fit genotype
w < 1.0 for less fit genotypes
Fitness is always relative. We set the highest fitness to 1.0 and scale everything else relative to it.

💡 Key Insight: Selection doesn't act on alleles directly—it acts on genotypes. The fitness of each genotype determines how many offspring it contributes to the next generation.
After selection, the genotype frequencies change, which then changes the allele frequencies when those individuals mate and produce the next generation.
This is where a lot of students get confused. They think selection directly changes allele frequencies, but it actually changes genotype frequencies first. The allele frequencies are a consequence of which genotypes survive and how they mate.
Selection Coefficients
The selection coefficient (s) measures how much less fit a genotype is compared to the most fit genotype.
Selection coefficient formula:
s = 1 - w
Where s is the selection coefficient and w is the relative fitness
If s = 0.3, then w = 0.7 (30% die, 70% survive)
For our problem:
Selection acts against aa with s = 0.3. This means:
w_AA = 1.0 (most fit, no selection)
w_Aa = 1.0 (heterozygote, no selection)
w_aa = 1 - s = 1 - 0.3 = 0.7 (30% die)
Only the homozygous recessive genotype has reduced fitness. Both AA and Aa have full fitness.
Notice how we set the most fit genotypes to 1.0. In this case, both AA and Aa have full fitness, so they both get w = 1.0. Only aa has reduced fitness. This is a common pattern in selection problems.
Calculating Relative Fitness

Now we calculate the fitness values for each genotype based on the selection coefficient.
Step 1: Determine fitness values
| Genotype | Initial Frequency | Fitness (w) | After Selection |
|---|---|---|---|
| AA | p² = 0.36 | 1.0 | 0.36 × 1.0 = 0.36 |
| Aa | 2pq = 0.48 | 1.0 | 0.48 × 1.0 = 0.48 |
| aa | q² = 0.16 | 0.7 | 0.16 × 0.7 = 0.112 |
After selection, the frequencies don't sum to 1.0 anymore. We need to normalize them.
⚠️ Check your work: The "After Selection" column shows the relative contribution of each genotype, but these don't sum to 1.0 because selection reduced the total population size.
We need to divide by the mean fitness to get the new genotype frequencies that sum to 1.0.
This is a critical step. After selection, the population is smaller, so the genotype frequencies need to be normalized. That's what the mean fitness does—it accounts for the overall reduction in population size due to selection.
Mean Population Fitness
The mean fitness (w̄) is the average fitness of the population, weighted by genotype frequencies. It tells us how much the population size is reduced by selection.
Mean fitness formula:
w̄ = p²w_AA + 2pqw_Aa + q²w_aa
This is the weighted average of all genotype fitnesses
Calculating mean fitness:
w̄ = (0.36)(1.0) + (0.48)(1.0) + (0.16)(0.7)
w̄ = 0.36 + 0.48 + 0.112
w̄ = 0.952
The mean fitness is less than 1.0 because selection reduced the population size by about 4.8%.
New genotype frequencies after normalization:
AA' = (0.36) / 0.952 = 0.378
Aa' = (0.48) / 0.952 = 0.504
aa' = (0.112) / 0.952 = 0.118
Check: 0.378 + 0.504 + 0.118 = 1.0 ✓
Notice how the frequency of aa decreased from 0.16 to 0.118, while AA and Aa increased slightly. This makes sense—selection is removing aa individuals, so their frequency goes down, and the other genotypes become relatively more common.
Calculating New Allele Frequencies

Now we calculate the new allele frequencies from the new genotype frequencies. After selection and normalization, the individuals mate randomly, so we can calculate allele frequencies from the genotype frequencies.
Allele frequency formulas:
p' = frequency of A = AA' + ½(Aa')
q' = frequency of a = aa' + ½(Aa')
Each heterozygote contributes half of each allele to the next generation.
Calculating p' and q':
p' = 0.378 + ½(0.504) = 0.378 + 0.252 = 0.630
q' = 0.118 + ½(0.504) = 0.118 + 0.252 = 0.370
Check: p' + q' = 0.630 + 0.370 = 1.0 ✓
Final Answer:
p' = 0.630, q' = 0.370
Mean fitness: w̄ = 0.952
After one generation of selection, the frequency of allele A increased from 0.6 to 0.630, and the frequency of allele a decreased from 0.4 to 0.370.
What this tells us:
- Selection against aa increases the frequency of A (the dominant allele)
- The frequency of a decreased, but not as much as you might expect because heterozygotes (Aa) still carry the a allele
- The mean fitness is 0.952, meaning the population size is reduced by about 4.8% each generation
- Selection will continue to change frequencies in future generations
Notice how p increased and q decreased, but the change isn't huge. That's because heterozygotes protect the recessive allele from complete elimination. Even though aa individuals have reduced fitness, the a allele can "hide" in heterozygotes. This is why recessive deleterious alleles persist in populations.
Predicting Multiple Generations
You can repeat this process to predict allele frequencies over multiple generations. Each generation, you use the new p' and q' as the starting p and q for the next generation.
General formula for allele frequency change:
p' = [p²w_AA + pqw_Aa] / w̄
q' = [q²w_aa + pqw_Aa] / w̄
This formula directly calculates the new allele frequencies without explicitly finding genotype frequencies first.
💡 Key Insight: Selection will continue to change frequencies until either the selected-against allele is eliminated (if it's completely recessive) or until an equilibrium is reached where selection is balanced by other forces.
In our case, if selection continues, the frequency of a will keep decreasing, but it will never reach zero as long as heterozygotes exist.
This is why population genetics problems often ask about multiple generations. You can see how selection gradually changes the population over time. Want to see more worked examples? Browse through hundreds of biology solutions on Torial.
Common Mistakes to Avoid
Here are the mistakes that cost students the most points. Learn them now so you don't make them on test day. If you want personalized help avoiding these errors, create a custom study video for your specific problem.
❌ Mistake #1: Forgetting to Normalize After Selection
Using the unnormalized genotype frequencies (after multiplying by fitness) to calculate allele frequencies. These don't sum to 1.0, so your allele frequencies will be wrong.
Fix: Always divide by the mean fitness (w̄) to normalize genotype frequencies before calculating allele frequencies.
❌ Mistake #2: Confusing Selection Coefficient with Fitness
Using s directly as fitness instead of calculating w = 1 - s. The selection coefficient is the reduction in fitness, not the fitness itself.
Fix: Remember: w = 1 - s. If s = 0.3, then w = 0.7, not 0.3.
❌ Mistake #3: Not Accounting for Heterozygotes in Allele Frequency
Calculating p' = AA' only, forgetting that heterozygotes also contribute the A allele. This gives you half the correct value.
Fix: Always use p' = AA' + ½(Aa'). Heterozygotes contribute half of each allele.
❌ Mistake #4: Using Initial Allele Frequencies in Mean Fitness
Calculating mean fitness using the wrong genotype frequencies. You need to use the frequencies before selection, not after.
Fix: Mean fitness uses the initial Hardy-Weinberg frequencies: w̄ = p²w_AA + 2pqw_Aa + q²w_aa.
❌ Mistake #5: Assuming Selection Directly Changes Allele Frequencies
Trying to apply selection directly to p and q without going through genotype frequencies first. Selection acts on genotypes, not alleles.
Fix: Always calculate genotype frequencies after selection first, then derive allele frequencies from those.
❌ Mistake #6: Mixing Up Which Genotype Has Reduced Fitness
Applying selection to the wrong genotype. If selection is against recessive homozygotes, only aa has reduced fitness, not AA or Aa.
Fix: Read the problem carefully. "Selection against aa" means only aa has w < 1.0.
❌ Mistake #7: Not Checking That Frequencies Sum to 1.0
Getting p' + q' ≠ 1.0 or genotype frequencies that don't sum to 1.0 and not catching the error.
Fix: Always check: p' + q' = 1.0 and AA' + Aa' + aa' = 1.0. If they don't, you made an arithmetic error.
Practice Problems with Video Solutions
Best way to get good at this? Practice. Try these similar problems and check your work with video solutions. You can also generate instant video explanations for any population genetics problem you're working on.
Practice Problem 1: Selection Against Dominant Allele
In a population, p = 0.8 and q = 0.2. Selection acts against the dominant phenotype with s = 0.4. Calculate the new allele frequencies after one generation.
Hint: This time selection is against AA and Aa (both have the dominant phenotype). Your answer should be p' ≈ 0.667, q' ≈ 0.333.
Get instant video solution on Torial →Practice Problem 2: Heterozygote Advantage
In a population with p = 0.5 and q = 0.5, heterozygotes have the highest fitness (w_Aa = 1.0), while both homozygotes have reduced fitness (w_AA = 0.8, w_aa = 0.6). Calculate the new allele frequencies.
Hint: This is heterozygote advantage (overdominance). The frequencies should move toward 0.5. p' ≈ 0.556, q' ≈ 0.444.
Get instant video solution on Torial →Practice Problem 3: Multiple Generations
Starting with p = 0.7 and q = 0.3, selection against aa with s = 0.5 continues for 3 generations. Calculate the allele frequencies after 3 generations.
Hint: Repeat the calculation 3 times, using each generation's p' and q' as the starting values for the next. After 3 generations: p' ≈ 0.785, q' ≈ 0.215.
Get instant video solution on Torial →Practice Problem 4: Finding Selection Coefficient
In a population, p = 0.6 and q = 0.4. After one generation, p' = 0.65 and q' = 0.35. If selection only acts against aa, what is the selection coefficient s?
Hint: Work backwards. Use the allele frequency change formula to solve for s. You should get s ≈ 0.5.
Get instant video solution on Torial →When to Use Hardy-Weinberg vs. Selection Models
Should you always use Hardy-Weinberg, or do you need to account for selection?
✓ Use Hardy-Weinberg When:
- No selection is acting
- Population is large and randomly mating
- No migration or mutation
- You're checking if a population is in equilibrium
- You need baseline genotype frequencies
✓ Use Selection Models When:
- Selection is explicitly mentioned
- Fitness values or selection coefficients are given
- You need to predict how frequencies change
- The problem asks about evolution over time
- Genotype survival rates differ
For this problem? Selection model is essential. We're told selection acts against aa, so we can't use basic Hardy-Weinberg. We need to account for how selection changes genotype frequencies, then calculate new allele frequencies. When you're juggling multiple concepts, it helps to have a step-by-step video walkthrough that shows exactly which model to use when.
Other Videos
Solving Genetics Problem: Dihybrid Testcross
Solving Magnetic Field with Amperes Law
Calculating Price Elasticity of Demand Example
Explaining Droplet Communication in Microchannels
Stuck on a Different Problem?
Get instant, personalized video explanations for your homework
Create Your First VideoRelated Articles

How to Calculate Recombination Frequency and Map Distance from a Dihybrid Cross
Master genetic mapping with this complete walkthrough. Learn how to identify parental and recombinant phenotypes and calculate recombination frequency.

How to Calculate the Equilibrium Constant Kc from Initial Concentrations and Equilibrium Data
Complete step-by-step guide to calculating Kc from experimental data. Learn how to set up ICE tables and solve quadratic equations.
