← Back to course

Hardy–Weinberg Problem-Solving

You’ll be able to

Two ways in — know which one the problem hands you

Every Hardy–Weinberg problem is really an algebra problem in disguise, and the first move is deciding what data you were given. If you are told the fraction with the recessive phenotype, that fraction is q² (a genotype frequency): take its square root to get q, then p = 1 − q. If you are given the actual genotype counts (how many AA, Aa, and aa), you do not need the square-root shortcut at all — you can count alleles directly. Spotting which case you are in, before you touch a formula, prevents the classic mistake of square-rooting a number that was never q².

The gene-counting method

When genotype numbers are known, count alleles instead of assuming equilibrium. Each individual carries two alleles, so a population of N individuals has 2N alleles total. Every AA contributes two A alleles, every Aa contributes one A and one a, and every aa contributes two a alleles. So the frequency of A is p = (2 × number of AA + number of Aa) ÷ (2N), and q = 1 − p. This method makes no assumptions about equilibrium — it just tallies what is actually present — which is exactly why it lets you test whether a population is at equilibrium: compute p and q by counting, then compare the observed genotype frequencies against the p², 2pq, q² that equilibrium would predict.

Allele frequencies
p + q = 1
p is the frequency of the dominant allele, q the frequency of the recessive allele. By gene-counting, p = (2·AA + Aa) ÷ (2N).
Genotype frequencies
p² + 2pq + q² = 1
p² = homozygous dominant, 2pq = heterozygous, q² = homozygous recessive. Only a population at equilibrium is expected to match these three values.
Worked example

A recessive metabolic disorder affects 400 individuals in a large, randomly mating town of 10,000 people. Assuming Hardy–Weinberg equilibrium, find p and q, the number of people of each genotype, the carrier frequency, and the expected allele frequencies in the next generation.

  1. 1.Affected individuals are homozygous recessive, so their frequency equals q². q² = 400 ÷ 10,000 = 0.04.
  2. 2.Square-root to find the recessive allele frequency: q = √0.04 = 0.2.
  3. 3.Use p + q = 1: p = 1 − 0.2 = 0.8.
  4. 4.Homozygous dominant: p² = (0.8)² = 0.64, so 0.64 × 10,000 = 6,400 people.
  5. 5.Heterozygous carriers: 2pq = 2 × 0.8 × 0.2 = 0.32, so 0.32 × 10,000 = 3,200 people.
  6. 6.Homozygous recessive: q² = 0.04, so 0.04 × 10,000 = 400 people (matches the count given).
  7. 7.Check the counts sum to the total: 6,400 + 3,200 + 400 = 10,000. ✓
  8. 8.Next generation: because all five equilibrium conditions are assumed to hold, allele frequencies do NOT change — p stays 0.8 and q stays 0.2, so the genotype frequencies also stay 0.64 / 0.32 / 0.04.
Answer: p = 0.8 and q = 0.2. The town holds 6,400 homozygous dominant, 3,200 heterozygous carriers (32%), and 400 homozygous recessive. At equilibrium, the next generation is predicted to have the same allele frequencies (p = 0.8, q = 0.2).

The X-linked twist: males give you q directly

For a gene on the X chromosome, males are hemizygous — they carry only one X, so a single recessive allele shows up in the phenotype. That means the frequency of affected males equals q directly, with no square root. Females, having two X chromosomes, follow the usual pattern: affected females (homozygous recessive) are q², and carrier females are 2pq. This is why X-linked recessive conditions such as red–green color blindness and hemophilia are far more common in males than in females: q is much larger than q².

Worked example

Red–green color blindness is X-linked recessive. In a population, 8% of males are color-blind. Assuming Hardy–Weinberg equilibrium, find the recessive allele frequency q, the expected fraction of color-blind females, and the fraction of females who are carriers.

  1. 1.Males are hemizygous, so the frequency of affected males equals q directly: q = 0.08.
  2. 2.Then p = 1 − q = 1 − 0.08 = 0.92.
  3. 3.Affected females are homozygous recessive = q² = (0.08)² = 0.0064, i.e. about 0.64% of females.
  4. 4.Carrier females are heterozygous = 2pq = 2 × 0.92 × 0.08 = 0.1472, i.e. about 14.7% of females.
  5. 5.Sanity check: affected males (8%) far outnumber affected females (0.64%), exactly the pattern expected for an X-linked recessive trait.
Answer: q = 0.08 and p = 0.92. About 0.64% of females are color-blind (q²) while about 14.7% are carriers (2pq) — and 8% of males are affected, showing why X-linked recessive traits appear far more often in males.
Checkpoint

In a large, randomly mating population at Hardy–Weinberg equilibrium, 1% of individuals show a recessive condition. What fraction of the population are heterozygous carriers?

Checkpoint

An X-linked recessive form of color blindness affects 4% of males in a population at equilibrium. What is the frequency of the recessive allele, q?

Watch out

Watch the two most common traps. (1) The percentage showing the recessive trait is q² (a genotype frequency) for an autosomal gene — square-root it to get q — but for an X-linked gene the fraction of affected males is q itself, no square root. (2) Heterozygotes are 2pq, not pq: never drop the factor of 2.

Worked example

A biologist counts genotypes at one locus in a population of 500: 200 AA, 200 Aa, and 100 aa. Use gene-counting to find p and q, then test whether the population is in Hardy–Weinberg equilibrium.

  1. 1.Total alleles = 2 × 500 = 1000.
  2. 2.Count A alleles: each AA gives 2 and each Aa gives 1, so A = (2 × 200) + 200 = 600. Thus p = 600 ÷ 1000 = 0.6.
  3. 3.Count a alleles: each aa gives 2 and each Aa gives 1, so a = (2 × 100) + 200 = 400. Thus q = 400 ÷ 1000 = 0.4 (and p + q = 1 ✓).
  4. 4.Predict equilibrium genotype counts from p and q: p² = 0.36 → 180 AA, 2pq = 0.48 → 240 Aa, q² = 0.16 → 80 aa.
  5. 5.Compare observed to expected: observed 200 / 200 / 100 versus expected 180 / 240 / 80 — they do not match, with a clear deficit of heterozygotes.
Answer: p = 0.6 and q = 0.4, but the population is NOT in Hardy–Weinberg equilibrium: the observed genotypes (200/200/100) differ from the equilibrium prediction (180/240/80), and the heterozygote deficit points to nonrandom mating such as inbreeding.
Checkpoint

A population starts at equilibrium with q = 0.2 for a recessive allele, but the allele is now lethal: every homozygous recessive (aa) individual dies before reproducing each generation. What happens to q over the following generations?

On the exam

On the exam, state your setup explicitly before calculating: write "recessive phenotype = q²" (or "affected males = q" for X-linked), then show p = 1 − q, then p², 2pq, q². When asked whether a population is at equilibrium, compute allele frequencies by gene-counting and compare the observed genotypes to the predicted p²/2pq/q² — a mismatch is the evidence that the population is evolving.

Answer the 3 checkpoints as you read.

Sign in to save your progress