Hardy-Weinberg Principle- Population Genetics Fundamentals

What the Hardy-Weinberg Principle Actually Is

The Hardy-Weinberg principle is a mathematical model that describes what happens to allele and genotype frequencies in an ideal population. It sounds complicated, but it's really just a baseline—a way to predict what you'd see if nothing was changing the gene pool.

The model states that allele and genotype frequencies stay constant from generation to generation if five specific conditions are met. That's it. No evolution happening.

Scientists use this principle as a null hypothesis. You test whether a real population deviates from Hardy-Weinberg expectations. If it does, something is causing evolution.

The Two Equations You Need to Know

The Allele Frequency Equation

This one is stupid simple:

p + q = 1

Where p = frequency of the dominant allele and q = frequency of the recessive allele. They always add up to 1 (or 100% of the alleles).

The Genotype Frequency Equation

This is where most people get confused:

p² + 2pq + q² = 1

Here's what each part means:

Notice that p² + 2pq + q² expands from (p + q)². It's basic algebra wearing a genetics costume.

The Five Assumptions (Why They Matter)

Hardy-Weinberg only works when all five conditions are true. Break one, and the equation stops predicting reality.

1. No Mutations

New alleles don't magically appear, and existing alleles don't spontaneously change. If mutations happen, allele frequencies shift.

2. No Natural Selection

Every genotype has equal survival and reproductive success. No allele gets an advantage or disadvantage.

3. Random Mating

Individuals mate without regard to genotype. If tall people only mate with tall people, that's non-random mating and it breaks the model.

4. Infinite Population Size

This is the assumption that never holds in reality. Small populations experience genetic drift—random fluctuations in allele frequencies that have nothing to do with selection.

5. No Gene Flow

No one migrates in or out. If individuals with different allele frequencies come and go, the gene pool changes.

Real populations violate at least one of these. That's the point. Deviations tell you evolution is happening.

How to Calculate Hardy-Weinberg Frequencies

Here's the practical part. Say you're tracking a gene with two alleles, A and a. You sample 500 individuals and find:

Step 1: Calculate genotype frequencies from your counts.

Step 2: Calculate allele frequencies. The frequency of the recessive allele (q) equals the square root of the homozygous recessive frequency.

q² = 0.12

q = √0.12 = 0.346

Then find p:

p = 1 - q = 1 - 0.346 = 0.654

Step 3: Check if your population fits Hardy-Weinberg. Expected genotype frequencies should be:

Compare expected vs. observed:

Genotype Observed Expected Difference
AA (p²) 0.36 0.428 -0.068
Aa (2pq) 0.52 0.452 +0.068
aa (q²) 0.12 0.120 0

Your observed and expected values don't match. This population is probably not in Hardy-Weinberg equilibrium. Something is going on—maybe non-random mating, maybe selection, maybe drift.

Chi-Square Test: Is the Deviation Real?

Small differences between observed and expected happen by chance. You need a chi-square test to determine if the deviation is statistically significant.

Chi-square formula:

χ² = Σ((O - E)² / E)

Where O = observed count and E = expected count.

Calculate for each genotype, sum them up, and compare to a chi-square critical value with 1 degree of freedom (df = number of alleles - 1). At α = 0.05, the critical value is 3.84.

If your χ² is greater than 3.84, you reject the null hypothesis. The population is evolving.

What Hardy-Weinberg Tells You About Evolution

Here's the brutal truth: Hardy-Weinberg is a detection tool, not an explanation. It tells you evolution is happening. It doesn't tell you why.

Significant deviation from H-W equilibrium means at least one of the five assumptions is violated. Your job as a researcher is to figure out which one(s).

Common causes of deviation:

Hardy-Weinberg in Modern Genetics

You won't calculate these equations by hand in most research settings. Software handles the math. But the principle underlies almost every population genetics analysis.

Researchers use Hardy-Weinberg equilibrium as a quality check. If a SNP marker is out of equilibrium in a population, it might indicate:

Most GWAS (genome-wide association studies) exclude markers that violate Hardy-Weinberg equilibrium because they're considered unreliable.

Getting Started: Your First Hardy-Weinberg Problem

Work through this example to lock in the concept.

Problem: In a population of 1,000 moths, 841 are light-colored and 159 are dark-colored. Dark color is recessive. Is this population in Hardy-Weinberg equilibrium?

Solution:

  1. Count genotypes. Light (dominant phenotype) includes both AA and Aa. Dark (recessive phenotype) must be aa. So q² = 159/1000 = 0.159
  2. Find q: q = √0.159 = 0.399
  3. Find p: p = 1 - 0.399 = 0.601
  4. Calculate expected genotype counts:
    • Expected aa = q² × 1000 = 0.159 × 1000 = 159 ✓ (matches)
    • Expected AA = p² × 1000 = 0.361 × 1000 = 361
    • Expected Aa = 2pq × 1000 = 2(0.601)(0.399) × 1000 = 480
  5. Check: 361 + 480 + 159 = 1000 ✓

This population appears to be in Hardy-Weinberg equilibrium for this trait. The observed dark phenotype count matches the expected q².

The Bottom Line

Hardy-Weinberg equilibrium is a null model. It describes what perfect, unchanging populations would look like. Real populations deviate from it, and those deviations are where the interesting biology happens.

You need to understand the assumptions and the math—not because you'll use them in the field exactly as written, but because they form the foundation for everything in population genetics.

Master the basics here, and you'll actually understand what genetic drift, selection, and gene flow mean when you encounter them later.