Biology · Introductory biology · Concept
Hardy–Weinberg equilibrium: p² + 2pq + q²
Hardy–Weinberg equilibrium is the baseline model of population genetics. For one gene with two alleles at frequencies p and q, where p + q = 1, random mating gives the genotypes AA, Aa and aa in the proportions p², 2pq and q², and those proportions stay the same every generation while the Hardy–Weinberg conditions hold. A sample that departs from them shows that at least one condition fails: mating may not be random, or selection, migration, mutation or drift may be at work.
Two alleles, two frequencies
Take one gene with two alleles, A and a. Let p be the fraction of all copies of the gene in the population that are A, and q the fraction that are a. Every copy is one or the other, so p + q = 1. These are allele frequencies: they count gene copies, not individuals.
Count gene copies to find p
A diploid individual carries two copies of the gene, so N individuals carry 2N copies. Each AA individual adds two A copies and each Aa adds one, so p is the number of A copies over all copies. Then q = 1 − p.
Random mating predicts the genotypes
If gametes combine at random, an offspring receives A from each parent with probability p, so AA has frequency p² and aa has frequency q². A heterozygote can form two ways, A from the mother and a from the father or the reverse, so Aa has frequency 2pq. The three add to 1 because (p + q)² = 1.
Equilibrium after one generation
From any starting mix of genotypes, one round of random mating produces the p², 2pq and q² proportions for an autosomal gene, and they stay there while the conditions hold. Allele frequencies do not drift toward one half on their own: a rare allele stays rare.
The five conditions
The prediction assumes random mating with respect to this gene, no mutation, no migration (gene flow), no natural selection, and a population large enough that genetic drift is negligible. No real population meets all five exactly. Hardy–Weinberg equilibrium is a null model: a clear departure from it shows that at least one condition fails, but not which one.
From a recessive trait to carriers
With complete dominance only aa individuals show the recessive phenotype, so their frequency estimates q². Its square root is q, and 2pq estimates the frequency of carriers. This route assumes the population is in equilibrium, so it cannot also test equilibrium.
Testing a sample with chi-square
When all three genotypes can be counted, compare the observed counts with the expected counts Np², N·2pq and Nq² using a chi-square goodness-of-fit test. Three genotype classes give 3 − 1 = 2 degrees of freedom, and estimating p from the same counts uses up one more, which leaves 1.
Common mistakes
- Taking the frequency of aa individuals as q: it estimates q², so q is its square root.
- Counting individuals instead of gene copies when finding p: each heterozygote carries one copy of each allele.
- Using 2 degrees of freedom in a three-genotype test when p comes from the same counts: the answer is 1.
- Reading a good fit as proof that every condition holds: a test can only fail to detect a departure.
Key terms
- Hardy–Weinberg equilibrium
- The baseline genetics of a population that isn’t evolving: random mating and no selection, mutation, migration or drift. With two alleles, the genotype frequencies are then p², 2pq and q².
- Allele frequency
- The share of all copies of a gene in a population that are one particular allele: p = (copies of allele A) ÷ (total allele copies). Count allele copies, two per diploid individual, not individuals.
- Genotype frequency
- The share of individuals in a population with a particular genotype, such as AA. It differs from allele frequency, because each individual carries two allele copies.
- Genetic carrier
- Someone with one copy of the allele for a recessive condition who does not have the condition, such as Aa. A carrier can pass the allele to their children.
- Genetic drift
- Random changes in allele frequencies from one generation to the next, just by chance in which individuals reproduce. Its effect is strongest in small populations.
- Gene flow
- Movement of alleles between populations when individuals or their gametes migrate. It changes allele frequencies whether or not selection favors those alleles, and it makes populations more alike.
- Natural selection
- Individuals with heritable traits that suit their environment tend to survive and reproduce more, so those traits become more common. Which traits help depends on the environment; evolution has no goal.
- Chi-square goodness-of-fit test
- A test of whether observed counts in categories match the counts a model expects, using χ² = Σ(observed − expected)²/expected. It needs expected counts that aren’t too small, usually at least 5 each.
Work through an example
A DNA test of 200 fish at one gene finds 90 AA, 80 Aa and 30 aa. Find the allele frequencies p and q, and the genotype counts Hardy–Weinberg equilibrium predicts for a sample of this size.
Find allele frequencies from genotype counts →Sources and scope
Authored study material. Tool results depend on the stated inputs and model assumptions.
Try in the workspace
Open the example inputs, change a value and keep a useful result on your board.
Open the Hardy–Weinberg tool Open worked example on a board Hardy–Weinberg equation in Biology ReferenceYour existing work stays on this device. Examples open as editable copies.