AP Biology · Topic 7.5 · Reading guide, about 7 min

Allele math for a population that is not evolving

The Hardy-Weinberg model: its five conditions, the equations p + q = 1 and p^2 + 2pq + q^2 = 1, carrier estimates and testing a population with chi-square.

In one minute

To show that something is changing, you need a clear picture of what no change would look like. The Hardy-Weinberg principle supplies that picture for genetics: it predicts the allele and genotype frequencies expected when a population undergoes no evolution at a given gene.

Real populations almost never meet the model's conditions, and that is the point. When measured genotype frequencies differ from the Hardy-Weinberg prediction, at least one evolutionary process is at work. The model is a null hypothesis, and the two equations let you estimate hidden quantities, such as how many people carry a recessive allele without showing it.

Key terms

Hardy-Weinberg equilibrium
The state in which allele and genotype frequencies at a gene stay constant from generation to generation.
p and q
The frequencies of the two alleles of a gene, usually p for the dominant allele and q for the recessive one.
p^2, 2pq, q^2
The expected frequencies of homozygous dominant, heterozygous and homozygous recessive individuals under equilibrium.
Carrier
A heterozygous individual who carries one copy of a recessive allele but does not show the recessive phenotype.
Null hypothesis
The starting assumption of no effect or no change, here that Hardy-Weinberg equilibrium holds for the population.
Chi-square test
A statistical test comparing observed counts with expected counts: the sum of (observed - expected)^2 / expected across all classes.
Degrees of freedom
In this course, the number of classes minus 1, used with the chi-square table to find the critical value.
Critical value
The chi-square value that must be exceeded to reject the null hypothesis, usually at a probability of 0.05.

Five conditions for no evolution

Each condition switches off one process that changes allele frequencies. If all five hold, frequencies stay fixed indefinitely. In nature none is perfectly met, but some populations come close enough for a gene that the model gives useful estimates.

Learn the conditions by pairing each with the process it rules out, as in the table. Then, when a scenario describes a violation, such as a small island population or mates chosen by color, you can name which condition fails and what evolutionary force follows.

The Hardy-Weinberg conditions and the process each one excludes
ConditionProcess it rules outExample of a violation
Very large populationGenetic driftA rare orchid surviving as 50 plants on one cliff
No migrationGene flowPollen blown in each year from a neighboring field
No mutationNew alleles appearingA new allele arising in a germ cell and passed on
Random matingNonrandom matingSelf-fertilizing plants, or frogs choosing mates by call
No natural selectionDifferential survival or reproductionSeedlings of one genotype dying more often in drought

Where the two equations come from

Each gene copy must be either the dominant or the recessive allele, which gives p + q = 1. Now picture the whole population releasing gametes into one pool and pairing them at random. The chance that an egg and a sperm both carry the dominant allele is p x p. The chance both carry the recessive allele is q x q. A heterozygote can form in two ways, dominant egg with recessive sperm or the reverse, so its chance is 2pq. Adding the three outcomes gives p^2 + 2pq + q^2 = 1. From any starting mix of genotypes, one generation of random mating is enough to produce these proportions, as long as the allele frequencies themselves do not change.

Keep the two equations straight. The first is about alleles; the second is about genotypes, which are frequencies of individuals. Plugging an allele frequency into a slot meant for a genotype frequency is the most common error in this topic.

Starting from the recessive phenotype

Only homozygous recessive individuals show a recessive trait, so their share of the population equals q^2. That is your way in. Take the square root to get q, subtract from 1 to get p, then compute whatever genotype the question wants.

Example: in a fictional fern, 1 plant in 400 has frilled leaves, a recessive trait. So q^2 = 1/400 = 0.0025, and q = 0.05. Then p = 0.95, and carriers are 2pq = 2 x 0.95 x 0.05 = 0.095, about 9.5 percent. In 400 plants that is roughly 38 carriers for every 1 frilled plant, which shows why recessive alleles hide so effectively in heterozygotes.

If you are given the dominant phenotype instead, remember it includes two genotypes: p^2 + 2pq = 1 - q^2. Suppose 51 percent of a fictional newt population has spotted skin, the dominant trait. Unspotted newts are 49 percent, so q^2 = 0.49, q = 0.7 and p = 0.3. Homozygous spotted newts are p^2 = 0.09 and heterozygous spotted newts are 2pq = 0.42. Check: 0.09 + 0.42 = 0.51, the spotted share. Notice too that the dominant allele is the rarer one here (p = 0.3 against q = 0.7): being dominant says nothing about how common an allele is.

Is this population evolving? A chi-square test

To test a real sample, first calculate p and q from the observed genotype counts, then use them to predict how many of each genotype equilibrium would give, and compare. Hypothetical data: 500 crickets include 230 AA, 180 Aa and 90 aa. Copies of A = (2 x 230) + 180 = 640 out of 1,000, so p = 0.64 and q = 0.36.

Expected counts are p^2 x 500 = 0.4096 x 500 = 204.8 AA, 2pq x 500 = 0.4608 x 500 = 230.4 Aa, and q^2 x 500 = 0.1296 x 500 = 64.8 aa. Chi-square = (230 - 204.8)^2 / 204.8 + (180 - 230.4)^2 / 230.4 + (90 - 64.8)^2 / 64.8 = 3.10 + 11.03 + 9.80, about 23.9.

With three genotype classes, degrees of freedom = 3 - 1 = 2, and the critical value at 0.05 is 5.99. Since 23.9 is far larger, reject the null hypothesis: this population is not in equilibrium for this gene. Some statistics courses use one fewer degree of freedom here because p was estimated from the same data, but the conclusion would not change.

The pattern hints at the cause. There are too few heterozygotes and too many of both homozygotes, which is what inbreeding or mating with similar individuals produces. Selection against heterozygotes could do the same, so the data narrow the possibilities without proving one.

How it connects

  • Back to 5.3: the chi-square test used here is the same one you used to test Mendelian cross ratios.
  • Back to 7.4: each Hardy-Weinberg condition is one of drift, gene flow, mutation or selection turned off.
  • Forward to 7.11: carrier frequencies show how much variation hides in heterozygotes, ready for a changed environment.

Common mistakes

  • Treating q^2 as q. If 25 percent show a recessive trait, q^2 = 0.25 and q = 0.5, not 0.25.
  • Reading p^2 straight from the dominant phenotype. The dominant share is p^2 + 2pq; find q first.
  • Forgetting the 2 in 2pq. There are two routes to a heterozygote, which is why its frequency is twice p times q.
  • Thinking p + q = 1 proves equilibrium. It is true for any two-allele gene; equilibrium requires genotype counts to match p^2, 2pq and q^2.

How it shows up on the exam

  • A recessive phenotype percentage, asking for allele frequencies, carrier frequency or the number of individuals of a genotype.
  • A description of several populations, asking which best fits the Hardy-Weinberg conditions or which condition is violated.
  • Observed genotype counts with a chi-square calculation, asking whether to reject the null hypothesis. The exam supplies the equations and a chi-square table, but you must know what each term means.

Check yourself

  1. When 1 in 10,000 individuals shows a recessive phenotype, about what share of the population is heterozygous?
  2. A population mates at random, receives no migrants and faces no selection, but has only 30 members. Which Hardy-Weinberg condition does it fail, and what process follows?
  3. Two populations both have p = 0.7 and q = 0.3. One is 49 percent AA, 42 percent Aa and 9 percent aa; the other is 60 percent AA, 20 percent Aa and 20 percent aa. Which one could be in Hardy-Weinberg equilibrium, and why can the other not be?
  4. In a chi-square test of three genotypes, what does a value smaller than 5.99 allow you to conclude, and what does it not prove?

Worked problems

Worked example Easy

In a fictional beetle population in Hardy-Weinberg equilibrium, 4 percent of the beetles have red eyes, a recessive trait. What fraction of the beetles are expected to be heterozygous?

  1. 0.20
  2. 0.32Answer
  3. 0.64
  4. 0.80

How to solve it

  1. Red-eyed beetles are homozygous recessive, so q² = 0.04 and q = 0.2.
  2. p = 1 - 0.2 = 0.8.
  3. Heterozygotes: 2pq = 2 x 0.8 x 0.2 = 0.32. Check: 0.64 + 0.32 + 0.04 = 1.

Why each choice is right or wrong

  • A. Incorrect. 0.20 is q, the frequency of the recessive allele, not the frequency of heterozygous beetles.
  • B. Correct. q² = 0.04, so q = 0.2 and p = 0.8; 2pq = 2 x 0.8 x 0.2 = 0.32.
  • C. Incorrect. 0.64 is p² = 0.8 x 0.8, the expected frequency of homozygous dominant beetles.
  • D. Incorrect. 0.80 is p, the frequency of the dominant allele, not a genotype frequency.

Worked example Medium

In a fictional mouse population in Hardy-Weinberg equilibrium, 84 percent of the mice have dark fur, the dominant phenotype. What fraction of the mice are expected to be homozygous dominant?

  1. 0.36Answer
  2. 0.48
  3. 0.60
  4. 0.84

How to solve it

  1. The recessive light-furred mice are 1 - 0.84 = 0.16 of the population, so q² = 0.16 and q = 0.4.
  2. p = 1 - 0.4 = 0.6.
  3. Homozygous dominant: p² = 0.6 x 0.6 = 0.36. Check: 0.36 + 0.48 + 0.16 = 1, and 0.36 + 0.48 = 0.84 dark mice.

Why each choice is right or wrong

  • A. Correct. Light mice are 1 - 0.84 = 0.16 = q², so q = 0.4, p = 0.6 and p² = 0.36.
  • B. Incorrect. 0.48 is 2pq = 2 x 0.6 x 0.4, the dark mice that are heterozygous, not homozygous dominant.
  • C. Incorrect. 0.60 is p, the frequency of the dominant allele; the genotype frequency is p squared.
  • D. Incorrect. 0.84 is every dark mouse, p² + 2pq, which includes the heterozygotes as well.

Short example Hidden carriers

In a fictional population of 10,000 fish where a recessive allele has q = 0.1, only 100 fish show the recessive trait (q² = 0.01), but 1,800 fish carry the allele without showing it (2pq = 0.18).

Problems like it

Try each one before you read the explanation.

Practice this topic. AP Practice questions on exactly what this lesson covers, with an explanation for every answer.