Genetics and Molecular Biology · Unit 1: Inheritance

Probability, Crosses and the Chi-Square Test

A cross predicts proportions, but real offspring come in counts that never match the ratio exactly. This lesson gives you the two rules of probability that predict crosses of many genes without a Punnett square, the binomial for counting outcomes in a family, and the chi-square test for asking whether a deviation from a ratio is larger than chance would usually produce. Afterwards you can run the test and say what its p-value does and does not mean.

Watch first How Far Can a Count Stray? · 3:00

Mendel crossed peas that differed in seed shape and seed colour and counted 556 seeds from the hybrids: 315 round yellow, 108 round green, 101 wrinkled yellow and 32 wrinkled green. A 9:3:3:1 ratio predicts 312.75, 104.25, 104.25 and 34.75. None of his counts matches.

That is normal. A ratio is a probability, and counts drawn from a probability scatter around it, the way ten coin tosses rarely give exactly five heads. This lesson asks two questions. How do you predict the proportions of a cross involving many genes? And how far can a count stray from the prediction before you stop believing the prediction? The tools are two rules of probability, the binomial distribution, and the chi-square test.

Two rules: and means multiply, or means add

A gene sits at a place on a chromosome called its locus, and its versions are alleles. An organism with two copies of the same allele is homozygous; with two different alleles, heterozygous. When a heterozygote (Aa) makes gametes, half carry A and half carry a, as you saw in Mendel’s peas.

Two events are independent when the outcome of one does not change the chance of the other. For independent events, the chance of both is the product:

P(A and B) = P(A) x P(B)

Two events are mutually exclusive when they cannot both happen. For those, the chance of either is the sum:

P(A or B) = P(A) + P(B)

Apply them to Aa x Aa. An offspring is AA when the egg carries A and the sperm carries A: 1/2 x 1/2 = 1/4. It is Aa in two exclusive ways (A from the egg and a from the sperm, or the reverse): 1/4 + 1/4 = 1/2. It shows the dominant phenotype, written A_, if it is AA or Aa: 1/4 + 1/2 = 3/4.

Independence is an assumption, and you must earn it. Genes on different chromosomes, or far apart on one chromosome, assort independently, those on different chromosomes because of how chromosomes line up and separate in meiosis and those far apart on one chromosome because crossing over shuffles them about as often as not (see chromosomes and meiosis). Genes close together on one chromosome tend to be inherited together, and the product rule then fails (see linkage and mapping). So every calculation below says unlinked, and means it.

Many genes at once: follow the branches

A Punnett square for three genes has 64 boxes. You do not need it. Treat each gene as its own small cross, then multiply along branches: for each locus, branch into the dominant phenotype (3/4) or the recessive one (1/4), and the probability of a path is the product of the probabilities on it. This is the branch, or forked-line, method.

Worked problem, part 1. Assume three unlinked genes, complete dominance at each, and no selection. Cross AaBbCc x AaBbCc.

  1. What fraction is A_ bb C_? One path: 3/4 x 1/4 x 3/4 = 9/64.
  2. What fraction is fully recessive, aabbcc? 1/4 x 1/4 x 1/4 = 1/64.
  3. What fraction shows the dominant phenotype for exactly two of the three traits? There are three paths: recessive at A only, at B only, or at C only. Each has probability (3/4)(3/4)(1/4) = 9/64. The paths are mutually exclusive, so add them: 3 x 9/64 = 27/64.

The third question is where students go wrong. “Exactly two” is an or question built from and pieces. Multiply along each path, then add the paths. Check by a different route: the eight paths fall into four groups with probabilities 27/64 (all dominant), 27/64 (exactly two), 9/64 (exactly one) and 1/64 (none), which sum to 64/64.

Families: the binomial counts the birth orders

A different question: two parents are both carriers (Aa) of a recessive allele, and they have four children. How many of the four will be aa? This is a probability exercise, not a forecast for any real family. Assume complete penetrance (every aa child shows the trait) and that each child is an independent event with probability 1/4.

The binomial distribution handles any fixed number of independent trials, each with the same probability p of a given outcome:

P(exactly k of n) = [n! / (k! (n - k)!)] x p^k x (1 - p)^(n - k)

The bracket counts the number of different orders in which k outcomes can fall among n trials.

Worked problem, part 2. n = 4, p = 1/4.

  1. Exactly one affected child. One particular order, say the first child affected and the other three not, has probability (1/4)(3/4)(3/4)(3/4) = 27/256. The affected child could be first, second, third or fourth: four orders. So P = 4 x 27/256 = 108/256 = 27/64, about 0.42.
  2. At least one affected child. Use the complement. P(none affected) = (3/4)^4 = 81/256. So P(at least one) = 1 - 81/256 = 175/256, about 0.68.

The factor of 4 is the step students forget. And note what independence means here. If the first child is affected, the chance for the second is still 1/4. Believing that the family has “used up” its affected child is the gambler’s fallacy; segregation has no memory.

Is the deviation chance? The chi-square test

Now the opening question. Suppose a dihybrid F2 of 160 plants gives 98, 28, 26 and 8 in the four phenotype classes. Does it fit 9:3:3:1?

Karl Pearson’s chi-square statistic, introduced in 1900, measures the distance between observed (O) and expected (E) counts:

chi-square = sum over classes of (O - E)^2 / E

Worked problem, part 3. Assume independent plants, correct scoring and equal survival of all genotypes.

  1. Expected counts. Multiply the total by each probability: 160 x 9/16 = 90, 160 x 3/16 = 30, 30, and 160 x 1/16 = 10.
  2. Each class. (98 - 90)^2/90 = 64/90 = 0.711. (28 - 30)^2/30 = 4/30 = 0.133. (26 - 30)^2/30 = 16/30 = 0.533. (8 - 10)^2/10 = 4/10 = 0.400.
  3. Sum. chi-square = 1.78.
  4. Degrees of freedom. With four classes and a ratio fixed in advance, df = 4 - 1 = 3: once three counts and the total are known, the fourth is set. If you had estimated a parameter from the data, you would subtract one more, the point Ronald Fisher made for contingency tables in 1922 and for the general case in 1924.
  5. Compare. The critical value for 3 df at the 0.05 level is 7.81. 1.78 is well below it; the p-value is about 0.62. The data are consistent with 9:3:3:1.

Three rules keep the test honest. Use counts, never percentages or ratios, because the size of the sample is what makes a deviation surprising. Keep expected counts above about five in every class, or the chi-square approximation becomes poor; small families are a bad fit for this test. And keep the two kinds of test apart: a goodness-of-fit test against four classes has 3 df, while a 2 x 2 test of whether two traits are associated has 1 df.

Mendel’s own 556 seeds give chi-square = 0.47 against 9:3:3:1, also with 3 df, p about 0.93.

What a p-value does and does not tell you

A p-value is the probability of getting data at least this far from expectation if the hypothesis and every other assumption of the model were true. A p of 0.62 means a deviation this size is unremarkable under 9:3:3:1.

It is not the probability that the hypothesis is true. And p > 0.05 does not prove the hypothesis: it means you fail to reject it. Other models may fit the same counts as well. A small p-value does not tell you which assumption failed, either: linkage, a lethal genotype and misscored plants can all inflate chi-square. Our F2 is consistent with independent assortment; it does not prove it.

Chi-square tester: do these counts fit the ratio?⚙ original · interactive
Observed counts (type your own; counts, never percentages)
Load a lesson example
ClassObserved OExpected E(O − E)² / E
chi-square
–
degrees of freedom
–
p-value
–

What p means. It is the probability of data at least this far from expectation if the hypothesis and every other assumption of the model were true. It is not the probability that the hypothesis is true, and p above 0.05 means you fail to reject the ratio, not that you have shown it. A small p does not say which assumption failed.

Rule to keep: expected = total × probability, chi-square = sum of (O − E)² / E, degrees of freedom = classes − 1 for a ratio fixed in advance, and a count that differs from its expected value is normal. This is a sketch of the logic with independent plants, correct scoring and equal survival assumed.

Design problem

Two true-breeding white-flowered lines are crossed and the F1 is all purple. The F2 of 160 plants contains 96 purple and 64 white. Test a 3:1 ratio and a 9:7 ratio, decide which the data allow, and say what experiment you would do next.

One way to do it

3:1. Expected 120 purple and 40 white. Chi-square = (96 - 120)^2/120 + (64 - 40)^2/40 = 576/120 + 576/40 = 4.8 + 14.4 = 19.2, with 1 df. The critical value at 0.05 is 3.84, so 3:1 is rejected (p is far below 0.001).

9:7. Expected 160 x 9/16 = 90 and 160 x 7/16 = 70. Chi-square = 36/90 + 36/70 = 0.40 + 0.51 = 0.91, with 1 df, p about 0.34. Not rejected.

What next. A good fit does not establish the model. A 5:3 ratio (100:60) fits these counts too, with chi-square about 0.43, and no one is proposing it. What 9:7 adds is a mechanism: two genes, each needed for purple, with each white parent lacking a different one. Test that mechanism with a cross whose outcome differs between models. Cross F2 white plants with each other in many pairs. Under one gene, white x white always gives white. Under two genes, some pairs (one carrying aa, the other bb, each with the other gene’s dominant allele) give purple offspring. Crossing the F1 back to either white parent should give about 1 purple : 1 white. How two genes produce 9:7 is the subject of extending Mendel.

How we measure it

Controlled cross with stamen removal

The stamens of a flower are removed before it can pollinate itself, and pollen from a chosen plant is applied. The cross then has known parents, so the offspring counts can be compared with a prediction.

Progeny testing

Plants with the dominant phenotype are selfed or crossed and their offspring scored. Plants that breed true are homozygous; plants that give both forms are heterozygous. Mendel used it to show that two-thirds of dominant-looking F2 plants were hybrids.

Chi-square goodness-of-fit test

Observed counts in each class are compared with the counts a hypothesis predicts. The statistic, with its degrees of freedom, gives the probability of a deviation at least this large if the hypothesis were true.

Finish line

Test yourself

8 questions

Practice and MCAT-style, with explained answers.

Next · Lesson 4

Extending Mendel: Dominance, Multiple Alleles and Gene Interaction

Mate two yellow mice as often as you like: you will never get a yellow mouse that breeds true. Why?

Continue →

← Lesson 2 · Chromosomes and Meiosis: The Physical Basis of Mendel's Laws

↑ Top