HomeArticlesGenetics

Mendelian Genetics: How Counting Pea Plants Explained Heredity

From Mendel's two laws to the Punnett square, the 9:3:3:1 dihybrid ratio, and the Hardy-Weinberg equilibrium for whole populations.

mysimulator teamUpdated June 2026≈ 8 min read▶ Open the simulation

Two laws from counting pea plants

Gregor Mendel spent the 1850s and 60s crossing pea plants and, crucially, counting the offspring of each cross rather than just describing them — a statistical rigor almost nobody else in biology was applying at the time. From those counts he inferred that traits are carried by discrete hereditary units (what we now call genes), that each individual carries two copies (one from each parent), and that which copy gets passed on to each offspring is a matter of chance. Those inferences became two rules: the Law of Segregation (the two copies of a gene separate during the formation of sex cells, so each gamete carries only one) and the Law of Independent Assortment (genes for different traits are inherited independently of each other) — the second holds only for genes on different chromosomes or far apart on the same one, a qualification Mendel's peas happened not to expose.

live demo · Punnett square outcomes across many simulated crosses● LIVE

The Punnett square: enumerating every possible pairing

For a single gene with two alleles — say a dominant allele B (brown eyes) and recessive b (blue eyes) — a Punnett square lays out every possible combination of one parent's gametes against the other's, giving the exact genotype ratios of the offspring:

cross: Bb × Bb  (both parents heterozygous)

         B        b
     +--------+--------+
  B  |   BB   |   Bb   |
     +--------+--------+
  b  |   Bb   |   bb   |
     +--------+--------+

genotypes:  1 BB : 2 Bb : 1 bb   (1:2:1)
phenotypes: 3 brown : 1 blue     (3:1, since B is dominant over b)

The classic 3:1 phenotype ratio from a heterozygous-by-heterozygous cross is the single most recognisable result in classical genetics, and it falls directly out of simple combinatorics once you accept that each parent contributes one randomly chosen allele.

Dihybrid crosses and where 9:3:3:1 comes from

Track two independently assorting genes at once — say seed shape (R round dominant, r wrinkled recessive) and seed colour (Y yellow dominant, y green recessive) — and a cross between two double heterozygotes (RrYy × RrYy) produces a 4×4 Punnett square with 16 equally likely combinations. Because the Law of Independent Assortment says the two genes segregate independently, the combined phenotype ratio is simply the product of each gene's own 3:1 ratio:

(3 round : 1 wrinkled) × (3 yellow : 1 green)
= 9 round-yellow : 3 round-green : 3 wrinkled-yellow : 1 wrinkled-green   (9:3:3:1)

That clean 9:3:3:1 split was itself strong evidence for independent assortment — if the two genes were linked (physically close on the same chromosome) the ratio would skew away from 9:3:3:1 toward the parental combinations, which is in fact how later geneticists discovered gene linkage and used recombination frequencies to build the first chromosome maps.

Hardy-Weinberg: taking Mendel's rules to the level of a whole population

Mendel's laws describe a single cross; the Hardy-Weinberg principle (1908) extends the same logic to an entire population's allele frequencies, asking what happens generation after generation if mating is random and nothing is disturbing the gene pool. Let p be the frequency of allele B and q = 1 − p be the frequency of allele b in the population; under random mating, the genotype frequencies settle immediately into a fixed equilibrium:

p² + 2pq + q² = 1

p²  = frequency of BB individuals
2pq = frequency of Bb individuals
q²  = frequency of bb individuals

equilibrium holds only if: no mutation, no migration, no selection,
infinite population size (no genetic drift), and random mating

The real value of Hardy-Weinberg is as a null hypothesis: if a population's measured genotype frequencies don't match the p²:2pq:q² prediction from its measured allele frequencies, something on that assumption list is being violated — natural selection favouring one genotype, non-random mating, a small population drifting, or migration bringing in new alleles — and comparing predicted to observed frequencies is a standard tool for detecting exactly which evolutionary force is at work in a real population.

From peas to the whole of modern genetics

Mendel's laws predate any knowledge of DNA, chromosomes or meiosis by decades, yet they still describe the correct statistical outcome of sexual reproduction for simple, single-gene traits, because segregation and independent assortment are direct macroscopic consequences of how chromosomes actually separate during meiosis. Most real traits are more complicated — many genes influencing one trait (polygenic inheritance), genes affecting multiple traits (pleiotropy), incomplete dominance, and environmental interaction all complicate the clean ratios — but the Punnett square and Hardy-Weinberg remain the starting toolkit for reasoning about heredity at both the individual-cross and whole-population scale.

Frequently asked questions

Why does a cross between two heterozygous parents give a 3:1 ratio and not 1:1?

Because each parent contributes one randomly chosen allele, a Punnett square shows four equally likely genotype combinations: 1 homozygous dominant, 2 heterozygous, 1 homozygous recessive. Since the dominant allele masks the recessive one in both the homozygous-dominant and heterozygous cases, three of the four combinations show the dominant phenotype, giving the 3:1 ratio.

Where does the 9:3:3:1 ratio in a dihybrid cross come from?

It is simply the product of two independent 3:1 ratios, one for each gene, which follows directly from the Law of Independent Assortment. Multiplying (3:1) by (3:1) across all four possible phenotype combinations gives 9:3:3:1.

What does it mean for a population to be in Hardy-Weinberg equilibrium?

It means the population's genotype frequencies match exactly what you would predict from its allele frequencies under random mating with no mutation, migration, selection or genetic drift. It serves mainly as a null hypothesis — real populations that deviate from it are showing evidence that one of those assumptions is being violated, which is a common way of detecting evolution in action.

Try it live

Everything above runs in your browser — open Mendelian Genetics and change the parameters while it is running. Nothing is installed, nothing is uploaded, the whole model lives in one tab.

▶ Open Mendelian Genetics simulation

What did you find?

Add reproduction steps (optional)