Skip to main content

1  The history of the tests

Each test in this book has an inventor and a date. The table gives both, with the chapter and the lecture that cover the test.

Year Who What Chapter Lecture
1710 John Arbuthnot First significance test: 82 years of London christenings Chapter 3 L02
1733 Abraham de Moivre The normal curve, as an approximation to the binomial Chapter 3 L02
1805–1810 Legendre, Gauss, Laplace Least squares, the normal law of error, the central limit theorem Chapter 11 L04
1837 Siméon Denis Poisson The Poisson distribution, as a limit of the binomial Chapter 20 L10
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) Chapter 8 L11
1877–1888 Francis Galton Quincunx, regression, correlation Chapter 11, Chapter 14 L04, L06
1885 F. Y. Edgeworth “Significant” with its statistical meaning Chapter 2 L02
1898 Ladislaus von Bortkiewicz Horse kicks and the “law of small numbers” Chapter 8 L11
1900 Karl Pearson The chi-square goodness-of-fit test Chapter 8 L11
1908 W. S. Gosset (“Student”) The small-sample test for a mean: Student’s distribution Chapter 4 L02
1915 R. A. Fisher A full proof of Student’s distribution Chapter 4 L02
1922 R. A. Fisher The correct degrees of freedom for contingency tables Chapter 8 L11
1923–1925 R. A. Fisher Analysis of variance, the z distribution, t, Statistical Methods for Research Workers Chapter 12, Chapter 14 L06
1928–1933 Neyman and E. S. Pearson Two types of error, and power Chapter 2 L02
1932–1934 Mahalanobis, Snedecor Tables of the variance ratio, and the name F Chapter 14, Chapter 15 L06
1934–1944 Bliss, Fisher, Berkson Probits and logits for dose–response data Chapter 20 L09, L10
1935 R. A. Fisher The Design of Experiments: the lady tasting tea, the exact test Chapter 9 L11
1937–1957 Pitman, Dwass Permutation tests for any statistic, and random shuffles Chapter 7 L11
1938–1947 Welch, Satterthwaite The t-test for unequal variances (the R default) Chapter 4 L03
1945–1947 Wilcoxon, Mann and Whitney Rank tests Chapter 5, Chapter 6 L03
1958 Kaplan and Meier The survival curve for censored times Chapter 21 –
1966–1972 Mantel; Peto and Peto The log-rank test Chapter 21 –
1972 Nelder and Wedderburn Generalised linear models Chapter 20 L09, L10
1972–1975 David Cox The proportional hazards model and the partial likelihood Chapter 22 –

1.1 1710: Arbuthnot and the first significance test

John Arbuthnot, by Godfrey Kneller (1723) Public domain, Wikimedia Commons

John Arbuthnot was born in 1667 in Arbuthnott, a village in Kincardineshire, Scotland. His father was an Episcopalian minister. After the revolution of 1688, the new Presbyterian church removed his father from the parish, and the family lost its income. The young Arbuthnot went to London and earned his living as a teacher of mathematics.

In 1692 he published Of the Laws of Chance, an English translation of a short Latin book on dice games by Christiaan Huygens. It was the first book on probability in English. In the preface, Arbuthnot wrote that the same calculation can apply to many chance events besides games. He took a medical degree at the University of St Andrews in 1696. The Royal Society elected him a Fellow in 1704.

In 1705 Prince George, the husband of Queen Anne, fell ill at Epsom. Arbuthnot treated him, and the queen then made him one of her physicians. At court he became a close friend of Jonathan Swift and Alexander Pope. Together they formed the Scriblerus Club, which mocked the pompous learning of the day. In 1712 Arbuthnot also created John Bull, the cartoon figure of the English nation.

His data came from the London bills of mortality. Each week the parish clerks counted the christenings and burials, and the city printed the totals. In 1662 John Graunt studied these bills and noticed that more boys than girls were born. Arbuthnot asked if chance alone can explain this excess.

He used the 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 1 in \(4.8 \times 10^{24}\).

Arbuthnot published the result in Philosophical Transactions in 1710. The title was An Argument for Divine Providence, taken from the constant Regularity observ’d in the Births of both Sexes. He concluded that the excess of boys came from divine design. Men die more often in wars and dangerous work, he argued, so the extra boys keep the numbers of adult men and women equal. From this he also concluded that polygamy is against the law of nature.

A modern significance test uses the same logic. We assume a null hypothesis and calculate the probability of the data under it. If that probability is small, we reject the hypothesis. Today we call his method a sign test.

Show code
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)
Figure 1.1: Arbuthnot’s data: the ratio of male to female christenings in London. The ratio is more than 1 in all 82 years.
binom.test(sum(Arbuthnot$Ratio > 1), nrow(Arbuthnot), alternative = "greater")$p.value
[1] 2.067952e-25

1.2 1733–1812: de Moivre, Gauss, Laplace and the normal curve

Abraham de Moivre
Public domain, Wikimedia Commons

Carl Friedrich Gauss, by C. A. Jensen (1840)
Public domain, Wikimedia Commons

The normal curve started as a shortcut for calculation. Abraham de Moivre was born in 1667 in Champagne, France, to a Protestant family. In 1685 Louis XIV revoked the Edict of Nantes, and France made the Protestant faith illegal. The authorities put de Moivre in prison for his religion. After his release he escaped to London, where he lived for the rest of his life.

In London he was safe, and he never got a university post. He earned his living as a private tutor of mathematics and walked from pupil to pupil. A story says that he tore pages from Newton’s Principia and read them on these walks.

In the afternoons he sat at Slaughter’s Coffee House in St Martin’s Lane. There gamblers and insurers paid him to calculate the odds of their bets and annuities. A story says that Newton himself sent questions to him: “Go to Mr de Moivre; he knows these things better than I do.”

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, the normal curve, approximates the binomial. An English version is in the second edition of his book The Doctrine of Chances (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 (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.

De Moivre never became rich. A story from his old age, probably a legend, says that he slept fifteen minutes longer each night. He calculated the day of a 24-hour sleep, and he died on that day in 1754.

Gauss was born in 1777 in Brunswick, the son of a labourer. His teachers saw his talent early, and the Duke of Brunswick paid for his education. On 1 January 1801 the astronomer Giuseppe Piazzi found a new object, the asteroid Ceres. After a few weeks Ceres went behind the Sun, and astronomers lost it. From only a few observations, Gauss calculated its orbit, and astronomers found Ceres again at the end of that year. The calculation made him famous at the age of 24.

Pierre-Simon Laplace, by Paulin Guérin (1838)
Public domain, Wikimedia Commons

Pierre-Simon Laplace was born in 1749 in Normandy. His father traded in cider. At 19 he went to Paris with a letter of introduction to the mathematician d’Alembert. The story goes that d’Alembert gave him a hard problem, and Laplace returned with the solution within days. D’Alembert then found him a post as a teacher at the military school.

Laplace spent his life on the motions of the planets and on probability. He also returned to Arbuthnot’s question. He compared the births of boys and girls in Paris and London, and he calculated how certain the excess of boys was.

Laplace lived through the Revolution and served Napoleon for six weeks as minister of the interior in 1799. Napoleon then dismissed him. He later wrote that Laplace “looked for subtleties everywhere” and “brought the spirit of the infinitely small into administration”.

Laplace explained why the normal curve occurs so often. In a memoir of 1810, and again in Théorie analytique des probabilités (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.

None of these men called the curve “normal”. They spoke of the “law of error” or the “law of facility of errors”. Least squares leads to the “normal equations”. There the word means perpendicular, and it has no link to the curve. Charles Peirce used “normal” for the curve in 1873. Wilhelm Lexis and Francis Galton used it in 1877, apparently independently of him and of each other.

For them “normal” meant usual: the curve that data from nature commonly follow. Karl Pearson adopted the term in 1894. In 1920 he wrote: “Many years ago I called the Laplace-Gaussian curve the normal curve, which name, while it avoids an international question of priority, has the disadvantage of leading people to believe that all other distributions of frequency are in one sense or another ‘abnormal’.” Kruskal and Stigler traced the history of the word and concluded that Pearson remembered wrongly. He did not coin the name, although he made it standard.

Show code
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")
Figure 1.2: De Moivre’s approximation: the binomial distribution for 100 tosses of a fair coin, and a normal curve with the same mean and SD.

1.3 1835–1846: Quetelet’s average man

Adolphe Quetelet, by Joseph-Arnold Demannez
Public domain, Wikimedia Commons

Adolphe Quetelet was born in Ghent in 1796. In 1819 he took the first doctorate in science of the new University of Ghent, in mathematics. He also wrote poetry and an opera libretto. His main plan was an observatory for Brussels. In 1823 the government sent him to Paris to learn astronomy. There he met Laplace and Poisson, and he learned the new mathematics of probability.

The observatory took many years to build. In 1830 the Belgian Revolution started, and fighters used the half-built observatory as a position.

During these years Quetelet looked at a different kind of data: the official counts of births, deaths, marriages and crimes. He noticed that these totals stayed almost the same from year to year. A single crime is a free act of one person. The number of crimes in a country, Quetelet argued, is as regular as the orbit of a planet.

He applied the error curve of the astronomers to people. In Sur l’homme (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.

In Sur l’homme Quetelet also noted that the weight of adults grows with the square of their height. Later writers called weight divided by height squared the Quetelet index. In 1972 Ancel Keys and his colleagues compared several measures of body fat and gave this one a new name: the body mass index. Florence Nightingale also admired Quetelet, and she corresponded with him about her own hospital statistics.

Show code
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))
Figure 1.3: Quetelet’s Scottish soldiers: chest circumference (inches) and a fitted normal curve.

1.4 1837 and 1898: Poisson and the Prussian cavalry

Siméon Denis Poisson
Public domain, Wikimedia Commons

Ladislaus von Bortkiewicz
Public domain, Wikimedia Commons

Siméon Denis Poisson was born in 1781 in Pithiviers, France. His family sent him to an uncle to train as a surgeon, but he was too clumsy with his hands. In 1798 he entered the École Polytechnique in Paris, where Lagrange and Laplace soon noticed him. A story says that he described his life in one sentence: “Life is good for only two things: discovering mathematics and teaching mathematics.”

France changed the majority that a jury needed for a conviction several times in the 1830s. Poisson wanted to calculate how each rule changed the chance of convicting an innocent person. He derived his distribution in 1837, as a side result of this work. In the same book he gave the name “law of large numbers” to an older theorem of Jacob Bernoulli. The title is Recherches sur la probabilité des jugements en matière criminelle et en matière civile.

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. Stigler’s law of eponymy says that no scientific discovery has the name of its first discoverer, and the Poisson distribution follows the law.

Few people used the distribution until 1898. Ladislaus von Bortkiewicz was born in St Petersburg in 1868 to a family of Polish descent. He studied in Göttingen under the statistician Wilhelm Lexis and later became a professor in Berlin. He wanted to show that rare events in large populations follow a regular law. In 1898 he published Das Gesetz der kleinen Zahlen (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.

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))
                     [,1] [,2] [,3] [,4] [,5]
observed            109.0 65.0 22.0  3.0  1.0
Poisson (mean 0.61) 108.7 66.3 20.2  4.1  0.6

1.5 1863–1922: the chi-square distribution and test

Friedrich Robert Helmert
Public domain, Wikimedia Commons

Karl Pearson, 1910
Public domain, Wikimedia Commons

The chi-square distribution with \(k\) degrees of freedom is the distribution of a sum of \(k\) squared standard normal variables, \(Z_1^2 + \dots + Z_k^2\). Its mean is \(k\) and its variance is \(2k\). Astronomers and surveyors needed it first. They wanted to know how much the sum of their squared errors can vary from one series of measurements to the next.

set.seed(1876)
sums <- replicate(10000, sum(rnorm(4)^2))   # sum of 4 squared standard normals
c(mean = mean(sums), variance = var(sums))
    mean variance 
4.001773 7.843352 

For 4 degrees of freedom, the simulated mean is 4 and the simulated variance is 7.84. The theory gives 4 and 8. The sum is above 9.49 in 4.9% of the simulations. The value 9.49 is the 5% point of the chi-square distribution with 4 degrees of freedom, qchisq(0.95, 4).

In 1863 the physicist Ernst Abbe found the distribution of a sum of squared normal errors. He gave it in his habilitation thesis at the University of Jena. Abbe later ran the Carl Zeiss optical works in Jena and designed the optics of its microscopes. M. G. Kendall described this work in Biometrika in 1971.

The German geodesist Friedrich Robert Helmert found the distribution again in 1875 and 1876. Helmert measured the shape of the Earth, and he needed to know the errors of his survey lines. In the Zeitschrift für Mathematik und Physik (1876, volume 21, pages 192–219), he found the distribution of the sample variance \(s^2\) of \(n\) normal observations. The scaled value \((n - 1)s^2/\sigma^2\) follows a chi-square distribution with \(n - 1\) degrees of freedom. The estimated mean uses one degree of freedom. German authors called the result the Helmert distribution (Hald 1998, in the sources below).

Few statisticians in England read these results. Karl Pearson found the distribution again in 1900, independently.

Karl Pearson was born in London in 1857. He studied mathematics at Cambridge and then law, physics and German literature in Germany. He also wrote about socialism and the position of women. In 1884 he became professor of applied mathematics at University College London. His book The Grammar of Science (1892) argued that science only describes what we observe.

A zoologist brought Pearson to statistics. W. F. R. Weldon, his colleague at University College, measured thousands of shore crabs from Plymouth and Naples. Some of the distributions had a long tail or two peaks, and the normal curve did not fit them. Weldon asked Pearson for help. To answer him, Pearson built new families of curves and new methods to fit and test them.

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, with support from Galton.

In 1900 Pearson published the chi-square goodness-of-fit test in the Philosophical Magazine. 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”.

The name comes from Pearson’s notation. He wrote the exponent of the multivariate normal density as \(-\tfrac{1}{2}\chi^2\), and he used the same symbol for his test statistic. The distribution then took its name from the test (Plackett, International Statistical Review, 1983). In 1931 Pearson gave Helmert the priority for the distribution of the sample standard deviation, in a historical note in Biometrika.

\[ \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 often than fair dice give them.

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)

    Chi-squared test for given probabilities

data:  counts
X-squared = 35.494, df = 10, p-value = 0.0001028

Pearson’s paper had 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” (Journal of the Royal Statistical Society). Pearson did not accept the correction. The two men stayed enemies until Pearson died in 1936.

Yates and Cochran later set the rules that we use today. In 1934 Frank Yates, Fisher’s colleague at Rothamsted, proposed a continuity correction for 2 × 2 tables with small counts (Supplement to the Journal of the Royal Statistical Society). The R function chisq.test() applies it by default. William Cochran examined when the chi-square approximation is accurate, in the Annals of Mathematical Statistics (1952) and in Biometrics (1954). His advice is the source of the rule that most expected counts must be at least 5. Chapter 8 uses these tests on clinical data.

1.6 1870s–1880s: Galton, the quincunx and regression

Francis Galton, c. 1890
Public domain, Wikimedia Commons

Galton’s quincunx, from Natural Inheritance (1889)
Public domain, Wikimedia Commons

Francis Galton was born in Birmingham in 1822, a half-cousin of Charles Darwin. He started to study medicine, and then he took an ordinary degree in mathematics at Cambridge in 1844. That same year his father died and left him a fortune, so he never needed a job. He became an explorer. In 1850–1852 he travelled through what is now Namibia, and the Royal Geographical Society gave him its gold medal. He then wrote The Art of Travel, a handbook for explorers, and drew the first weather map printed in a newspaper (The Times, 1875).

Galton liked to count and measure. He counted fidgets in an audience to measure boredom, and he later made fingerprints into a method of identification. In 1859 Darwin published On the Origin of Species. Galton read it and turned to heredity for the rest of his life.

In 1883 he invented the word “eugenics” for the plan to improve humans by selective breeding. Pearson and Fisher shared this belief. Laws for forced sterilisation in the United States and in Nazi Germany later drew on the movement.

In 1873 Galton 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 (1889).

Galton first studied heredity with sweet peas. In 1875 he sent packets of seeds of seven sizes to friends around Britain, and they grew them and returned the new seeds. The large seeds gave smaller offspring, and the small seeds gave larger offspring. Then he wanted the same data for people. He offered cash prizes for family records of height, and families sent him the measurements of parents and children. Women are shorter than men, so Galton multiplied each female height by 1.08 before he compared them.

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” (Journal of the Anthropological Institute, 1886).

We still use the word regression for linear models. In 1888 Galton defined the correlation coefficient (Proceedings of the Royal Society). Karl Pearson later gave it its modern product-moment form. For the normal curve, Galton preferred the term “law of deviation”.

Show code
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)")
Figure 1.4: 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.

1.7 1885: large samples, probable errors and the z-test

In the nineteenth century, most tests divided an observed difference by its standard error and compared the ratio with the normal curve. Today we call this a z-test. It grew out of the error theory of Laplace and Gauss.

Most authors 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, an Irish economist who later became a professor at Oxford, used the word “significant” in this sense (“Methods of statistics”, 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 (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. The 5% level comes from this convention of the probable-error period.

The z-test 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).

1.8 1908: Student’s t-test

William Sealy Gosset (“Student”)
Public domain, Wikimedia Commons

Guinness brewery gate, St James’s Gate, Dublin
Photo: Karlunun. CC0, Wikimedia Commons

William Sealy Gosset was born in Canterbury in 1876. He studied chemistry and mathematics at Oxford. In 1899 he started work at the Guinness brewery in Dublin. At that time Guinness was the largest brewery in the world. It hired science graduates from Oxford and Cambridge and called them “brewers”. Its customers expected every bottle of stout to taste the same.

The brewery needed to know which barley and hops gave a constant product. 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” (Biometrika, 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.

The rule hid only the name of the author, so Gosset could still publish the mathematics. Guinness gained from its scientist brewers, and it did not want rival breweries to learn that it used statistics (Ziliak, 2008). For this reason, the paper could not name Guinness or use brewery data. Gosset took his examples from other sources: the heights of criminals and a trial of sleep drugs (see below). Every scientist with a few measurements had the small-sample problem, so the problem was no trade secret. Gosset also wanted experts to check his result, and Biometrika was their journal.

The pen name hid Gosset only from readers. Pearson, as the editor, knew who Student was, and Fisher later wrote to Gosset under his real name.

1.8.1 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. So he checked it by simulation.

He used the measurements of 3,000 criminals from W. R. Macdonell (Biometrika, 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.

Show code
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")
Figure 1.5: 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).

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.

1.8.2 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. They gave several sleep drugs to patients and recorded the hours of extra sleep. Student took two of the drugs and 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.

with(sleep, t.test(extra[group == 2], extra[group == 1], paired = TRUE))

    Paired t-test

data:  extra[group == 2] and extra[group == 1]
t = 4.0621, df = 9, p-value = 0.002833
alternative hypothesis: true mean difference is not equal to 0
95 percent confidence interval:
 0.7001142 2.4598858
sample estimates:
mean difference 
           1.58 

In 1907 Gosset also wrote a Biometrika paper on the error when you count yeast cells with a haemacytometer. In it he derived the Poisson distribution himself, without reference to Poisson.

1.8.3 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 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” by Fisher and the new tables of Student. It is also in Statistical Methods for Research Workers 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.

1.8.4 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 and 1947) and F. E. Satterthwaite (Biometrics Bulletin, 1946) gave an approximate solution with fractional degrees of freedom. The R function t.test() uses this solution by default, and its output says “Welch Two Sample t-test”.

1.9 1918–1934: Fisher, Rothamsted and the F-test

Ronald Aylmer Fisher, 1913
Public domain, Wikimedia Commons

George W. Snedecor
Public domain, Wikimedia Commons

Ronald Aylmer Fisher was born in London in 1890. He had poor eyesight. His doctors told him not to read by electric light, so his tutors taught him mathematics without paper or pen. He learned to solve problems in his head, as pictures of geometry. This habit stayed with him, and later readers often found his short proofs hard to follow.

He studied mathematics at Cambridge and graduated in 1912. When the First World War started, the army rejected him because of his eyes. He spent the war as an unhappy schoolteacher and farmed in his spare time.

In 1919 he had two offers. Karl Pearson offered him a post at the Galton Laboratory. John Russell, the director of Rothamsted, offered him a temporary post to study old crop data. Fisher chose Rothamsted, and he stayed there for 14 years.

Fisher introduced the word variance in 1918. His paper 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.

Rothamsted grew wheat on the Broadbalk field from 1843, with different fertilisers on each strip. The old data had a fault, because nobody planned them for a fair comparison. To fix this, Fisher started to plan the experiments himself.

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 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 at the International Congress of Mathematicians in Toronto in 1924 (printed in 1928). His book Statistical Methods for Research Workers (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 was a physicist from Calcutta (now Kolkata). In 1913 he went to King’s College, Cambridge, to study physics. Before he sailed home in 1915, his tutor showed him some volumes of Biometrika in the college library. Mahalanobis bought a full set and read them on the ship to India.

Back in Calcutta, he used statistics on the problems around him, such as floods in Orissa and crop yields in Bengal. He founded the Indian Statistical Institute in 1931. In 1932 he published tables of the variance ratio itself.

George W. Snedecor taught mathematics at Iowa State College, in the farm state of Iowa. He started a Statistical Laboratory there to help the agricultural scientists. In 1931 he invited Fisher to teach at Iowa State for the summer. In 1934 Snedecor also published tables of the variance ratio, 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, and the letter F stayed in use.

For two groups, the ANOVA F statistic is equal to the square of the equal-variance t statistic.

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])
t_squared         F 
 3.462627  3.462627 

1.10 1928–1933: Neyman and Pearson, two types of error

Jerzy Neyman
Photo: Konrad Jacobs, MFO. CC BY-SA 2.0 de, Wikimedia Commons

Jerzy Neyman was born in 1894 in Bendery, then in the Russian Empire, to a Polish family. He studied mathematics in Kharkiv. After the war between Poland and Soviet Russia, he moved to Poland, and in 1925 a fellowship took him to Karl Pearson’s laboratory in London. There he met Egon Pearson, Karl’s son. Egon was shy and lived in the shadow of his famous father. The two young men became friends and worked together for the next ten years, mostly by letter between Warsaw and London.

In 1933 Karl Pearson retired, and University College divided his department into two. Egon Pearson became head of statistics, and Fisher became professor of eugenics. The two departments shared one building, and their staff did not get along. Neyman joined Egon in London in 1934. In 1938 he moved to the University of California at Berkeley, where he founded the Statistical Laboratory. It grew into the Department of Statistics in 1955.

A significance test of Fisher has one hypothesis and gives one number, the p-value. Neyman and Egon Pearson asked which test is the best. In papers in Biometrika (1928) and the Philosophical Transactions of the Royal Society (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 said that it suited acceptance testing in a factory and had no place in scientific research. 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.

1.11 1934–1972: probits, logits and generalised linear models

Linear regression assumes a continuous response with normal errors. Many responses in biology and medicine are proportions or counts: the number of insects that a poison kills, or the number of patients who recover.

Chester Bliss was an American entomologist who tested insecticides. Each experiment gave a dose, the number of insects exposed and the number that died. The proportion that died followed an S-shaped curve against the log dose.

In 1934 Bliss proposed in Science to transform each proportion into a probit: the point on the normal curve below which that proportion lies, plus 5. The 5 removed negative values from hand calculations. The probits then lie on a straight line against the log dose.

Ordinary least squares does not fit this line well. Each proportion has a different variance, and a proportion of 0 or 1 has an infinite probit. In 1935 Bliss published a long paper in the Annals of Applied Biology with an appendix by Fisher. Fisher fitted the curve by maximum likelihood. His method repeated a weighted least-squares regression on a “working probit” until the estimates did not change.

In 1944 Joseph Berkson, a physician and statistician at the Mayo Clinic, used the logistic curve in place of the normal curve (JASA). He named the transformed value the logit, \(\ln\{p/(1-p)\}\). In the 1960s statisticians also fitted log-linear models to the counts in contingency tables. Each of these models had a separate method of fit.

John Nelder succeeded Frank Yates as head of statistics at Rothamsted in 1968. Robert Wedderburn, a young Scottish statistician, worked in his department. In 1972 they published “Generalized linear models” in the Journal of the Royal Statistical Society, Series A. The paper showed that the normal, probit, logit and log-linear models are special cases of one model with three parts:

  1. a distribution for the response from the exponential family (normal, binomial, Poisson, gamma)
  2. a linear predictor, \(\eta = \beta_0 + \beta_1 x_1 + \dots + \beta_p x_p\)
  3. a link function \(g\) that connects the mean to the predictor, \(g(\mu) = \eta\).

Nelder and Wedderburn fitted all of them with one algorithm, iteratively reweighted least squares. It is the general form of Fisher’s 1935 probit method.

In 1974 Wedderburn extended the idea to quasi-likelihood, which needs only the relation between the mean and the variance. He died in 1975, at the age of 28, after an insect bite. Nelder’s group wrote GLIM, the first program for these models. The R function glm() follows the design of the 1972 paper. Chapter 20 uses it on clinical data.

Bliss’s 1935 paper includes a table of flour beetles exposed to carbon disulphide gas at eight doses. We fit his probit model and Berkson’s logit model to the same data.

beetles <- tibble(
  log_dose = c(1.6907, 1.7242, 1.7552, 1.7842, 1.8113, 1.8369, 1.8610, 1.8839),
  exposed  = c(59, 60, 62, 56, 63, 59, 62, 60),
  killed   = c(6, 13, 18, 28, 52, 53, 61, 60)
)
probit <- glm(cbind(killed, exposed - killed) ~ log_dose,
              family = binomial(link = "probit"), data = beetles)
logit  <- update(probit, family = binomial(link = "logit"))
ld50 <- function(m) unname(-coef(m)[1] / coef(m)[2])   # log dose that kills half
c(probit = ld50(probit), logit = ld50(logit))
  probit    logit 
1.770852 1.771721 

The two links give almost the same dose to kill half the beetles: 1.771 with the probit and 1.772 with the logit. The residual deviance is 10.1 for the probit and 11.2 for the logit, on 6 degrees of freedom. The probit has the lower deviance, so Bliss’s original choice fits these data slightly better.

1.12 1935: the lady tasting tea

Black and white photograph of Muriel Bristol, seated. Muriel Bristol

Rothamsted had an afternoon tea for its staff. Fisher’s daughter, Joan Fisher Box, tells the story in her biography of him. One afternoon in the 1920s Fisher offered a cup of tea to a colleague, the algae biologist Muriel Bristol. She refused it, because he poured the milk in after the tea. She said that she could taste the difference.

Fisher said that this was not possible. The chemist William Roach, who later married her, proposed that they test her.

The book The Design of Experiments (1935) by Fisher starts with this 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 described the same test in 1934 and credited the method to Fisher. J. O. Irwin found it independently and published it in 1935. Fisher did not give the name of the lady in his book, and he never reported her result. The story that she named every cup correctly comes from later anecdotes.

The book sets out the principles of experimental design: randomisation, replication and blocking. Randomisation makes the reference distribution of the test valid.

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
[1] 0.01428571

1.13 1937–1957: permutation tests

Black and white photograph of Charles Darwin, seated, in profile. Charles Darwin, by Maull and Fox (about 1854)
Public domain, Wikimedia Commons

The Design of Experiments also has a test without the normal distribution. Charles Darwin measured 15 pairs of maize plants, one crossed and one self-fertilised in each pair. Fisher changed the signs of the 15 differences in all \(2^{15}\) ways and calculated the sum each time. He compared the observed sum with these sums. Randomisation justified the test, with no assumption about the population.

E. J. G. Pitman, a professor of mathematics at the University of Tasmania, made the idea general in 1937 (Journal of the Royal Statistical Society). He showed that the relabellings give a valid test for the difference of two means. The test makes no assumption about the shape of the populations. For most data sets, the full list of relabellings was too long for hand calculation.

In 1957 Meyer Dwass proposed a random sample of the relabellings in place of the full list (Annals of Mathematical Statistics). Computers made this practical. Chapter 7 uses both the full list and the random shuffles.

1.14 1945–1947: tests without the normal distribution

Frank Wilcoxon was born in 1892 in Ireland, to American parents, and grew up in New York. He trained as a chemist. In the 1920s he worked at the Boyce Thompson Institute on chemicals that kill insects and fungi on crops. There he and his colleague W. J. Youden read Fisher’s Statistical Methods for Research Workers together in a small study group. In 1943 he moved to the American Cyanamid company.

His experiments gave many small sets of numbers, and some had outliers or skewed values. He wanted a fast test that did not assume a normal distribution. In “Individual comparisons by ranking methods” (Biometrics Bulletin, 1945), he replaced the data with their ranks. This gave the rank-sum and signed-rank tests. The paper has four pages.

In 1947 Henry Mann, a mathematician at Ohio State University, and his student Donald Whitney extended the rank-sum test to samples of different sizes (Annals of Mathematical Statistics). See the animated Wilcoxon rank-sum test.

1.15 1958: Kaplan, Meier and the survival curve

Black and white portrait photograph of Major Greenwood in a bow tie. Major Greenwood
CC BY 4.0, Wellcome Images, Wikimedia Commons

Medical statisticians estimated survival with the actuarial life table. Major Greenwood (Major was his first name) gave the variance of a life-table estimate in a 1926 report for the UK Ministry of Health, The Natural Duration of Cancer. This is Greenwood’s formula of Chapter 21.

In 1952 Paul Meier, at Johns Hopkins University, read Greenwood’s report. A year later Edward Kaplan, at Bell Telephone Laboratories, studied the lifetimes of vacuum tubes in the repeaters of undersea telephone cables. Both men studied at Princeton under John Tukey. Tukey told Kaplan about Meier’s work.

Each man sent a manuscript to the Journal of the American Statistical Association. The editor asked for one joint paper. In 1983 Kaplan told Eugene Garfield that the two men needed four years of letters to reconcile their approaches.

“Nonparametric estimation from incomplete observations” appeared in June 1958 (Journal of the American Statistical Association). It calls the estimate the product-limit estimate. By November 2017 the paper had 44,319 citations in the Web of Science (Stalpers and Kaplan, 2018).

1.16 1959–1975: the log-rank test and the Cox model

Nathan Mantel was a statistician at the US National Cancer Institute. In 1959 he and William Haenszel combined the 2 × 2 tables of several strata into one test (Journal of the National Cancer Institute). In 1966 Mantel used the same idea for survival data (Cancer Chemotherapy Reports 50: 163–170). He made a 2 × 2 table at each death and added the tables over time. In 1972 Richard Peto and Julian Peto gave the test the name “log-rank” (Journal of the Royal Statistical Society, Series A).

Black and white photograph of David Cox holding a pen in front of a board of equations. David Cox (1980)
Public domain, National Cancer Institute, Wikimedia Commons

David Cox was a professor of statistics at Imperial College London. In 1972 he read “Regression models and life-tables” to the Royal Statistical Society (Journal of the Royal Statistical Society, Series B). The model multiplies a baseline hazard of any shape by \(e^{x\beta}\). Cox estimated \(\beta\) from the conditional probability of each death, given the risk set.

In 1974 Norman Breslow gave a rule for tied deaths and an estimate of the baseline hazard (Biometrics). In 1975 Cox gave the theory of this partial likelihood (Biometrika). With one 0/1 covariate, the score test of the Cox model is the log-rank test. Chapter 22 derives this result.

1.17 Sources and further reading