How to Solve Hardy-Weinberg Problems- Genetics Equations

What Is the Hardy-Weinberg Equation and Why You Need to Master It

Hardy-Weinberg equilibrium is the foundation of population genetics. It describes what happens when a population isn't evolving—gene pool stays stable generation after generation.

Most biology students panic when they see these problems. Don't. The math is straightforward once you understand the two equations and what each variable represents.

You'll encounter Hardy-Weinberg on the AP Biology exam, in genetics courses, and if you pursue any field related to evolution or breeding. Learning this now saves you headaches later.

The Two Equations You Must Know

Equation 1: Allele Frequency

p + q = 1

This is the easy one. p represents the frequency of the dominant allele. q represents the frequency of the recessive allele. Together they account for 100% of alleles for that gene in the population.

Equation 2: Genotype Frequency

p² + 2pq + q² = 1

This one trips people up. Here's what each part means:

The 2 in 2pq accounts for the two ways heterozygotes can form: A from mom + a from dad, OR a from mom + A from dad.

When the Hardy-Weinberg Model Applies

The model only works when these conditions are met. If any are violated, your calculations will be wrong.

Real populations rarely meet all five conditions. The equation still works as a baseline—it's the math of what would happen if evolution wasn't occurring.

How to Solve Hardy-Weinberg Problems: Step by Step

Step 1: Identify What Information You're Given

Read the problem carefully. You're usually given one of these:

Step 2: Determine What You Need to Find

Common questions ask for:

Step 3: Apply the Right Equation

If given phenotype data and the trait is recessive:

Count the individuals showing the recessive phenotype. That's your value. Take the square root to find q. Subtract from 1 to find p.

If given heterozygote frequency (2pq):

Divide by 2 to get pq, then solve for p and q using the quadratic formula or substitution.

Worked Example: Finding Allele Frequencies from Phenotype Data

Problem: In a population of 1,000 moths, 160 show the recessive white phenotype. Calculate p and q.

Solution:

Step 1: Calculate q²

q² = 160/1000 = 0.16

Step 2: Find q

q = √0.16 = 0.4

Step 3: Find p

p = 1 - q = 1 - 0.4 = 0.6

Answer: p = 0.6, q = 0.4

That's it. No complicated math. Just square roots and subtraction.

Worked Example: Calculating Expected Genotype Numbers

Problem: Using the moth population above (p = 0.6, q = 0.4), how many individuals would you expect of each genotype?

Solution:

Calculate expected frequencies first:

Multiply by total population:

Notice the observed recessive phenotype count (160) matches our expected q² count. This confirms our math.

Worked Example: Finding Carrier Frequency

Problem: Cystic fibrosis occurs in 1 out of 2,500 births. What is the carrier frequency in this population?

Solution:

q² = 1/2500 = 0.0004

q = √0.0004 = 0.02

p = 1 - 0.02 = 0.98

Carrier frequency = 2pq = 2(0.98)(0.02) = 0.0392 ≈ 3.92%

About 4% of the population carries one copy of the allele without showing symptoms.

Common Mistakes to Avoid

Mistake What to Do Instead
Confusing p² with 2p Remember: genotype frequencies use squared terms
Using phenotype counts as allele frequencies Recessive phenotypes = q², not q
Forgetting to square root q² q² gives genotype frequency; take square root for allele frequency
Assuming dominant trait shows homozygous frequency Dominant phenotype includes both AA and Aa individuals
Rounding too aggressively Keep more decimals during calculations, round only final answers

Quick Reference: Problem Types and Solutions

Given Information Find Method
q² (recessive phenotype frequency) p, q, genotype counts q = √q², p = 1 - q, then calculate p², 2pq, q²
2pq (heterozygote frequency) p, q Use p + q = 1, solve system of equations
Allele frequencies p, q Genotype frequencies Calculate p², 2pq, q² directly
Total population + genotype counts Allele frequencies Count alleles, divide by 2N

Practice Problems

Problem 1: In a class of 200 students, 72 have attached earlobes (recessive) and 128 have free earlobes. What is the frequency of the attached earlobe allele?

Answer: q² = 72/200 = 0.36, q = 0.6, p = 0.4

Problem 2: If p = 0.7, what percentage of the population is homozygous dominant?

Answer: p² = 0.49 = 49%

Problem 3: PKU affects 1 in 10,000 newborns. What percentage of the population are carriers?

Answer: q = 0.01, carrier frequency = 2(0.99)(0.01) ≈ 2%

The Bottom Line

Hardy-Weinberg problems follow patterns. Once you recognize whether you're starting from phenotype data, genotype data, or allele frequencies, you know exactly which equation to use and in what order.

Practice the three core operations: taking square roots, squaring values, and solving p + q = 1. That's 90% of the math involved.

Don't overthink the biology. The equations are just math tools. Read carefully, plug in the right numbers, and check that your answers make sense.