Contents
12 — Probability and hypothesis testing in genetics Part 2 — Transmission genetics

12 — Probability and hypothesis testing in genetics

Before this: Ch 09 · Ch 10 · Ch 11 · Time: ~25 min

Statistics needed: S1 Probability · S2 Distributions · S4 Hypothesis testing

This chapter is not a statistics tutorial — the statistics track does that, and S1, S2 and S4 supply everything used here. If you have not read them, read them first; this chapter will otherwise look like a list of rules rather than a set of consequences.

What this chapter is about is the specific ways that even people who know statistics well get genetics wrong. That is almost never by computing a statistic incorrectly. It is almost always by testing the wrong null, counting the wrong degrees of freedom, or forgetting how the sample came to exist.

What you'll be able to do

The core idea

A genetic hypothesis is a generative model. "These two loci assort independently and both are fully " is not a vague claim — it pins down an exact multinomial distribution over phenotypic classes, with no free parameters. That is unusual and valuable: you can compute expected counts before collecting a single plant.

Everything downstream follows from taking that seriously. The test statistic is routine. The work is in the model.

Almost every "statistics error" in genetics is a modelling error wearing statistical clothes. The null was the wrong null, or a parameter was silently fitted, or — most often — the families in the dataset were not sampled at random from the families that exist. No amount of care with the arithmetic repairs any of those.


1. Product and sum rules, and why they are biological claims here

Multiplying probabilities across loci looks like arithmetic. It is not.

Aa Bb Cc  ×  Aa Bb Cc        what fraction of progeny is  A_ bb CC ?

   locus A        locus B        locus C
   A_ = 3/4       bb = 1/4       CC = 1/4
      └──────────────┴──────────────┘
             3/4 × 1/4 × 1/4  =  3/64

That multiplication is legitimate only because the three loci assort independently — a claim about , not about arithmetic. Put A and B 10 cM apart and the joint distribution is set by the recombination fraction instead (Ch 14). Likewise the 1/4 at each locus assumes fair , which meiotic drive violates. The independence you are multiplying is an empirical hypothesis, and it is frequently the thing under test.

The sum rule is used for the other half: a phenotypic class like A_ is a union of mutually exclusive (AA + Aa = 1/4 + 2/4). Two failure modes recur:

2. Family composition is binomial — with one trap

Children of a given cross are independent draws from the same multinomial, so counts within a sibship are binomial. For Aa × Aa, in a sibship of four:

P(exactly one affected) = C(4,1)(1/4)¹(3/4)³ = 4 × 27/256 = 27/64 ≈ 0.42

The trap is that people quietly switch between ordered and unordered outcomes. P(affected, unaffected, unaffected, unaffected in that birth order) = (1/4)(3/4)³ = 27/256 ≈ 0.105. The binomial coefficient is the whole difference, and questions phrased as "what is the chance their first child is affected and the rest are not" mean the ordered version.

The second trap is the gambler's fallacy, which in genetics is not a joke but a clinical reality: having had an affected child does not reduce the risk for the next. Each conception is an independent draw. What does change with family history is your estimate of the parents' — which is §6, and a different thing entirely.

3. Chi-square against a genetic hypothesis

The setup, which is the part worth being pedantic about:

graph TD H["<b>Genetic hypothesis</b><br/>e.g. two unlinked loci,<br/>both fully dominant"] R["<b>Expected proportions</b><br/>9 : 3 : 3 : 1<br/>(no free parameters)"] E["<b>Expected counts</b><br/>multiply each proportion by N<br/><i>counts, never percentages</i>"] X["χ² = Σ (O − E)² / E"] D["<b>df</b> = k − 1 − (parameters<br/>estimated from these data)"] P["compare to χ²<sub>df</sub>"] H --> R --> E --> X --> P D --> P E -.->|"any E &lt; 5?"| W["pool classes or use<br/>exact multinomial"]

Three rules that are violated constantly:

Expectations come from the model, not the data. This is a goodness-of-fit test against a fully specified distribution, not a contingency table. If you find yourself computing expected values from row and column margins, you are testing a different hypothesis (independence between two classifications) with different degrees of freedom.

Counts, not proportions. χ² scales linearly with N. Feeding it percentages is equivalent to claiming N = 100, and it is the single most common mechanical error in undergraduate genetics.

Expected counts of at least ~5 per class. The χ² approximation to the multinomial degrades below that. With modern computers there is no reason to tolerate it — enumerate or simulate the exact multinomial instead.

4. Degrees of freedom, and the four ways people get them wrong

df = (number of classes) − 1 − (number of parameters estimated from these same data).

SituationClassesEstimateddf
F₂ monohybrid, testing 3 : 1201
F₂ dihybrid, testing 9 : 3 : 3 : 1403
Dihybrid testcross, testing 1 : 1 : 1 : 1 (no )403
Same testcross, but fitting the recombination fraction r41 (r)2
Hardy–Weinberg, 3 classes, p estimated from the genotypes31 (p)1

The four errors, in rough order of frequency:

  1. Using n − 1 instead of k − 1. Degrees of freedom count classes, not individuals. A 3 : 1 test on 400 plants has 1 df, not 399.
  2. Forgetting the estimated parameter. The Hardy–Weinberg row above is the canonical case: the was computed from the very genotypes being tested, so one df is spent on it. Using df = 2 makes the test conservative and quietly hides real disequilibrium. This matters again in variant-calling QC (Ch 26).
  3. Pooling classes after looking at the data, then not accounting for having chosen the pooling to improve the fit.
  4. Including a "total" row in the summation. It contributes zero to the numerator but people sometimes count it as a class.

5. What failing to reject does not license

χ² is a test of the null. A large p-value means the data are consistent with the model, which is a very much weaker statement than the model is right, and in small genetic crosses it is close to vacuous.

Make it concrete. Suppose the truth is 70 : 30, not 3 : 1, and you test for 3 : 1 at α = 0.05. Power comes from the non-centrality λ = N Σ (pᵢ − πᵢ)²/πᵢ:

NλPower to detect the departure
1001.3321%
3004.052%
100013.396%

With a hundred progeny you will miss a genuine 5-percentage-point departure four times out of five. The same arithmetic applies to : a testcross where the true recombination fraction is 0.4 (real but loose linkage, expected classes 0.3 : 0.3 : 0.2 : 0.2 instead of 1 : 1 : 1 : 1) gives only 36% power at N = 100, rising to 97% at N = 500.

A non-significant χ² on a small cross is not evidence for . It is evidence that you ran an underpowered experiment. Report the power, or report a confidence interval on the parameter, but do not report "consistent with Mendelian expectations" as though it were a finding.

The mirror-image error is a fit that is too good, and genetics has the most famous example in all of statistics — see the worked example.

6. Bayes: the machinery Chapter 15 runs on

risk calculation is Bayesian inference over , laid out in a four-column table by convention. Learn the layout here; Ch 15 does nothing but apply it.

The problem. A woman's brother has cystic fibrosis (autosomal ). Their parents are unaffected, so both must be heterozygous. She is unaffected. Her partner has been screened and is a carrier. They already have two unaffected children. What is the risk for a third?

Prior. From Aa × Aa she was 1/4 AA, 1/2 Aa, 1/4 aa. She is unaffected, so aa is excluded — conditioning that is already built into the prior. Renormalising: 2/3 carrier, 1/3 non-carrier.

Conditional. The probability of the observed evidence (two unaffected children) under each hypothesis. If she carries, each child is affected with probability 1/4, so unaffected with 3/4; two independent children give (3/4)² = 9/16. If she does not carry, no child can be affected, so the probability of the observation is 1.

CarrierNon-carrier
Prior2/31/3
Conditional (2 unaffected children)9/161
Joint2/3 × 9/16 = 3/81/3 × 1 = 1/3
Posterior(3/8) / (3/8 + 1/3) = 9/17 ≈ 0.538/17 ≈ 0.47

Risk for the next child = P(she carries) × P(child inherits a from her) × P(child inherits a from him) = (9/17) × (1/2) × (1/2) = 9/68 ≈ 0.13.

Two things to notice. Her carrier probability fell only from 0.67 to 0.53: two unaffected children are weak evidence, because unaffected children are the likely outcome even when she carries. And the whole calculation is mechanical — the only judgement is deciding what counts as evidence and computing its likelihood under each genotype. Priors here are not subjective; they come from Mendelian and from population frequencies (for CF, a of roughly 1 in 25 in European-ancestry populations, when the partner has not been screened).

7. Ascertainment: the sampling process that was never random

Here is the error that no amount of statistical sophistication catches, because it happens before the data exist.

Collect families segregating a disease. You find them because someone in them is affected. Families where two carriers happened to have three unaffected children are invisible — they never came to a clinic. Your sample is conditioned on having at least one affected child, so the observed proportion affected is biased upward:

E[proportion affected | at least one affected, sibship size s] = (1/4) / (1 − (3/4)ˢ)

Sibship size s123468
Expected proportion affected among ascertained sibships1.000.570.430.370.300.28

In two-child families you expect 57% affected, not 25% — and a naive χ² against 3 : 1 will reject autosomal recessive inheritance emphatically, for a trait that is autosomal recessive. This is why early twentieth-century human studies kept "disproving" Mendelism, and why Weinberg introduced the proband method in 1912.

The correction depends on how families were ascertained, and getting that model wrong is itself the error:

Ascertainment modelWhat it meansCorrect handling
Complete (truncate)Every family with ≥1 affected child is foundFit the truncated binomial: observed proportion q = p / (1 − (1−p)ˢ)
SingleEach affected child is found independently with tiny probability, so families are found roughly once per probandWeinberg's proband method: drop one proband per family, estimate from the remaining sibs
MultipleBetween the twoWeight by the number of probands; model explicitly

For s = 2 under complete ascertainment the algebra collapses nicely: q = p/(p(2−p)) = 1/(2−p), so p = 2 − 1/q. An observed q = 4/7 recovers p = 2 − 7/4 = 1/4 exactly.

Ascertainment is not a historical curiosity. It is why case-control need careful control matching (Ch 51), why variant databases built from clinically tested patients over-represent pathogenic (Ch 55), and why "" estimated from clinically ascertained families is almost always too high (Ch 54).

8. Many tests at once

Statistics: prior and posterior are S1 §5, which you have already read. The odds form used below — multiply prior odds by a likelihood ratio to get posterior odds — and the itself are developed properly in Ch 14 §9 and S6 §§4–5. Take the arithmetic here at face value for now; it is an illustration of the idea, not a method you need yet.

Genetics reached the multiple-testing problem decades before genomics did. Morton's 1955 argument for the LOD score threshold of 3 is explicitly a prior-odds correction: two randomly chosen autosomal loci are linked with probability roughly 1 in 50, so odds of 1000 : 1 in favour of from the data leave posterior odds of about 20 : 1 — a ~5% false-positive rate, per test, given the genome-wide prior. (LOD relates to χ² by χ² ≈ 2 ln(10) × LOD ≈ 4.6 × LOD, so LOD 3 ≈ χ² of 13.8.)

The modern threshold, 5 × 10⁻⁸ ≈ 0.05 / 10⁶, reaches a comparable place by a different argument: Morton's is a prior-odds correction, the threshold is a family-wise error correction over roughly a million effectively independent tests. Ch 32 §6 and Ch 51 §5 keep the two apart, and it matters that they are kept apart.


Common misconceptions

What people thinkWhat's actually true
A large χ² p-value confirms the genetic modelIt fails to reject one model. Dozens of other models are equally consistent with the same data, and with small N nearly everything is
Degrees of freedom = number of individuals − 1df counts phenotypic classes, then subtracts one more for each parameter estimated from the same data
A Hardy–Weinberg test on 3 has 2 df1 df — the was estimated from those genotypes
Each child of Aa × Aa has a 1/4 risk, so one child in four will be affected1/4 is a per-conception probability, not a quota. P(exactly one affected of four) is 27/64, and P(none) is 81/256
They already have an affected child, so the next is saferConceptions are independent. What family history updates is your belief about the parents' genotypes, not the probability
Finding 57% of sibs affected refutes inheritanceIn completely ascertained two-child sibships that is exactly the expectation. The sample was conditioned on containing an affected child, so the null is 4/7, not 1/4
χ² can be run on percentages since ratios are what matterχ² scales with N. Percentages assert N = 100 and throw away all the information about sample size
Bayesian risk involves subjective priorsThe priors are Mendelian segregation ratios and population frequencies. Nothing subjective enters

Worked example: Mendel's dihybrid F₂, and the fit that was too good

Mendel crossed peas differing in seed shape (round R to wrinkled r) and cotyledon colour (yellow Y dominant to green y), selfed the F₁, and scored 556 F₂ seeds.

Step 1 — state the hypothesis. Both loci fully dominant, and the loci assort independently. No free parameters.

Step 2 — derive expected proportions. Per locus, F₂ is 3/4 dominant : 1/4 . Independence lets us multiply: 9/16, 3/16, 3/16, 1/16.

Step 3 — expected counts. Multiply by N = 556.

ClassExpected proportionEO(O−E)²/E
round yellow9/16312.753150.0162
round green3/16104.251080.1349
wrinkled yellow3/16104.251010.1013
wrinkled green1/1634.75320.2176
556.00556χ² = 0.470

Step 4 — degrees of freedom. Four classes, nothing estimated: df = 4 − 1 = 3.

Step 5 — interpret. The critical value at α = 0.05 with 3 df is 7.815. Our 0.470 is nowhere near it; p ≈ 0.93. Do not reject.

Step 6 — say what that means. The data are consistent with 9 : 3 : 3 : 1. They are also consistent with weak : an F₂ of 556 has about 84% power against r = 0.4 (an F₂ from a coupling- F₁ gives expected proportions 0.59 : 0.16 : 0.16 : 0.09, so λ = 556 × 0.0215 = 12.0) but only about 25% power against r = 0.45. The test excludes tight linkage and not much else. Note that §5's power figures are for a testcross and do not transfer directly to an F₂, where the same r produces a smaller departure from the null. (These two genes are in fact on different , but the test did not establish that.)

Step 7 — notice the other tail. p = 0.93 means 93% of honest replications would fit worse than this. For one experiment that is unremarkable. Fisher, in 1936, aggregated the deviations across all of Mendel's published experiments and obtained a combined χ² of about 41.6 on 84 df — a probability of about 0.99997 that a genuine replication would fit worse. Results that good arise about three times in 100,000 (Fisher, working from the tables of his day, quoted P = 0.99993). The likeliest explanations are unconscious selection by assistants who knew the expected ratios, or discarding of runs that looked wrong; deliberate fraud is not required and is not the consensus reading. The lesson is that goodness of fit has two tails. A model-fitting p-value of 0.999 is as much a signal that something is wrong with the data-generating process as 0.001 is.

Connections