---
title: "Statistics and stories: the history of the tests"
subtitle: "The z, t, chi-square, F and exact tests, and the people who made them"
engine: knitr
format:
html:
code-fold: true
code-summary: "Show code"
---
```{=html}
<style>
.portrait { float: right; width: 170px; margin: 0.2rem 0 1rem 1.25rem; font-size: 0.8rem; color: #555; line-height: 1.3; }
.portrait img { width: 100%; border-radius: 4px; margin-bottom: 0.3rem; }
.portrait.wide { width: 260px; }
.portrait-pair { display: flex; gap: 0.75rem; float: right; margin: 0.2rem 0 1rem 1.25rem; }
.portrait-pair .portrait { float: none; margin: 0; width: 140px; }
@media (max-width: 640px) { .portrait, .portrait-pair { float: none; margin: 0 auto 1rem auto; } }
h2 { clear: both; }
</style>
```
```{r}
#| label: setup
#| include: false
library(HistData) # Arbuthnot, ChestSizes, Macdonell, Galton
library(vcd) # HorseKicks, WeldonDice
library(tidyverse)
library(patchwork)
theme_set(theme_minimal(base_size = 12))
set.seed(1908)
```
Each test in this course has an author, a date and a reason. Most authors had a practical problem. Gosset, a brewer, had only four samples of barley. Fisher, at an agricultural research station, had a field of potatoes. This page gives the history of the tests. Where the original data still exist, we do the original analysis again in R.
| Year | Who | What | Lecture |
|----|----|----|----|
| 1710 | John Arbuthnot | First significance test: 82 years of London christenings | [L02](https://docs.google.com/presentation/d/1ps9E9OAruv_hMOFc57T0XZdRI5zlJqRvyCAWAiTiXcw/edit?usp=sharing) |
| 1733 | Abraham de Moivre | The normal curve, as an approximation to the binomial | [L02](https://docs.google.com/presentation/d/1ps9E9OAruv_hMOFc57T0XZdRI5zlJqRvyCAWAiTiXcw/edit?usp=sharing) |
| 1805–1810 | Legendre, Gauss, Laplace | Least squares, the normal law of error, the central limit theorem | [L04](linear_models.html) |
| 1837 | Siméon Denis Poisson | The Poisson distribution, as a limit of the binomial | L09–10 (planned) |
| 1846 | Adolphe Quetelet | A normal curve for the chests of 5,738 soldiers | – |
| 1863–1876 | Abbe, Helmert | The distribution of a sum of squared normal errors (chi-square) | L11 (planned) |
| 1877–1888 | Francis Galton | Quincunx, regression, correlation | [L04](linear_models.html), [L06](https://docs.google.com/presentation/d/1Ms79kaonZtvGTRMxyPCaLABFW0rr-i3WeQecoceO7XY/edit?usp=sharing) |
| 1885 | F. Y. Edgeworth | "Significant" with its statistical meaning | [L02](https://docs.google.com/presentation/d/1ps9E9OAruv_hMOFc57T0XZdRI5zlJqRvyCAWAiTiXcw/edit?usp=sharing) |
| 1898 | Ladislaus von Bortkiewicz | Horse kicks and the "law of small numbers" | L09–10 (planned) |
| 1900 | Karl Pearson | The chi-square goodness-of-fit test | L11 (planned) |
| 1908 | W. S. Gosset ("Student") | The small-sample test for a mean: Student's distribution | [L02](https://docs.google.com/presentation/d/1ps9E9OAruv_hMOFc57T0XZdRI5zlJqRvyCAWAiTiXcw/edit?usp=sharing) |
| 1915 | R. A. Fisher | A full proof of Student's distribution | [L02](https://docs.google.com/presentation/d/1ps9E9OAruv_hMOFc57T0XZdRI5zlJqRvyCAWAiTiXcw/edit?usp=sharing) |
| 1922 | R. A. Fisher | The correct degrees of freedom for contingency tables | L11 (planned) |
| 1923–1925 | R. A. Fisher | Analysis of variance, the *z* distribution, *t*, [*Statistical Methods for Research Workers*](https://psychclassics.yorku.ca/Fisher/Methods/) | [L06](https://docs.google.com/presentation/d/1Ms79kaonZtvGTRMxyPCaLABFW0rr-i3WeQecoceO7XY/edit?usp=sharing) |
| 1928–1933 | Neyman and E. S. Pearson | Two types of error, and power | [L02](https://docs.google.com/presentation/d/1ps9E9OAruv_hMOFc57T0XZdRI5zlJqRvyCAWAiTiXcw/edit?usp=sharing) |
| 1932–1934 | Mahalanobis, Snedecor | Tables of the variance ratio, and the name *F* | [L06](https://docs.google.com/presentation/d/1Ms79kaonZtvGTRMxyPCaLABFW0rr-i3WeQecoceO7XY/edit?usp=sharing) |
| 1935 | R. A. Fisher | [*The Design of Experiments*](https://archive.org/details/designofexperime0000rona): the lady tasting tea, the exact test | L11 (planned) |
| 1938–1947 | Welch, Satterthwaite | The t-test for unequal variances (the R default) | [L03](https://docs.google.com/presentation/d/1LHMhKaqQQJGaOg7m59H_t3PiTsp71Qlq7fPPoh2nSGg/edit?usp=sharing) |
| 1945–1947 | Wilcoxon, Mann and Whitney | Rank tests | [L03](https://docs.google.com/presentation/d/1LHMhKaqQQJGaOg7m59H_t3PiTsp71Qlq7fPPoh2nSGg/edit?usp=sharing) |
## 1710: Arbuthnot and the first significance test
::: portrait

John Arbuthnot, by Godfrey Kneller (1723)\
<small>Public domain, [Wikimedia Commons](https://commons.wikimedia.org/wiki/File:Arbuthnot_John_Kneller.jpg)</small>
:::
John Arbuthnot was physician to Queen Anne. He used the London records of christenings from 1629 to 1710. In each of these 82 years, the parishes christened more boys than girls. Assume that the sex of each child is a fair coin toss. Then a "boy year" and a "girl year" have equal probability, and 82 boy years in a row have probability $(1/2)^{82}$. This is approximately 1 in $4.8 \times 10^{24}$.
Arbuthnot published the result in [Philosophical Transactions](https://doi.org/10.1098/rstl.1710.0011) in 1710. The title was [*An Argument for Divine Providence, taken from the constant Regularity observ'd in the Births of both Sexes*](https://doi.org/10.1098/rstl.1710.0011). He concluded that the excess of boys came from divine design.
His conclusion was theological, but we still use his logic. We assume a null hypothesis and calculate the probability of the data under it. If that probability is very small, we reject the hypothesis. Today we call his method a **sign test**.
```{r}
#| label: fig-arbuthnot
#| fig-cap: "Arbuthnot's data: the ratio of male to female christenings in London. The ratio is more than 1 in all 82 years."
#| fig-height: 3.2
ggplot(Arbuthnot, aes(Year, Ratio)) +
geom_hline(yintercept = 1, linetype = "dashed", colour = "grey50") +
geom_line(colour = "steelblue") + geom_point(colour = "steelblue", size = 1) +
labs(y = "male / female christenings") +
annotate("text", x = 1640, y = 1.005, label = "equal numbers", colour = "grey40", vjust = 0)
```
```{r}
#| code-fold: false
binom.test(sum(Arbuthnot$Ratio > 1), nrow(Arbuthnot), alternative = "greater")$p.value
```
## 1733–1812: de Moivre, Gauss, Laplace and the normal curve
::: portrait-pair
::: portrait

Abraham de Moivre\
<small>Public domain, [Wikimedia Commons](https://commons.wikimedia.org/wiki/File:Abraham_de_moivre.jpg)</small>
:::
::: portrait

Carl Friedrich Gauss, by C. A. Jensen (1840)\
<small>Public domain, [Wikimedia Commons](https://commons.wikimedia.org/wiki/File:Carl_Friedrich_Gauss_1840_by_Jensen.jpg)</small>
:::
:::
The normal curve started as a shortcut for calculation. Abraham de Moivre was a French Protestant refugee in London. He taught mathematics and gave advice to gamblers.
De Moivre needed binomial probabilities for large numbers of trials, and these sums were too long to calculate by hand. In a Latin pamphlet of 12 November 1733, he showed that a smooth curve approximates the binomial. We now call this curve the normal curve. An English version is in the second edition of his book [*The Doctrine of Chances*](https://archive.org/details/bim_eighteenth-century_the-doctrine-of-chances_moivre-abraham-de_1738) (1738).
Astronomers then used the curve for errors of measurement. Adrien-Marie Legendre published the **method of least squares** in 1805, in an appendix to a book on the orbits of comets. In [*Theoria motus corporum coelestium*](https://archive.org/details/bub_gb_ORUOAAAAQAAJ) (1809), Carl Friedrich Gauss gave the method a basis in probability. He showed that if measurement errors follow the curve $e^{-h^2 x^2}$, least squares gives the most probable values. Gauss also said that he used least squares from 1795. Legendre did not accept this claim.
Gauss was already famous at this time. In 1801 the asteroid Ceres went behind the Sun, and astronomers lost it. His calculation of its orbit let them find Ceres again at the end of that year.
::: portrait

Pierre-Simon Laplace, by Paulin Guérin (1838)\
<small>Public domain, [Wikimedia Commons](https://commons.wikimedia.org/wiki/File:Pierre-Simon_Laplace.jpg)</small>
:::
Pierre-Simon Laplace explained why the normal curve occurs so frequently. In a memoir of 1810, and again in [*Théorie analytique des probabilités*](https://archive.org/details/theorieanalytiqu0000mlec) (1812), he proved an early **central limit theorem**. The sum of many small independent errors is approximately normal, whatever the distribution of each error. Because of this theorem, statisticians of the next century compared almost any large-sample average with the normal curve.
```{r}
#| label: fig-demoivre
#| fig-cap: "De Moivre's approximation: the binomial distribution for 100 tosses of a fair coin, and a normal curve with the same mean and SD."
#| fig-height: 3
tibble(k = 30:70, p = dbinom(k, 100, 0.5)) |>
ggplot(aes(k, p)) + geom_col(fill = "grey75") +
stat_function(fun = \(x) dnorm(x, 50, 5), colour = "firebrick", linewidth = 1) +
labs(x = "number of heads in 100 tosses", y = "probability")
```
## 1835–1846: Quetelet's average man
::: portrait

Adolphe Quetelet, by Joseph-Arnold Demannez\
<small>Public domain, [Wikimedia Commons](https://commons.wikimedia.org/wiki/File:Adolphe_Qu%C3%A9telet_by_Joseph-Arnold_Demannez.jpg)</small>
:::
Adolphe Quetelet was a Belgian astronomer. He applied the error curve of the astronomers to people. In [*Sur l'homme*](https://archive.org/details/surlhommeetled00quet) (1835) he described *l'homme moyen*, the "average man". In his model, nature aims at an ideal man and misses by random errors.
His best-known example appeared in 1846. He used the chest circumferences of 5,738 Scottish soldiers, from a table in the Edinburgh Medical and Surgical Journal (1817). A normal curve fits these data well. Many scientists of the time took this example as proof that the "law of error" was a law of nature.
```{r}
#| label: fig-quetelet
#| fig-cap: "Quetelet's Scottish soldiers: chest circumference (inches) and a fitted normal curve."
#| fig-height: 3
m <- weighted.mean(ChestSizes$chest, ChestSizes$count)
s <- sqrt(weighted.mean((ChestSizes$chest - m)^2, ChestSizes$count))
ggplot(ChestSizes, aes(chest, count)) + geom_col(fill = "grey75") +
stat_function(fun = \(x) sum(ChestSizes$count) * dnorm(x, m, s), colour = "firebrick", linewidth = 1) +
labs(x = "chest circumference (inches)", y = "number of soldiers",
subtitle = sprintf("n = %s, mean = %.1f in, SD = %.1f in", format(sum(ChestSizes$count), big.mark = ","), m, s))
```
## 1837 and 1898: Poisson and the Prussian cavalry
::: portrait-pair
::: portrait

Siméon Denis Poisson\
<small>Public domain, [Wikimedia Commons](https://commons.wikimedia.org/wiki/File:Simeon_Poisson_(cropped).jpg)</small>
:::
::: portrait

Ladislaus von Bortkiewicz\
<small>Public domain, [Wikimedia Commons](https://commons.wikimedia.org/wiki/File:Ladislaus_Bortkiewicz.jpg)</small>
:::
:::
Siméon Denis Poisson derived his distribution in 1837. The book is about the probability that a court gives a correct verdict. Its title is [*Recherches sur la probabilité des jugements en matière criminelle et en matière civile*](https://archive.org/details/recherchessurlap00pois). The Poisson distribution is the limit of the binomial when the number of trials is large and the probability of each event is small. De Moivre gave almost the same limit in 1711. This is one more example of Stigler's law of eponymy: no discovery has the name of its discoverer.
Few people used the distribution until 1898. In that year Ladislaus von Bortkiewicz published [*Das Gesetz der kleinen Zahlen*](https://archive.org/details/dasgesetzderklei00bortrich) (*The Law of Small Numbers*). His best-known table gives the number of soldiers that horses kicked to death in the Prussian army from 1875 to 1894. Most analyses, and Fisher's analysis, use the data for 10 army corps: 200 corps-years with 122 deaths. Each death is rare and independent of the others. These are the conditions for a Poisson distribution, and the Poisson fit is close.
```{r}
#| code-fold: false
deaths <- as.numeric(names(HorseKicks)); lambda <- sum(deaths * HorseKicks) / sum(HorseKicks)
rbind(observed = as.vector(HorseKicks), `Poisson (mean 0.61)` = round(200 * dpois(deaths, lambda), 1))
```
## 1870s–1880s: Galton, the quincunx and regression
::: portrait-pair
::: portrait

Francis Galton, c. 1890\
<small>Public domain, [Wikimedia Commons](https://commons.wikimedia.org/wiki/File:Sir_Francis_Galton,_circa_1890.jpg)</small>
:::
::: {.portrait .wide}

Galton's quincunx, from [*Natural Inheritance*](https://archive.org/details/naturalinherita00galt) (1889)\
<small>Public domain, [Wikimedia Commons](https://commons.wikimedia.org/wiki/File:Quincunx_(Galton_Box)_-_Galton_1889_diagram.png)</small>
:::
:::
Francis Galton was a half-cousin of Charles Darwin. In 1873 he built the **quincunx**, which we now also call a Galton board. Balls fall through rows of pins. At each pin a ball goes left or right at random. At the bottom, the balls make a bell shape.
The quincunx is a physical model of the result of de Moivre. Galton described it in 1877 and again in [*Natural Inheritance*](https://archive.org/details/naturalinherita00galt) (1889).
Galton studied heredity. He compared the heights of parents with the heights of their adult children. Tall parents had tall children, but the children were less tall than their parents. Galton called this effect "[regression towards mediocrity](https://doi.org/10.2307/2841583)" ([Journal of the Anthropological Institute](https://doi.org/10.2307/2841583), 1886).
We still use the word *regression* for linear models. In 1888 Galton defined the **correlation** coefficient ([Proceedings of the Royal Society](https://doi.org/10.1098/rspl.1888.0082)). Karl Pearson later gave it its modern product-moment form.
The name "normal" did not come from one person. Charles S. Peirce (1873), Wilhelm Lexis (1877) and Galton (1877) used it independently. Galton preferred the term "law of deviation". Karl Pearson made "normal curve" the standard term.
```{r}
#| label: fig-galton
#| fig-cap: "Galton's family heights (928 adult children). The fitted line (red) is less steep than the line of equality (dashed). This is regression to the mean."
#| fig-height: 3.6
ggplot(Galton, aes(parent, child)) + geom_count(colour = "steelblue", alpha = 0.6, show.legend = FALSE) +
geom_abline(slope = 1, intercept = 0, linetype = "dashed") +
geom_smooth(method = "lm", formula = y ~ x, se = FALSE, colour = "firebrick") +
labs(x = "mid-parent height (inches)", y = "child height (inches)")
```
## Before Student: large samples, probable errors and the z-test
In the nineteenth century, a test usually compared an observed difference with its standard error. The ratio then went to the normal curve. Today we call this a **z-test**. No one person invented it. It came from the error theory of Laplace and Gauss.
Authors usually gave the **probable error**, $0.6745\,\sigma$, instead of the standard deviation. The probable error is half the width of the central 50% of a normal distribution. By convention, a deviation of approximately three probable errors showed a real effect. In 1885 Francis Ysidro Edgeworth used the word "significant" in this sense ("[Methods of statistics](https://books.google.com/books?id=MqI_AQAAMAAJ&pg=PA181)", Journal of the Statistical Society, Jubilee volume).
Later, Fisher gave the convention in the units that we use today. In [*Statistical Methods for Research Workers*](https://psychclassics.yorku.ca/Fisher/Methods/) (1925) he wrote:
> "The value for which P = .05, or 1 in 20, is 1.96 or nearly 2; it is convenient to take this point as a limit in judging whether a deviation is to be considered significant or not."
He also wrote that three probable errors ($3 \times 0.6745 = 2.02$) is "effectively equivalent" to two standard errors. Thus the 5% level is a convenience from the probable-error period. No law of nature sets it.
The z-test has one assumption that became important. It uses the sample standard deviation as if it were the true standard deviation. For a large sample, the error from this assumption is small. For a sample of four or five observations, the error is large. Gosset studied this problem (see 1908, below).
## 1863–1922: the chi-square distribution and test
::: portrait-pair
::: portrait

Friedrich Robert Helmert\
<small>Public domain, [Wikimedia Commons](https://commons.wikimedia.org/wiki/File:Friedrich_Robert_Helmert,_ante_1917_-_Accademia_delle_Scienze_di_Torino_0140.jpg)</small>
:::
::: portrait

Karl Pearson, 1910\
<small>Public domain, [Wikimedia Commons](https://commons.wikimedia.org/wiki/File:Karl_Pearson,_1910_(cropped).jpg)</small>
:::
:::
In 1863 the physicist Ernst Abbe found the distribution of a sum of squared normal errors. The German geodesist Friedrich Robert Helmert found it again in 1875–1876, together with the distribution of the sample variance. Few statisticians knew these results. Karl Pearson found the distribution again in 1900.
Pearson was a mathematician at University College London. He introduced the term **standard deviation** in a lecture in 1893 and in print in 1894. In 1901 he and W. F. R. Weldon started the journal [Biometrika](https://academic.oup.com/biomet), with support from Galton. In 1900 Pearson published the **chi-square goodness-of-fit test** in the [Philosophical Magazine](https://doi.org/10.1080/14786440009463897). The title of the paper was "[On the criterion that a given system of deviations from the probable in the case of a correlated system of variables is such that it can be reasonably supposed to have arisen from random sampling](https://doi.org/10.1080/14786440009463897)".
$$
\chi^2 = \sum \frac{(\text{observed} - \text{expected})^2}{\text{expected}}
$$
One of his examples used the dice of Weldon. Weldon threw 12 dice 26,306 times. For each throw, he counted the dice that showed a 5 or a 6. If the dice are fair, this count is binomial with $n = 12$ and $p = 1/3$. Our calculation below rejects this model. The dice gave 5s and 6s a little more frequently than fair dice give them.
```{r}
#| code-fold: false
counts <- as.vector(WeldonDice) # 0, 1, ..., 9, 10+ fives-or-sixes
p <- dbinom(0:12, 12, 1/3); p <- c(p[1:10], sum(p[11:13]))
chisq.test(counts, p = p)
```
Pearson made one error. For a contingency table, he used the number of cells minus one as the degrees of freedom. In 1922 the young R. A. Fisher showed that an $r \times c$ table has $(r-1)(c-1)$ degrees of freedom. His paper was "[On the interpretation of χ² from contingency tables, and the calculation of P](https://doi.org/10.2307/2340521)" ([Journal of the Royal Statistical Society](https://doi.org/10.2307/2340521)). Pearson did not accept the correction. The two men stayed enemies until Pearson died in 1936.
## 1908: Student's t-test
::: portrait-pair
::: portrait

William Sealy Gosset ("Student")\
<small>Public domain, [Wikimedia Commons](https://commons.wikimedia.org/wiki/File:William_Sealy_Gosset.jpg)</small>
:::
::: portrait

Guinness brewery gate, St James's Gate, Dublin\
<small>Photo: Karlunun. CC0, [Wikimedia Commons](https://commons.wikimedia.org/wiki/File:Guinness_BreweryGate_ThomasSt_Dublin_225_IMG_20250805_0812.jpg)</small>
:::
:::
William Sealy Gosset studied chemistry and mathematics at Oxford. In 1899 he started work at the Guinness brewery in Dublin. Guinness wanted to use science to make its beer. Gosset did experiments on barley, hops and yeast, often with only a few plots or a few batches. The large-sample methods of the time gave incorrect answers for these data. With four or five numbers, the sample standard deviation itself has a large error.
In 1906–07 Guinness sent Gosset to the laboratory of Karl Pearson in London. In 1908 Gosset published "[The Probable Error of a Mean](https://doi.org/10.1093/biomet/6.1.1)" ([Biometrika](https://doi.org/10.1093/biomet/6.1.1), vol. 6) with the pen name **"Student"**. Guinness let its staff publish scientific work only if they did not give their names. A frequent story says that this rule came after an employee disclosed trade secrets. We know of no document that supports this story.
### What Student did
Student used the statistic $z = (\bar{x} - \mu)/s$. Here $s$ is the sample SD with divisor $n$. He found the distribution of $z$ for samples from a normal population. He got its mathematical form partly from its moments, but he could not prove it. Thus he did a check by simulation.
He used the measurements of 3,000 criminals from W. R. Macdonell ([Biometrika](https://doi.org/10.1093/biomet/1.2.177), 1902). He wrote the height and the left middle-finger length of each man on a card. Then he shuffled the cards and took 750 samples of 4. The code below does his experiment again with the same data.
```{r}
#| label: fig-gosset
#| fig-cap: "Gosset's 1908 experiment, done again: 750 random samples of 4 from the heights of 3,000 criminals. The histogram of z agrees with Student's curve (red). It does not agree with the normal curve that a large-sample z-test assumes (dashed)."
#| fig-height: 3.4
heights <- rep(Macdonell$height, Macdonell$frequency) # 3,000 men, as on Gosset's cards
mu <- mean(heights)
shuffled <- sample(heights) # shuffle the cards
z <- sapply(split(shuffled, rep(1:750, each = 4)), function(x) {
s <- sqrt(mean((x - mean(x))^2)) # Student's divisor n
(mean(x) - mu) / s
})
student_z <- function(z, n = 4) sqrt(n - 1) * dt(z * sqrt(n - 1), df = n - 1) # since t = z * sqrt(n - 1)
ggplot(tibble(z = z[abs(z) < 4]), aes(z)) +
geom_histogram(aes(y = after_stat(density)), binwidth = 0.2, fill = "grey75") +
stat_function(fun = student_z, colour = "firebrick", linewidth = 1) +
stat_function(fun = \(z) dnorm(z, 0, 1 / sqrt(4)), linetype = "dashed") + # z if s were the true sigma
labs(x = expression(z == (bar(x) - mu) / s), y = "density")
```
Student's curve has thicker tails than the normal curve. If you use $s$ as if it were the true $\sigma$ (the dashed curve), a small-sample result looks more significant than it is.
### Student's example: the `sleep` data
The R `sleep` dataset is the worked example of Student. The data came from a 1905 paper by Arthur Cushny and Alvin Peebles in the [Journal of Physiology](https://doi.org/10.1113/jphysiol.1905.sp001097). They gave two sleep drugs to patients and recorded the hours of extra sleep. Student analysed the ten paired differences.
Student also gave the drugs incorrect names. He called them D- and L-hyoscyamine, but the two columns are L-hyoscyamine and L-hyoscine, two different compounds. The R help page repeats this error.
```{r}
#| code-fold: false
with(sleep, t.test(extra[group == 2], extra[group == 1], paired = TRUE))
```
In 1907 Gosset also wrote a [Biometrika](https://doi.org/10.1093/biomet/5.3.351) paper on the error when you count yeast cells with a haemacytometer. In it he derived the Poisson distribution himself, without reference to Poisson.
### From z to t
In 1912 Ronald Fisher was 22 and a new Cambridge graduate. He sent Gosset a full proof of the distribution, with the geometry of $n$-dimensional space. Fisher published the proof in 1915, in his [Biometrika](https://doi.org/10.1093/biomet/10.4.507) paper on the distribution of the correlation coefficient. Fisher then wrote the statistic of Student in a new form:
$$
t = z\sqrt{n-1} = \frac{\bar{x} - \mu}{s/\sqrt{n}}, \quad s \text{ with divisor } n-1.
$$
This form agrees with the Fisher concept of **degrees of freedom**. With it, one table serves the one-sample, paired and two-sample tests, and the tests for regression coefficients. The letter *t* first appeared in print in 1925. It is in two papers in the journal Metron, "[Applications of Student's distribution](https://digital.library.adelaide.edu.au/server/api/core/bitstreams/0ca65584-9fa4-4d25-9c2e-9f934ea0d83b/content)" by Fisher and the new tables of Student. It is also in [*Statistical Methods for Research Workers*](https://psychclassics.yorku.ca/Fisher/Methods/) by Fisher.
Gosset was modest about his tables. In the early 1920s he sent Fisher a copy and wrote that Fisher was "the only man that's ever likely to use them!"
Gosset stayed a brewer for all of his life. In 1935 he became Head Brewer of the new Guinness brewery at Park Royal, London. In 1937 he became Head Brewer of all Guinness. He died on 16 October 1937.
### Unequal variances
The two-sample test of Student assumes that the two groups have the same variance. W.-V. Behrens described the general problem in 1929, and Fisher discussed it in 1935. B. L. Welch (Biometrika, [1938](https://doi.org/10.1093/biomet/29.3-4.350) and [1947](https://doi.org/10.1093/biomet/34.1-2.28)) and F. E. Satterthwaite ([Biometrics Bulletin](https://doi.org/10.2307/3002019), 1946) gave an approximate solution with fractional degrees of freedom. The R function `t.test()` uses this solution by default. Thus its output says "Welch Two Sample t-test".
## 1918–1934: Fisher, Rothamsted and the F-test
::: portrait-pair
::: portrait

Ronald Aylmer Fisher, 1913\
<small>Public domain, [Wikimedia Commons](https://commons.wikimedia.org/wiki/File:Youngronaldfisher2.JPG)</small>
:::
::: portrait

George W. Snedecor\
<small>Public domain, [Wikimedia Commons](https://commons.wikimedia.org/wiki/File:1915-george-snedecor.jpg)</small>
:::
:::
Fisher introduced the word **variance** in 1918. [His paper](https://doi.org/10.1017/s0080456800012163) showed that Mendelian genetics can explain the continuous variation that Galton measured. In 1919 Fisher started work at Rothamsted Experimental Station, an agricultural research station north of London. His first task was to analyse decades of crop records.
At Rothamsted he developed the **analysis of variance**. The method divides the total variation in yield into parts for fertilisers, varieties and blocks, plus a residual. Then it compares each part with the residual. The first ANOVA tables appeared in 1923. One of them was in [a study](https://doi.org/10.1017/s0021859600003592) by Fisher and Winifred Mackenzie on the response of potato varieties to manure.
To compare two variances, Fisher used
$$
z = \tfrac{1}{2} \ln \frac{s_1^2}{s_2^2}.
$$
He gave the distribution of $z$ in [a paper](https://digital.library.adelaide.edu.au/server/api/core/bitstreams/83c1d9c8-b142-4ab4-a590-1b2f79ded4c3/content) at the International Congress of Mathematicians in Toronto in 1924 (printed in 1928). His book [*Statistical Methods for Research Workers*](https://psychclassics.yorku.ca/Fisher/Methods/) (1925) gave these methods and tables to scientists who did experiments. The book had 14 editions.
The logarithm in $z$ made the mathematics easier, but it made the tables harder to use. Prasanta Chandra Mahalanobis founded the Indian Statistical Institute in Kolkata in 1931. In 1932 he published tables of the variance ratio itself. In 1934 George W. Snedecor, director of the Statistical Laboratory at Iowa State College, did the same in a booklet that many people used. Snedecor called the ratio **F**, in honour of Fisher:
$$
F = \frac{s_1^2}{s_2^2} = e^{2z}.
$$
Fisher preferred his own $z$. The new letter did not please him, although Snedecor intended it as a compliment. The letter *F* stayed in use.
The F-test and the t-test have a close relation. For two groups, the ANOVA F statistic is equal to the square of the equal-variance t statistic.
```{r}
#| code-fold: false
tt <- t.test(extra ~ group, data = sleep, var.equal = TRUE) # the two groups as independent samples
ft <- anova(lm(extra ~ group, data = sleep))
c(t_squared = unname(tt$statistic^2), F = ft$`F value`[1])
```
## 1935: the lady tasting tea
The book [*The Design of Experiments*](https://archive.org/details/designofexperime0000rona) (1935) by Fisher starts with a lady. She says that she can identify the cups where the milk went in first. Fisher designs a test.
The lady gets eight cups in random order, four of each type. She must find the four milk-first cups. If she only guesses, each choice of four cups has the same probability. Then the probability that she finds all four is $1/\binom{8}{4} = 1/70 \approx 0.014$.
This is **Fisher's exact test**. Frank Yates (1934) and J. O. Irwin (1935) published the same test independently. Fisher did not give the name of the lady. Later accounts say that she was Muriel Bristol, an algae biologist at Rothamsted. The story that she identified all the cups correctly comes from later anecdotes, not from Fisher.
The principles of the book are more important than the tea: **randomisation**, replication and blocking. Randomisation makes the reference distribution of the test valid.
```{r}
#| code-fold: false
tea <- matrix(c(4, 0, 0, 4), 2, dimnames = list(poured = c("milk first", "tea first"),
guessed = c("milk first", "tea first")))
fisher.test(tea, alternative = "greater")$p.value
```
## 1928–1933: Neyman and Pearson, two types of error
::: portrait

Jerzy Neyman\
<small>Photo: Konrad Jacobs, MFO. [CC BY-SA 2.0 de](https://creativecommons.org/licenses/by-sa/2.0/de/deed.en), [Wikimedia Commons](https://commons.wikimedia.org/wiki/File:Jerzy_Neyman2.jpg)</small>
:::
A significance test of Fisher has one hypothesis and gives one number, the P-value. Jerzy Neyman, a Polish mathematician, and Egon Pearson, the son of Karl Pearson, asked a different question: which test is the best? In papers in [Biometrika](https://doi.org/10.1093/biomet/20A.1-2.175) (1928) and the [Philosophical Transactions of the Royal Society](https://doi.org/10.1098/rsta.1933.0009) (1933), they added an **alternative hypothesis**. They also defined two types of mistake. An error of the first kind (now Type I) rejects a true null hypothesis. An error of the second kind (Type II) accepts a false null hypothesis.
The **power** of a test is the probability that it rejects a false null hypothesis. The Neyman–Pearson lemma shows that the likelihood ratio gives the most powerful test. Fisher did not accept this framework. He compared it to acceptance procedures in industry, not to scientific inference. The argument between Fisher and Neyman continued until Fisher died in 1962. Modern practice uses parts of both: the P-values of Fisher, and the fixed $\alpha = 0.05$, power and sample-size calculations of Neyman and Pearson.
## 1945–1947: tests without the normal distribution
Frank Wilcoxon was a chemist at the American Cyanamid company. He wanted a fast test that did not assume a normal distribution. In "[Individual comparisons by ranking methods](https://doi.org/10.2307/3001968)" ([Biometrics Bulletin](https://doi.org/10.2307/3001968), 1945), he replaced the data with their ranks. This gave the **rank-sum** and **signed-rank** tests. In 1947 Henry Mann and Donald Whitney extended the rank-sum test to samples of different sizes ([Annals of Mathematical Statistics](https://doi.org/10.1214/aoms/1177730491)). See the [animated Wilcoxon rank-sum test](animations/wilcoxon_rank_sum.html).
## Sources and further reading
- Stigler, S. M. (1986). [*The History of Statistics: The Measurement of Uncertainty before 1900*](https://www.hup.harvard.edu/books/9780674403413). Harvard University Press.
- Hald, A. (1998). [*A History of Mathematical Statistics from 1750 to 1930*](https://openlibrary.org/isbn/0471179124). Wiley.
- Salsburg, D. (2001). [*The Lady Tasting Tea*](https://openlibrary.org/isbn/0716741067). W. H. Freeman.
- Box, J. F. (1978). [*R. A. Fisher: The Life of a Scientist*](https://openlibrary.org/isbn/0471093009). Wiley.
- Ziliak, S. T. (2008). [Guinnessometrics: the economic foundation of "Student's" t](https://doi.org/10.1257/jep.22.4.199). [Journal of Economic Perspectives](https://doi.org/10.1257/jep.22.4.199) 22(4): 199–216.
- Eisenhart, C. (1979). [On the transition from "Student's" z to "Student's" t](https://doi.org/10.1080/00031305.1979.10482643). [The American Statistician](https://doi.org/10.1080/00031305.1979.10482643) 33(1): 6–10.
- Senn, S. and Richardson, W. (1994). [The first t-test](https://doi.org/10.1002/sim.4780130802). [Statistics in Medicine](https://doi.org/10.1002/sim.4780130802) 13(8): 785–803.
- Kruskal, W. and Stigler, S. M. (1997). [Normative terminology: "normal" in statistics and elsewhere](https://doi.org/10.1093/oso/9780198523413.003.0006). In *Statistics and Public Policy*, Oxford University Press.
- Miller, J. [Earliest Known Uses of Some of the Words of Mathematics](https://mathshistory.st-andrews.ac.uk/Miller/mathword/).
- Student (1908). [The probable error of a mean](https://doi.org/10.1093/biomet/6.1.1). [Biometrika](https://doi.org/10.1093/biomet/6.1.1) 6(1): 1–25.
- Fisher, R. A. (1925). [*Statistical Methods for Research Workers*](https://psychclassics.yorku.ca/Fisher/Methods/), full text.
- Data: R packages `HistData` (Arbuthnot, Quetelet, Macdonell, Galton) and `vcd` (Bortkiewicz, Weldon).