Lecture notes · Introduction to Mathematical Statistics · Chapter 1

Chapter 1. Introduction: Lecture Notes

The first chapter of the book is an invitation rather than a body of theory. It separates the mathematics of statistics (the probability that justifies the methods) from its practice (collecting, analysing and interpreting data), contrasts descriptive with inferential statistics through three case studies, and sketches how probability and statistics met. These notes keep that proportion: a short overview, the three case studies with the computations the book leaves out (a log-linear law for earthquakes, a randomized block analysis of the full-moon data, and the exact mean and variance of the serial-number estimator in the German tank problem), a brief history, and a map of the rest of the course.

Course home Ch. 1 Introduction Ch. 2 Probability Ch. 3 Random variables Ch. 4 Special distributions Ch. 5 Estimation Ch. 6 Hypothesis testing Ch. 7 Normal-based inference Ch. 8 Types of data Ch. 9 Two-sample inference Ch. 10 Goodness of fit Ch. 11 Regression Ch. 12 Analysis of variance Ch. 13 Randomized blocks Ch. 14 Nonparametric statistics

How to use the gap boxes and selected questions

Each Filling the gap box completes a step or a proof the book leaves out, and each selected question asks you to apply the chapter. Try it yourself first. When you are stuck, open Hint 1; the next hint unlocks one minute after you open the previous one, so take one hint at a time and think about it before moving on: the key idea first, then the tools, then the steps, with intermediate results to aim for. The full proof or solution appears after the last hint and unlocks two minutes later: use it to check your own argument. If you use a generative AI assistant, use it the same way: ask for a hint or for the next step only, then check what it says against these notes (why I teach this way). Spotted a mistake? Use the Report an error link at the end of each box: confirmed errors are corrected and listed, with thanks, in the errata.

How to read these notes

They follow the book. Sections carry the book's numbers (1.1 to 1.4) and the case studies keep theirs (Case Study 1.2.1, 1.2.2, 1.2.3, Equations 1.2.1 and 1.2.2). Everything is written in new words; the book is cited for each result and each figure.

Filling the gaps. Where the book quotes a number or a formula and moves on, an orange Filling the gap box gives the full argument. Proofs and derivations start hidden: open one with its bar, or use the button below. Each gap box and each problem also has a ladder of graded hints.

Figures and demonstration. Figure 1.2.1 (the fitted earthquake law) is reproduced; two own figures (x1.1, x1.2) show the full-moon data and the sampling distribution of the tank estimator. The photograph, the die diagram and the facsimile of the 1665 bill of mortality (Figures 1.3.1 to 1.3.3) are pictures, not computations, and are not redrawn. All figures are computed by the Python code.

Main reference

R. J. Larsen and M. L. Marx, An Introduction to Mathematical Statistics and Its Applications, 6th edition, Pearson (2018), Chapter 1, pages 1–14. Section, case-study, figure and equation numbers below refer to this book. Further reading is listed in the references.

Companion courses

This chapter is an overview, so the companion material is the same overview at other levels and the places where its three examples are developed.

New here: the arithmetic of the earthquake extrapolation (Filling the gap 1.1), the randomized block analysis of the full-moon data behind the book's "unexpected" conclusion (1.2), the exact mean and variance of the serial-number estimator and the comparison with twice the sample mean (1.3, 1.4), and the problem of points (1.5).

Derivations start hidden: click any bar to open one.

1.1 An Overview

pp. 1–2 The book opens with a call, due to Francis Galton, for the measurement of everything that can be measured: a subject becomes a science once its phenomena are submitted to number. Today numbers are everywhere, in finance, in education, in polling and in entertainment, and some of the analyses built on them are careful, some flawed and some plainly nonsense. The point of a statistics course is to tell them apart.

The book divides its subject into two parts of unequal difficulty.

The two parts feed each other: a procedure is only as good as the match between its probabilistic assumptions and the way the data were produced. These notes spend most of their effort on the first part, as the book does, and flag the second whenever a case study invites it.

See also (companion courses): the first-year course covers the same ground informally, with demonstrations; Chapter 6 of the graduate course states what a statistical model, a parameter and an estimator are.

1.2 Some Examples

p. 2 Statistical methods fall into two families. Descriptive statistics summarises and displays the data in hand: bar charts, histograms, scatterplots, means and medians. Inferential statistics uses the data to draw conclusions about something larger (a population, a mechanism, the future) and, crucially, attaches a probability statement to how reliable the conclusion is. The three case studies of the section show one descriptive success and two inferential questions.

Case Study 1.2.1: frequencies of earthquakes

pp. 2–4 A seismograph produces a long list of occurrence times and magnitudes, which as raw numbers show no pattern. Grouping the shocks recorded in southern California over several years by magnitude and counting how many occur per year, the averages N at magnitudes R = 4.0, 4.5, ..., 7.0 are described remarkably well by the exponential law

\[ N = 80{,}338.16\,e^{-1.981R}, \tag{1.2.1} \]

found by a regression method taught in Chapter 11 (the book notes that this form, \(N=\beta_0e^{\beta_1R}\), holds all over the world with region-specific constants). The equation does more than summarise: it extrapolates. For the monster magnitude \(R=10.5\) it gives about \(7.4\times10^{-5}\) shocks a year, or one every 13,000 or so years.

Two panels. Left: a decreasing convex curve of the average number of shocks per year against Richter magnitude from 3.75 to 7.5, falling from about 35 near magnitude 3.75 to nearly zero by 7, with seven red markers at magnitudes 4 to 7 lying on it. Right: the same curve on a logarithmic vertical axis from one millionth to one thousand, a straight line falling from about 50 at magnitude 3.75 to about 3e-5 at magnitude 11, a shaded band marking the range of the data from 3.75 to 7.25, and an orange square at magnitude 10.5 near 7.4e-5 per year, once in 13,450 years.
Figure 1.2.1. The fitted law (1.2.1). Left: the curve on the book's scale, with its values at the book's magnitudes marked (the averages plotted in the book are not tabulated, so the markers are fitted values, not data). Right: the same curve on a logarithmic scale, where an exponential law is a straight line; the shaded band is the range of magnitudes that the data cover and the square is the extrapolation to magnitude 10.5. Reproduces Larsen and Marx (2018), Figure 1.2.1 (the fitted curve). Code: ch01_introduction.py, fig_1_2_1.

Filling the gap 1.1: the arithmetic and meaning of Equation 1.2.1 and its extrapolation pp. 3–4

Taking logarithms turns (1.2.1) into a straight line, \(\ln N=\ln\beta_0+\beta_1R\), with \(\ln\beta_0=\ln 80{,}338.16=11.294\) and \(\beta_1=-1.981\). Three consequences are worth reading off, and the printed prediction is worth recomputing.

Hint 1 of 5: the key idea

Which operation turns a product of an exponential into a sum, so that the law becomes a straight line? Once it is a line, what does its slope say about a step of one unit in the magnitude?

Hint 2 of 5: tools you will need
  • Logarithms: \(\ln(ab)=\ln a+\ln b\) and \(\ln e^x=x\).
  • Simple linear regression and least squares (graduate course, Section 13.2).
  • Base change \(\log_{10}x=\ln x/\ln 10\).
Hint 3 of 5: step 1

Compute \(N(R+\Delta)/N(R)\) for a step \(\Delta\). Aim for: a factor that does not depend on \(R\); evaluate it for \(\Delta=1\) and \(\Delta=0.5\).

Hint 4 of 5: step 2

Set \(N=1\) and solve for \(R\), then convert the slope to base 10. Aim for: a magnitude near 5.7 and a slope near 0.86.

Hint 5 of 5: step 3

Evaluate the exponent \(-1.981\times10.5\), add \(\ln 80{,}338.16\), exponentiate and invert. Compare with the printed 0.0000752. How far beyond the data does 10.5 lie, and what would you want besides a point prediction?

Proof and numbers

The rate per unit of magnitude. Raising the magnitude by \(\Delta\) multiplies \(N\) by \(e^{\beta_1\Delta}\): \(N(R+\Delta)/N(R)=e^{-1.981\Delta}\). For \(\Delta=1\) the factor is \(0.138\), that is, each extra unit of magnitude makes shocks about \(1/0.138=7.25\) times rarer; for \(\Delta=0.5\) it is \(0.371\). In base 10 the same law is \(\log_{10}N=\log_{10}\beta_0-bR\) with \(b=1.981/\ln10=0.860\), the form in which seismologists quote it (the Gutenberg–Richter law, in which \(b\) is close to 1 in most regions).

Where the rate is one per year. \(N=1\) when \(\ln\beta_0+\beta_1R=0\), that is \(R=11.294/1.981=5.70\): on average a magnitude-5.7 shock (to within the band \(\pm0.25\)) a year.

The megaquake. With \(R=10.5\): \(\beta_1R=-1.981\times10.5=-20.8005\), so \(\ln N=11.294-20.8005=-9.5065\) and \[ N=e^{-9.5065}=7.44\times10^{-5}\ \text{shocks per year},\qquad \frac1N\approx 13{,}450\ \text{years}. \] The book prints \(0.0000752\) and \(13{,}300\) years, about 1% higher in rate; the constants printed in (1.2.1) give \(7.44\times10^{-5}\), and the return period is, to the precision of the data, "once in about thirteen thousand years" either way.

How seriously to take it. The data cover magnitudes 4 to 7, and 10.5 lies 3.5 units beyond the largest of them, a factor of \(7.25^{3.5}\approx10^3\) in the rate. Extrapolation of a fitted curve this far assumes that the same law continues unchanged, which no goodness of fit inside the data range can guarantee. Physically it cannot: a magnitude far above anything on record would need a rupture longer than any known fault, so the exponential law must bend somewhere before 10.5. The book's comment is the statistical version of the same caution: (1.2.1) by itself carries no error estimate, so it is a description, not yet an inference; Chapter 11 adds the standard errors that turn it into one. ∎

See also (companion courses): simple linear regression and least squares in Chapter 13 of the graduate course; the regression chapter of this course (Chapter 11) fits the line to \(\ln N\) against \(R\).

Case Study 1.2.2: the full moon and emergency-room admissions

pp. 4–5 Folklore, and some medical authors, link the full moon with disturbed behaviour. The data are the daily admission rates to the emergency room of a mental health clinic in the week before, during and after each of twelve consecutive full moons (Table 1.2.1 of the book, August to July). The three averages are 10.9 (before), 13.3 (during) and 11.5 (after), and the "during" figure is the largest. The question is whether this is evidence of a lunar effect or whether differences of this size arise by chance alone when there is none. Choosing between those two explanations of a data set is the job of a hypothesis test, which the book calls the most important contribution of statistics to science; the right one here is the randomized block analysis of variance of Chapter 13.

Two panels. Left: three lines over the twelve months from August to July of admissions per day before, during and after the full moon; all three climb from about 6 in August to about 15 in the spring and summer, and the line for during the full moon is the most jagged, from 5 in August to 25 in April. Right: twelve red dots for the difference during minus before, eight above zero up to about 9.6 and four below zero down to about minus 2.7, and a black square at the mean 2.4 with an error bar of plus or minus about 1.1.
Figure x1.1. The data of Table 1.2.1. Left: the month-to-month level changes much more (from about 6 to 15 patients a day) than the full-moon effect, which is why comparing the three columns within each month (a block) is the right design. Right: the within-month difference between the full-moon week and the week before, with its mean and standard error. Own figure. Data: Case Study 1.2.2. Code: ch01_introduction.py, fig_x1_1.

Filling the gap 1.2: the randomized block analysis of Table 1.2.1 p. 5

The book defers the test to Chapter 13 and says only that the conclusion is "unexpected". Here is the computation. Let \(y_{ij}\) be the rate for moon phase \(i\) (\(i=1,2,3\): before, during, after) in month \(j\) (\(j=1,\dots,12\)), with the model \(y_{ij}=\mu+\alpha_i+\beta_j+\varepsilon_{ij}\), \(\varepsilon_{ij}\) iid \(\N(0,\sigma^2)\), \(\sum_i\alpha_i=0=\sum_j\beta_j\). The hypothesis "no lunar effect" is \(H_0:\alpha_1=\alpha_2=\alpha_3=0\), and the month effects \(\beta_j\) are nuisance terms that absorb the large month-to-month drift.

Hint 1 of 6: the key idea

Split every observation's departure from the grand mean into three pieces: the phase effect, the month effect and what is left. Which cross-products vanish, and why does that make the sums of squares add?

Hint 2 of 6: tools you will need
  • The decomposition \(y_{ij}-\bar y_{\cdot\cdot}\) into phase, month and residual parts, and the fact that deviations from a mean sum to zero.
  • The \(\chi^2\) distribution (graduate course, Section 10.3) and the ratio of independent scaled \(\chi^2\) variables, the \(F\) distribution.
  • Paired comparisons (first-year notes, Section 8).
Hint 3 of 6: part (a): the identity

Show the cross-product of two of the three pieces vanishes by summing first over the index on which one factor does not depend. Aim for: \(SS_{\rm tot}=SS_{\rm phase}+SS_{\rm month}+SS_E\) with the multipliers 12 and 3.

Hint 4 of 6: part (b): degrees of freedom

Count free quantities: 3 phase means with one constraint, 12 month means with one constraint, 36 cells. Aim for: 2, 11 and 22 degrees of freedom for phase, month and error.

Hint 5 of 6: part (c): the test

Compute the three column means, the sums of squares and the ratio of the phase and error mean squares. Aim for: \(F\) a little above 3 on (2, 22) degrees of freedom; compare with the 5% critical value 3.44.

Hint 6 of 6: part (d): why blocks

Recompute \(F\) after pooling the month and error sums of squares into one 'within' term (33 degrees of freedom). What happens to the evidence, and what does that say about the design?

Proof and numbers

The decomposition. With \(\bar y_{i\cdot}\), \(\bar y_{\cdot j}\), \(\bar y_{\cdot\cdot}\) the phase means, month means and grand mean, write \[ y_{ij}-\bar y_{\cdot\cdot}=(\bar y_{i\cdot}-\bar y_{\cdot\cdot})+(\bar y_{\cdot j}-\bar y_{\cdot\cdot})+(y_{ij}-\bar y_{i\cdot}-\bar y_{\cdot j}+\bar y_{\cdot\cdot}). \] Square and sum over all 36 cells. Each cross-product vanishes. For instance, in the product of the first and third terms the first factor does not depend on \(j\), and the third sums to zero over \(j\) for each fixed \(i\); the other two pairs are treated the same way, using the sums over \(i\) or over \(j\) of the third term and of the deviations \(\bar y_{i\cdot}-\bar y_{\cdot\cdot}\) and \(\bar y_{\cdot j}-\bar y_{\cdot\cdot}\). Hence \[ SS_{\text{tot}}=SS_{\text{phase}}+SS_{\text{month}}+SS_E,\qquad SS_{\text{phase}}=12\sum_i(\bar y_{i\cdot}-\bar y_{\cdot\cdot})^2,\quad SS_{\text{month}}=3\sum_j(\bar y_{\cdot j}-\bar y_{\cdot\cdot})^2. \]

The sampling distribution. Under \(H_0\), and for Normal errors, \(SS_{\text{phase}}/\sigma^2\) and \(SS_E/\sigma^2\) are independent \(\chi^2\) variables with \(2\) and \(2\times11=22\) degrees of freedom (Cochran's theorem applied to the orthogonal decomposition above; its proof belongs with the analysis of variance of the later chapters), so \[ F=\frac{SS_{\text{phase}}/2}{SS_E/22}\sim F_{2,22}. \]

The numbers. The phase means are \(10.92\), \(13.33\) and \(11.46\) (the book rounds them to 10.9, 13.3, 11.5), the grand mean is \(11.90\), and

sourcesum of squaresd.f.mean squareF
phase (before, during, after)38.60219.303.21
month (blocks)451.081141.016.83
error132.07226.00
total621.7535

The observed \(F=3.21\) has \(P(F_{2,22}\ge3.21)=0.060\). The 5% critical value is \(3.44\), so the test does not reject "no lunar effect" at the usual level: the surprise is that the visible 2.4 patients a day excess in the full-moon week is the kind of difference chance produces about one time in seventeen. (The book's own Chapter 13 later analyses these data twice: this overall test does not reject, while a contrast of the full-moon week against the average of the other two weeks gives \(F=6.1\) on 1 and 22 degrees of freedom and does, so the two questions give opposite verdicts at the 5% level. For two phases only, \(F\) equals the square of the paired \(t\) statistic; for "during" against "before", \(t=2.13\) on 11 degrees of freedom, \(p=0.057\), the same verdict.)

Why block. The month totals vary hugely (\(F=6.83\), \(p<0.001\)). A one-way analysis that ignores months puts that variation into the error and gets \(F=1.09\), \(p=0.35\): the lunar signal is then buried. Blocking compares the three phases within each month, which is exactly what Figure x1.1 shows, and moves the evidence from nothing to borderline. Failing to reach significance is not proof of no effect, only a statement that these twelve months do not demonstrate one. ∎

See also (companion courses): paired and two-sample comparisons, and the logic of a test, in Section 8 and Section 4 of the first-year notes; the \(F\) distribution and tests in Chapter 10 of the graduate course.

Case Study 1.2.3: the German tank problem

pp. 5–6 In the Second World War the Allies captured German weapons and noticed that each carried a different serial number, plausibly the chronological order of manufacture. If so, the serial numbers in hand are a sample from \(1,2,\dots,N\), where \(N\) is the unknown total output. With \(n\) captured items and largest serial number \(x_{\max}\), the book gives the estimate

\[ \widehat N=\frac{n+1}{n}\,x_{\max}-1. \tag{1.2.2} \]

For five tanks with serial numbers 92, 14, 28, 300 and 146, \(x_{\max}=300\), so \(\widehat N=\tfrac65\cdot300-1=359\). After the war the true production figures showed that serial-number estimates were far closer than the figures from conventional intelligence: for German tank output in 1942 the serial-number estimate was about 3,400, close to the real figure, against an intelligence estimate of 18,000 (the intelligence figures were inflated by deliberate propaganda; the serial numbers could not be).

Why the formula? The largest serial number is a lower bound for \(N\), so \(x_{\max}\) alone is always too small. Equation (1.2.2) adds the typical gap between consecutive serial numbers, \(x_{\max}/n\), and subtracts one so that the estimator is correct on average. The book says only that the result follows from Chapter 5; the next two boxes show exactly what is true.

Filling the gap 1.3: Equation 1.2.2 is unbiased, with variance \((N+1)(N-n)/(n(n+2))\) p. 6

Claim. Draw \(n\) serial numbers without replacement and uniformly from \(\{1,\dots,N\}\) and let \(M\) be the largest. Then \[ \E M=\frac{n(N+1)}{n+1},\qquad \V M=\frac{n(N+1)(N-n)}{(n+1)^2(n+2)}, \] so \(\widehat N=\frac{n+1}{n}M-1\) satisfies \(\E\widehat N=N\) and \(\V\widehat N=\dfrac{(N+1)(N-n)}{n(n+2)}\).

Hint 1 of 6: the key idea

The largest of \(n\) numbers drawn from \(\{1,\dots,N\}\) equals \(m\) exactly when \(m\) is drawn and the other \(n-1\) numbers lie below it. Can you count those subsets, and then sum \(m\) times the count?

Hint 2 of 6: tools you will need
  • Counting subsets and binomial coefficients (graduate course, Section 1.4).
  • The identities \(m\binom{m-1}{n-1}=n\binom mn\) and the hockey-stick sum \(\sum_{m}\binom mn=\binom{N+1}{n+1}\).
  • \(\V M=\E M^2-(\E M)^2\), here via \(\E[M(M+1)]\) (Section 3.3).
Hint 3 of 6: step 1

Write \(\P(M=m)\) and check it sums to 1. Aim for: \(\binom{m-1}{n-1}/\binom Nn\) for \(m=n,\dots,N\).

Hint 4 of 6: step 2

Compute \(\E M\) with the two identities. Then form \(\frac{n+1}n\E M-1\). Aim for: \(\E M=n(N+1)/(n+1)\), hence unbiasedness.

Hint 5 of 6: step 3

For the variance, compute \(\E[M(M+1)]\) the same way but with a shifted binomial coefficient. Aim for: \(n(N+1)(N+2)/(n+2)\).

Hint 6 of 6: step 4

Combine with \(\V M=\E[M(M+1)]-\E M-(\E M)^2\) over a common denominator, putting \(a=N+1\) to keep the algebra short, and finish with the factor \(((n+1)/n)^2\).

Proof

Distribution of \(M\). All \(\binom Nn\) subsets are equally likely. The largest element equals \(m\) (\(n\le m\le N\)) exactly when \(m\) is in the subset and the other \(n-1\) elements come from \(\{1,\dots,m-1\}\), so \(\P(M=m)=\binom{m-1}{n-1}/\binom Nn\). In particular these sum to 1.

Mean. Use \(m\binom{m-1}{n-1}=n\binom mn\) and the hockey-stick identity \(\sum_{m=n}^N\binom mn=\binom{N+1}{n+1}\) (count the \((n+1)\)-subsets of \(\{1,\dots,N+1\}\) by their largest element, \(m+1\)): \[ \E M=\frac{n}{\binom Nn}\sum_{m=n}^N\binom mn=\frac{n\binom{N+1}{n+1}}{\binom Nn}=\frac{n(N+1)}{n+1}, \] because \(\binom{N+1}{n+1}=\frac{N+1}{n+1}\binom Nn\). Therefore \(\E\widehat N=\frac{n+1}n\cdot\frac{n(N+1)}{n+1}-1=N\).

Second moment. Use \(M(M+1)\binom{M-1}{n-1}=n(n+1)\binom{M+1}{n+1}\) (apply \(m\binom{m-1}{n-1}=n\binom mn\), then \((m+1)\binom mn=(n+1)\binom{m+1}{n+1}\)) and \(\sum_{m=n}^N\binom{m+1}{n+1}=\binom{N+2}{n+2}\): \[ \E[M(M+1)]=\frac{n(n+1)\binom{N+2}{n+2}}{\binom Nn}=\frac{n(N+1)(N+2)}{n+2}. \]

Variance. Put \(a=N+1\). Then \(\V M=\E[M(M+1)]-\E M-(\E M)^2=\frac{na(a+1)}{n+2}-\frac{na}{n+1}-\frac{n^2a^2}{(n+1)^2}\). Over the common denominator \((n+1)^2(n+2)\) the numerator is \(na\,[(a+1)(n+1)^2-(n+1)(n+2)-na(n+2)]\); the terms in \(a\) in the bracket give \(a[(n+1)^2-n(n+2)]=a\) and the rest gives \((n+1)^2-(n+1)(n+2)=-(n+1)\), so the bracket equals \(a-(n+1)=N-n\), and \(\V M=\dfrac{n(N+1)(N-n)}{(n+1)^2(n+2)}\). Finally \(\V\widehat N=\bigl(\frac{n+1}n\bigr)^2\V M\). ∎

For the book's five tanks with \(N=360\) the standard deviation of the estimate is \(\sqrt{361\cdot355/35}\approx60\), so an estimate such as 359 is typically off by about 60 tanks, about 17% of the total. With the estimate itself plugged into the variance formula one gets an approximate standard error, the idea Chapter 5 develops properly. It is also known (Lehmann–Scheffé theorem, not proved here) that (1.2.2) has the smallest variance among all unbiased estimators of \(N\).

Two histograms of 40,000 simulated estimates of N equal to 360 from five captured tanks. Left, for the serial-number estimate: a distribution with a long tail to the left and a sharp cut-off at 431, mean 360 and standard deviation 61, with the true value 360 and the book's example estimate 359 marked. Right, for twice the sample mean minus one: a symmetric bell-shaped distribution from about 100 to 640, mean 360 and standard deviation 93.
Figure x1.2. Sampling distributions of two unbiased estimators of the total number of tanks, \(N=360\), from \(n=5\) captured. The serial-number estimate (1.2.2) (left) is skewed, with a hard upper limit at \(\tfrac65\cdot360-1=431\), but concentrated; twice the sample mean minus one (right) is symmetric but about 50% more variable. Own figure. Code: ch01_introduction.py, fig_x1_2.

Filling the gap 1.4: why not twice the sample mean? p. 6

The most obvious alternative is the method of moments: the mean serial number of the full output is \((N+1)/2\), so \(\widehat N_{\rm mom}=2\bar X-1\). It is also unbiased, but its variance is larger by the factor \((n+2)/3\).

Hint 1 of 5: the key idea

The draws are not independent, but the sum of all \(N\) serial numbers is a constant. What does that force the covariance between two draws to be?

Hint 2 of 5: tools you will need
  • \(\V\bigl(\sum X_i\bigr)=\sum\V X_i+\sum_{i\ne j}\Cov(X_i,X_j)\) (graduate course, Section 3.3).
  • Exchangeability: all pairs have the same covariance.
  • \(\sum_{k=1}^Nk^2=N(N+1)(2N+1)/6\).
  • The variance from gap 1.3.
Hint 3 of 5: step 1

Find \(\E X\) and \(\V X\) for one uniform draw. Aim for: \((N+1)/2\) and \((N^2-1)/12\).

Hint 4 of 5: step 2

Take the sample of size \(N\): the total is constant, so its variance is 0. Solve for \(c=\Cov(X_i,X_j)\). Aim for: \(c=-\sigma^2/(N-1)\).

Hint 5 of 5: step 3

Use \(c\) in \(\V\bar X\) for a sample of size \(n\), multiply by 4, and divide by the variance of the maximum-based estimator. Aim for: a ratio that depends on \(n\) alone.

Proof

Unbiasedness: for one draw uniform on \(\{1,\dots,N\}\), \(\E X=(N+1)/2\) and \(\V X=\sigma^2=(N^2-1)/12\) (a standard sum). For a sample of size \(n\) without replacement, \(\E\bar X=(N+1)/2\), hence \(\E(2\bar X-1)=N\).

Variance: the draws are exchangeable, not independent. Let \(c=\Cov(X_i,X_j)\) for \(i\ne j\). If \(n=N\) the sum \(X_1+\dots+X_N=N(N+1)/2\) is constant, so \(0=N\sigma^2+N(N-1)c\), that is \(c=-\sigma^2/(N-1)\); by exchangeability the same \(c\) holds for any sample size. Then \[ \V(\bar X)=\frac1{n^2}\bigl[n\sigma^2+n(n-1)c\bigr]=\frac{\sigma^2}{n}\Bigl(1-\frac{n-1}{N-1}\Bigr)=\frac{\sigma^2}n\cdot\frac{N-n}{N-1}=\frac{(N+1)(N-n)}{12\,n}, \] and \(\V(2\bar X-1)=4\V\bar X=\dfrac{(N+1)(N-n)}{3n}\). Dividing the variance of (1.2.2) from Filling the gap 1.3 by this, \[ \frac{\V\widehat N}{\V\widehat N_{\rm mom}}=\frac{(N+1)(N-n)/(n(n+2))}{(N+1)(N-n)/(3n)}=\frac3{n+2}. \]

For \(n=1\) the two estimators coincide (ratio 1); for \(n=2\) the ratio is 3/4; for \(n=5\) it is 3/7 (standard deviations 60.5 against 92.4 when \(N=360\), as in Figure x1.2), and the advantage of the maximum grows without bound with \(n\). The reason is that for the uniform distribution the maximum carries most of the information about the upper endpoint, while the sample mean uses all the serial numbers equally and wastes most of it. Both variances vanish at \(n=N\) (every tank captured). ∎

▶ DemoThe German tank problem: five tanks out of 360Simulate many captures; compare the two estimators with the exact standard deviations 60.5 and 92.4.
▶ DemoCapture almost everything: N = 100, n = 90With sampling without replacement the variance falls like \(N-n\).

See also (companion courses): bias, variance and mean squared error in the first-year estimators demonstration and Section 1 of the first-year notes; the Uniform endpoint estimator in the graduate course, where it is the standard non-regular example (Section 9.4).

1.3 A Brief History

pp. 6–13 Probability and statistics began separately, in different places, for different reasons. The book tells the story in two parts and then joins them; here is the same arc in outline, with the dates that matter.

Probability: the early years

Games of chance are older than writing: excavations all over the ancient world turn up huge numbers of astragali, the heel bones of sheep, used as dice, and throws of them were read as oracles; clay dice date from before 2000 BC. The dice games of the Middle Ages (hazard, a forerunner of craps) and the cards that arrived in the fourteenth century gave gambling a central place in European life, and yet no mathematics of chance appeared for two thousand years. The book offers two cultural explanations: Greek thinkers distrusted quantifying events that belonged to the "heavenly plane" and preferred reasoning to experiment, and the early Church saw no such thing as chance, only hidden providence.

The revival is attributed to Gerolamo Cardano (born 1501), a physician, gambler and prolific writer, who formulated what is now the classical definition of probability: if a trial has \(n\) equally likely outcomes of which \(m\) make an event occur, its probability is \(m/n\). For a fair die and the event "at least 5", \(m=2\), \(n=6\) and the probability is \(1/3\). It was the first recorded theoretical, as opposed to empirical, probability. His book was written in the sixteenth century but printed only in 1663, by which time the centre of gravity had moved to France.

The conventional birthdate of the subject is 1654, when the gambler the Chevalier de Méré put questions, the most famous being the problem of points, to Blaise Pascal, who corresponded with Pierre de Fermat. Their exchange solved the problem and set out general principles; Christiaan Huygens learned of it, and in 1657 published the first textbook of probability, which stayed standard for almost fifty years.

Filling the gap 1.5: the problem of points pp. 9–10

Two players stake equal amounts on a series of fair games, the first to win six games taking the whole pot. The series is interrupted when A has won 5 and B has won 3. How should the pot be divided? The book states the answer, 7/8 to A, with the hint "what scenarios would lead to A winning six games first?". More generally, if A still needs \(a\) wins and B needs \(b\), A should receive the fraction \[ \sum_{k=a}^{a+b-1}\binom{a+b-1}{k}2^{-(a+b-1)}. \]

Hint 1 of 5: the key idea

The fair share is the chance of winning had the series continued. How many further games would certainly settle it, and what is true if you pretend that exactly that many are played?

Hint 2 of 5: tools you will need
  • Equally likely outcomes and counting sequences of wins (graduate course, Section 1.4).
  • The binomial distribution for the number of wins in a fixed number of games.
  • Complements: \(\P(A)=1-\P(A^c)\).
Hint 3 of 5: step 1

With A needing one win and B three, how many games settle the contest at most? Aim for: a number, and the argument that after that many games someone has reached the target.

Hint 4 of 5: step 2

List the equally likely sequences of that length and say for each who wins the contest. Which single sequence favours B? Aim for: the fraction 7/8.

Hint 5 of 5: step 3

For general needs \(a\) and \(b\), repeat with \(a+b-1\) games. Aim for: A wins if and only if he wins at least \(a\) of them, giving the binomial tail.

Proof

Fermat's idea: the fair share of a player is the probability that he would win the pot had the play continued, so the task is to compute that probability. Here A needs \(a=1\) win and B needs \(b=3\). Whatever the actual course of the series, pretend that three more games are played in any case (the extra games change nothing about who reaches six first: the winner is decided as soon as a player gets his last needed win, and the later games are irrelevant). There are \(2^3=8\) equally likely sequences of winners. A reaches six first exactly when he wins at least one of the three: if he wins any game he has his sixth win before B can have three more, and if he wins none B has his three wins and is first. Only the sequence BBB favours B, so \(\P(\text{A wins})=1-(1/2)^3=7/8\) and A receives \(7/8\) of the pot.

For general \(a,b\): at most \(a+b-1\) further games are needed to decide the contest, since after that many games either A has won \(a\) or B has won \(b\) (otherwise the totals would be at most \(a-1\) and \(b-1\), adding to \(a+b-2\)). Pretending that exactly \(a+b-1\) games are played, A wins the contest if and only if he wins at least \(a\) of them, which has the binomial probability above. For fair games every sequence has probability \(2^{-(a+b-1)}\); for a game won by A with probability \(p\) the term is \(\binom{a+b-1}{k}p^k(1-p)^{a+b-1-k}\) (Problem 1.3). ∎

Statistics: from Aristotle to Quetelet

Modern statistics grew out of three separate traditions that merged in the middle of the nineteenth century.

The matchmaker was Adolphe Quetelet (died 1874), a Belgian astronomer and sociologist fascinated by the regularity of social aggregates (crime, births and deaths from year to year), who championed the use of probability theory on such data; Gauss in Germany (least squares, 1809) and Laplace in France (the central limit theorem, 1810) did the same for the physical sciences. With the data of political arithmetic and the tools of probability in one place, statistics as we know it was ready.

After 1874 (not in the book). Galton, a cousin of Darwin, introduced regression and correlation in the 1880s; Karl Pearson built the \(\chi^2\) test and the system of frequency curves; Ronald Fisher's 1922 paper on the foundations of theoretical statistics created the theory of estimation (maximum likelihood, sufficiency, efficiency) that Chapter 5 of this course introduces, and developed the analysis of variance and experimental design behind Chapters 12 and 13; and in 1933 Neyman and Pearson recast hypothesis testing as a decision problem (Chapter 6). For a full account see Stigler (1986) and Hald (1990).

yearevent
1501Cardano is born; later gives the first theoretical probability (published 1663)
1654Pascal and Fermat solve the problem of points
1657Huygens publishes the first treatise on probability
1662Graunt's analysis of the bills of mortality
1693Halley's life table
1749Achenwall first prints the word "statistics"
1809, 1810Gauss (least squares), Laplace (central limit theorem)
1874Quetelet dies; statistics is "at the brink of its modern era"

See also (companion courses): the law of large numbers and the central limit theorem that tie the two histories together, in Section 0.3 and Section 0.5 of the first-year notes, with a demonstration.

1.4 A Chapter Summary

p. 14 Probability is the foundation of every statistical procedure, which is why the next two chapters are on probability. The rest of the book, and of this course, then has the following shape.

ChapterTopicRole
2Probability: axioms, conditional probability, independence, combinatoricsmathematics
3Random variables, expectation, joint distributionsmathematics
4Special distributions (binomial, Poisson, normal, ...)mathematics
5Estimation: unbiasedness, efficiency, likelihoodstatistics proper starts
6Hypothesis testingstatistics proper
7Inference for the normal distribution (\(\chi^2\), \(t\), \(F\))the theory behind Chapters 9 to 13
8Types of data and experimental designpractice
9, 12, 13Comparing two populations, several populations, and randomized blocksapplications (Case Study 1.2.2 lives here)
10Goodness of fitmodel checking
11Regression (the fit in Case Study 1.2.1)applications
14Nonparametric statisticsfewer assumptions

The book's Chapter 15 on factorial designs is available only as a download and is outside this course. Chapters 5 and 6 are the conceptual core: most uses of statistics are an estimation problem (Case Studies 1.2.1 and 1.2.3), a testing problem (Case Study 1.2.2) or both. Each of this course's chapters repeats the format of this one: the book's text, the skipped steps filled in, a few demonstrations and selected questions with solutions. See the course home for the whole list.

Notes on the book

The arithmetic of the 1665 bill of mortality (Figure 1.3.3) p. 12

The summary of the bill reproduced in the book does not add up as printed. The christenings do (\(5114+4853=9967\)), but the burials by sex are \(58{,}569+48{,}737=107{,}306\), not \(97{,}306\); the burials in the four district groups (excluding the pesthouse), \(15{,}207+41{,}351+18{,}554+12{,}194=87{,}306\), are 10,000 short of \(97{,}306\) (they reach it only if the 12 out-parishes in Middlesex and Surrey have \(28{,}554\), not \(18{,}554\), burials, which would make the out-parishes' printed plague figure \(21{,}420\) fit under the total); and the plague deaths by district sum to \(68{,}548\) (\(68{,}704\) if the pesthouse's 156 are added), not \(68{,}596\). Some of these slips are very probably in the printed historical bill itself, which was compiled by hand during an epidemic, rather than introduced by the book. None affects the book's point: about \(70.5\%\) of the burials that year (\(68{,}596/97{,}306\)) were attributed to the plague, though one should treat any single figure of the bill with caution.

The megaquake prediction (Case Study 1.2.1) pp. 3–4

The book prints \(N=0.0000752\) shocks a year and "once every 13,300 years" for \(R=10.5\). Substituting the constants of Equation 1.2.1 gives \(7.44\times10^{-5}\) and 13,450 years (see Filling the gap 1.1). The difference of about 1% is below the precision of the fitted constants and does not change the message.

Selected questions

The book has a single question for this chapter (a short essay prompt); the three problems below are my own and are tied to the case studies. Each has a solution and a ladder of graded hints.

  1. Problem 1.1 (estimating production from four serial numbers). Four captured vehicles carry the serial numbers 18, 52, 77 and 103. (a) Compute the estimate (1.2.2) of the total number produced. (b) Use \(\V\widehat N=(N+1)(N-n)/(n(n+2))\) with the estimate in place of \(N\) to obtain an approximate standard error. (c) Compute \(2\bar x-1\) as well; which estimate is closer to \(\max x_i\), and why should the larger one not alarm you? (d) Explain why \(x_{\max}=103\) is not itself a good estimate.

    Hint 1 of 6: the key idea

    Equation (1.2.2) is a formula; the only work is to substitute carefully and then reuse the variance formula with the estimate in place of the unknown \(N\).

    Hint 2 of 6: tools you will need
    • Equation (1.2.2): \(\widehat N=\frac{n+1}nx_{\max}-1\).
    • The variance of the estimator from gap 1.3.
    • The mean-based estimator and the variance ratio from gap 1.4.
    Hint 3 of 6: part (a)

    Identify \(n\) and \(x_{\max}\) and substitute. Aim for: a number a little above 127.

    Hint 4 of 6: part (b)

    Plug \(\widehat N\) for \(N\) in \((N+1)(N-n)/(n(n+2))\) and take the square root. Aim for: a standard error of about a fifth of the estimate.

    Hint 5 of 6: part (c)

    Average the four serial numbers, double and subtract one; then compare the variance factor \(3/(n+2)\). Aim for: 124 and an explanation in terms of the sampling spread.

    Hint 6 of 6: part (d)

    Use \(\E M=n(N+1)/(n+1)\) to say by what fraction the maximum falls short for \(n=4\).

    Solution

    (a) \(n=4\), \(x_{\max}=103\): \(\widehat N=\tfrac54\cdot103-1=128.75-1=127.75\), so about 128 vehicles.

    (b) With \(N\approx127.75\): \(\V\widehat N\approx128.75\times123.75/(4\times6)=663.9\), so \(\se\approx25.8\). The estimate 128 is thus uncertain by something like 26, about a fifth of its size, and an interval such as \(128\pm2\times26\) would be sensible, but note the skewness (Figure x1.2): the true \(N\) can be a lot higher than \(\widehat N\) with small probability, and cannot be below 103.

    (c) The mean is \(250/4=62.5\), so \(2\bar x-1=124\). Both are above \(103\). The two estimators are not required to agree: they are two random quantities with variances in the ratio \(3/(n+2)=1/2\) (gap 1.4), so the mean-based one has twice the variance, standard error about \(\sqrt{(N+1)(N-n)/(3n)}\approx36\) at \(N\approx128\).

    (d) \(x_{\max}\) can never exceed \(N\) and equals it only if the vehicle with the very last number was captured. On average \(\E M=n(N+1)/(n+1)=0.8(N+1)\) for \(n=4\), so it falls short by about 20% (gap 1.3). Equation (1.2.2) restores the right level by multiplying by \((n+1)/n=1.25\) and subtracting one.

  2. Problem 1.2 (reading the earthquake law). Using Equation 1.2.1, \(N=80{,}338.16\,e^{-1.981R}\): (a) by what factor does the rate fall when the magnitude rises by 0.5? (b) at which magnitude is the rate exactly one shock per year? (c) What mean waiting time does the law give for the window of magnitudes around \(R=8\), and why should it be quoted with care, given that the data stop at \(R=7\)?

    Hint 1 of 5: the key idea

    In an exponential law a fixed step in \(R\) multiplies the rate by a fixed factor. Which two numbers in (1.2.1) do all three parts need?

    Hint 2 of 5: tools you will need
    • \(e^{a+b}=e^ae^b\) and \(\ln\) as the inverse of \(\exp\).
    • The reading of the fitted law in gap 1.1.
    • Return period = 1/rate; for a rate \(\lambda\) a year, \(\P(\text{at least one in }t\text{ years})=1-e^{-\lambda t}\) (Poisson model).
    Hint 3 of 5: part (a)

    Form the ratio \(N(R+0.5)/N(R)\). Aim for: a pure number independent of \(R\), a little over a third.

    Hint 4 of 5: part (b)

    Set \(N=1\), take logarithms and solve. Aim for: a magnitude between 5 and 6.

    Hint 5 of 5: part (c)

    Evaluate \(N(8)\), invert it for a waiting time, and say in a sentence what the data range allows you to claim. Aim for: a return period near one century and a caveat about extrapolation.

    Solution

    (a) \(e^{-1.981\times0.5}=e^{-0.9905}=0.371\): the rate falls to a little over a third, and this is the same at every magnitude: each half-unit step along the book's grid 4.0, 4.5, 5.0, ... multiplies the fitted rate by 0.371.

    (b) \(80{,}338.16\,e^{-1.981R}=1\Rightarrow R=\ln(80{,}338.16)/1.981=11.294/1.981=5.70\).

    (c) \(N(8)=80{,}338.16\,e^{-15.848}=0.0105\) per year, a mean waiting time of \(1/0.0105\approx95\) years. Since 8 is one unit beyond the largest magnitude in the data, this is a mild extrapolation (a factor of 7 in the rate), far less demanding than \(R=10.5\), but it is still an extrapolation and the equation provides no error estimate (Case Study 1.2.1's own comment): a statement like "once in about a century, with an uncertainty that Chapter 11 will quantify" is the honest one. Also, a mean rate is not a schedule: with a rate of 0.0105 a year the probability of at least one such shock in any given 10 years is \(1-e^{-0.105}\approx10\%\) (using the Poisson model of Chapter 4).

  3. Problem 1.3 (an interrupted series). Two players play independent games, each won by A with probability \(p=0.6\); the first to win 6 games wins a pot of 100 units. The series stops with A on 4 wins and B on 3. (a) How many wins does each still need? (b) What is the probability that A would have won, and how should the pot be divided, if the play continued? (c) What would the division be if \(p=1/2\)?

    Hint 1 of 5: the key idea

    Turn the interruption into a counting problem: A needs two more wins and B three; pretend that the maximum number of games that could still be needed is played in any case.

    Hint 2 of 5: tools you will need
    • The problem of points argument and its general formula in gap 1.5.
    • The binomial distribution with success probability \(p\).
    • The complement rule.
    Hint 3 of 5: part (a)

    Subtract each player's wins from 6. Aim for: the two numbers of wins still needed.

    Hint 4 of 5: part (b)

    How many extra games make the outcome certain (\(a+b-1\))? A wins the contest iff he wins at least \(a\) of them. Aim for: \(1-\P(0)-\P(1)\) for a Binomial(4, 0.6), then multiply by the pot.

    Hint 5 of 5: part (c)

    Repeat with \(p=1/2\) and compare the two shares: how much of the difference is due to A's better form?

    Solution

    (a) A needs \(6-4=2\) wins and B needs \(6-3=3\).

    (b) By gap 1.5 pretend that \(a+b-1=4\) further games are played; A wins the contest if and only if he wins at least 2 of the 4. The number of wins is binomial\((4,0.6)\), so \[ \P(\text{A wins})=1-\P(0)-\P(1)=1-0.4^4-4(0.6)(0.4)^3=1-0.0256-0.1536=0.8208. \] A receives \(82.08\) units and B \(17.92\).

    (c) With \(p=1/2\): \(\P(\text{A wins})=1-\tfrac1{16}-\tfrac4{16}=\tfrac{11}{16}\), giving A \(68.75\) units. A's stronger form (\(p=0.6\)) adds about 13 units to his fair share. This is the same logic that Pascal and Fermat used, the first correct application of probability to a problem about a fair price for an uncertain future reward.

Demonstrations for this chapter

▶ DemoThe German tank problemSimulated sampling distributions of the serial-number estimator and of twice the mean, with exact standard deviations (five presets).

For the ideas that this chapter only introduces, the first-year demonstrations are the best next step: estimators (bias and variance), hypothesis testing and the central limit theorem.

References

  1. Goodman, L. A. (1954). Some practical techniques in serial number analysis. Journal of the American Statistical Association, 49(265), 97–112.
  2. Graunt, J. (1662). Natural and Political Observations Mentioned in a Following Index, and Made Upon the Bills of Mortality. London.
  3. Gutenberg, B. and Richter, C. F. (1944). Frequency of earthquakes in California. Bulletin of the Seismological Society of America, 34(4), 185–188.
  4. Hald, A. (1990). A History of Probability and Statistics and Their Applications before 1750. Wiley, New York.
  5. Larsen, R. J. and Marx, M. L. (2018). An Introduction to Mathematical Statistics and Its Applications, 6th edition. Pearson, Boston.
  6. Ruggles, R. and Brodie, H. (1947). An empirical approach to economic intelligence in World War II. Journal of the American Statistical Association, 42(237), 72–91.
  7. Stigler, S. M. (1986). The History of Statistics: The Measurement of Uncertainty before 1900. Harvard University Press, Cambridge, MA.