SStatistics, Built

Stage I · Bachelor's: Foundations

Part 9 of 65

Estimation

Bachelor'sstarts at this level72 min of film13 chaptersprerequisites: Part 8

How do you build a good estimator, and how good can any estimator be?

In the Second World War, serial numbers on captured tanks gave 169 for June 1940 where intelligence said 1,000 and the German records later showed 122 (Ruggles and Brodie 1947). The part plays that problem in miniature throughout: a factory of N tanks, a handful captured. Estimators are recipes judged by their sampling distributions; the method of moments and maximum likelihood produce them, with the score, invariance, the boundary MLE and Newton's method. Sufficiency says which part of the data matters, Rao-Blackwell turns the moment estimator 2 x-bar - 1 into the scaled maximum, and completeness makes that the best unbiased estimator: the maximum plus the average gap. Fisher information and the Cramer-Rao bound, proved by Cauchy-Schwarz, set a 1/sqrt(n) speed limit for regular unbiased estimation, and the tanks break it at rate 1/k because the support moves with N. It ends on an MSE board under three worlds, where the best estimator of the textbook model is off by a thousand once the serials do not start at 1.

What you need. Calculus (maximizing a function, Taylor's theorem), and the sampling distributions, bias and mean squared error of Part 8.

Hook
the German tank problem
Mathematics
method of moments, maximum likelihood, bias and MSE, sufficiency, Rao–Blackwell, Fisher information, Cramér–Rao
Built
the tank factory game

What you will be able to do

Bachelor's

  • Compute the moment estimate, the maximum likelihood estimate and the unbiased estimate of N from a handful of serial numbers, and say what each one's sampling distribution looks like.
  • Write down a likelihood, maximize it for the normal, Poisson, exponential and uniform models, and read a standard error off its curvature.

Master's

  • Prove the factorization theorem in the discrete case and the Rao-Blackwell theorem, and Rao-Blackwellize a given unbiased estimator.
  • Derive the Cramer-Rao bound by Cauchy-Schwarz, compute Fisher information for standard models, and say when the bound is attained.

PhD

  • Prove that the tank maximum is complete, apply Lehmann-Scheffe, and explain which regularity condition fails when an estimator converges at rate 1/n and beats the Cramer-Rao rate.

Practice

  • Grade an estimator by simulation on the model it assumed and on models it did not, reporting bias, standard deviation and RMSE with Monte Carlo errors.
  • Choose between an efficient estimator and a robust one by naming the assumption each depends on.

Contents

Each chapter has a home level. Choose a track to see what to read and watch: Bachelor's 22 min · Master's 66 min · PhD 72 min · Practice 27 min.

  1. 0The German tank problemBachelor's2 min
  2. 1Estimators as recipesBachelor's4 min
  3. 2The method of momentsMaster's5 min
  4. 3Maximum likelihoodBachelor's7 min
  5. 4Likelihoods in practiceBachelor's5 min
  6. 5How good is the MLE?Master's7 min
  7. 6SufficiencyMaster's6 min
  8. 7Rao-BlackwellMaster's7 min
  9. 8The best unbiased estimatorPhD6 min
  10. 9Fisher informationMaster's7 min
  11. 10The Cramer-Rao boundMaster's7 min
  12. 11Comparing estimatorsPractice5 min
  13. Recap, problems, and the road aheadAll tracks3 min

Also on this page: Lecture · Key results · Try it · Lab · Problems · Notes and sources · Build the film.

Lecture

The text of each chapter is the film's narration, as it is spoken, so you can read along or revise without the film. The pictures are in the film.

The German tank problemBachelor's2 min

In the Second World War, Allied planners needed a number: how many tanks was Germany building each month? Conventional intelligence, from spies, aerial photographs and prisoners, gave one answer. A small group of economists and statisticians in London found another, in the serial numbers stamped on the parts of captured and destroyed tanks. Gearboxes, chassis and engines were numbered, and so were the moulds that cast the road wheels. Numbers issued in sequence carry information: the largest one you've seen tells you something about how many exist. Richard Ruggles and Henry Brodie described the work after the war, in 1947.

Here are three months from their table. June 1940: the statistical estimate, from serial numbers, was a hundred and sixty-nine tanks. Intelligence said a thousand. When the German records were captured after the war, the true figure was a hundred and twenty-two. June 1941: two hundred and forty-four from the statistics, fifteen hundred and fifty from intelligence, two hundred and seventy-one in fact. August 1942: three hundred and twenty-seven, fifteen hundred and fifty, and three hundred and forty-two. The serial numbers were usually close; intelligence was about four to eight times too high in these months. How do you turn a handful of serial numbers into a count?

Here's the problem in miniature, and we'll play it all part long. A factory has built some number of tanks, N, numbered one to N. We can't see them. We capture six, at random, and read their serial numbers. The largest is two hundred and fourteen. N is at least that. But how much bigger? Two recipes: double the average and subtract one, which gives two hundred and five, less than a serial number we've actually seen; or scale up the largest a little, which gives two hundred and forty-nine. The truth: three hundred. Neither is right this time; no estimator is right every time. The question is which recipe is best on average, and how good any recipe could possibly be. That's what estimation theory answers.

What it does: Ruggles & Brodie's story and table; the factory in miniature; objectives.; Numbers (computed): 169 / 1,000 / 122; 244 / 1,550 / 271; 327 / 1,550 / 342. One factory, N = 300, serials 4, 25, 70, 98, 208, 214: 2x̄ − 1 = 205, max 214, UMVUE 249

1Estimators as recipesBachelor's4 min

First, some words. A model is a family of distributions, indexed by an unknown parameter theta. The data are drawn from one member of the family. An estimator is any function of the data alone that we use to guess theta, and an estimate is the number it produces on the data in hand. For the tanks, theta is N, the data are the serial numbers, and doubling the average and subtracting one is an estimator. The one rule is that the recipe can't look at theta. Before we have the data, the estimator is a random variable. So it has a sampling distribution, exactly as in Part 8, and that's what we grade. Any single estimate can be lucky or unlucky. A recipe is good if its sampling distribution sits tightly around the truth, whatever the truth happens to be.

Here's the game we'll play throughout. Three factories, each of which has built three hundred tanks. We capture six from each, at random. Each capture gives a different set of serial numbers, and each recipe gives a different estimate. Doubling the mean jumps around; the maximum never exceeds N and usually falls below it; and the scaled-up maximum lands on either side. Three factories can't settle which recipe is best. Ten thousand can.

So here are twenty thousand factories, each with three hundred tanks, six captured from each. The sampling distribution of two x-bar minus one is centred on three hundred, it's unbiased, but it's wide: its standard deviation is seventy. The maximum is tight, but it never exceeds the truth and is below it by forty-two on average. Its root mean squared error, which counts both failures, is fifty-six. The scaled maximum is centred and tight: standard deviation forty-three. It wins on both counts. Why should the maximum beat the mean? The mean averages every serial, but most of them say little about where the numbers stop; the largest one is pressed right up against the boundary we're trying to find. Explaining that properly is what sufficiency, in chapter six, is for.

Now vary the number of tanks captured, from two to twenty. Each curve is a recipe's root mean squared error. All three fall as we capture more, but not at the same speed. The mean-based recipe's standard deviation has an exact formula: it falls like one over root k, the rate of every average in Part 6. The scaled maximum's falls like one over k, and the white dashes, its exact standard deviation, sit on the simulation. One over k is faster than one over root k. When the capture is a small fraction of a large factory, capture four times as many tanks and approximately the mean-based error halves, but the maximum-based error falls by four. Remember this. Later in the part we'll prove that, for smooth problems, no unbiased estimator can beat one over root n. The tank problem isn't smooth, and that's how it escapes.

The tank recipes were guesses. Where do good recipes come from in general? There are a handful of principles, and this course will meet all of them. Plug-in, from Part 8: compute the sample's version of the population quantity. The method of moments: match the model's averages to the sample's. Maximum likelihood: choose the parameter that makes the observed data most probable. Best unbiased estimation: among recipes that are right on average, take the least variable. Least squares, for regression. Bayes, which averages over a prior. And minimax, which guards against the worst case. This part builds the middle three, which together form the classical theory of point estimation.

What it does: Model, estimator, estimate; three factories; the sampling distributions of three recipes; RMSE against k; where recipes come from.; Numbers (computed): k = 6: SD 70 (2x̄ − 1), RMSE 56 (max, bias −42), SD 43 (UMVUE); rates 1/√k vs 1/k

2The method of momentsMaster's5 min

In 1893 the zoologist Raphael Weldon measured a thousand crabs from the Bay of Naples, and found that one ratio, forehead breadth to body length, had a lopsided distribution. Perhaps two races of crab were mixed together. Karl Pearson took up the problem in 1894. A mixture of two normals has five unknowns: two means, two variances and a mixing proportion. Pearson's idea was to choose them so that the model's first five moments, its average, its average square and so on, matched the sample's. That led him to a polynomial of degree nine, which he solved by hand. The method needs nothing but averages, so it works even when the density is too complicated to handle. Twenty years later, the young Ronald Fisher would argue that it throws information away, and propose maximum likelihood instead. We'll build both, and then settle the argument.

The recipe. A model with p unknown parameters has moments, the expected value of X, of X squared, and so on, each a function of theta. The sample has moments too: plain numbers, the averages of the data, their squares, and so on. Set the first p of them equal: p equations in p unknowns. Solve, and that's the estimator. Choose finite moments that identify the parameters: in practice we usually match the mean and the variance rather than the raw second moment. For independent identically distributed data with those moments finite, the law of large numbers makes the sample moments converge to the model's, so if the identifying inversion is continuous, the estimator is consistent. That's the whole method.

An example. Fifty draws from a gamma distribution, the skewed distribution of waiting times and rainfall totals. It has a shape alpha and a scale beta. Its mean is alpha beta, and its variance is alpha beta squared. The sample has mean four point eight and divisor-n variance seven point three five. Divide the variance by the mean to get beta, and square the mean over the variance to get alpha. Three point one four and one point five three. The truth, which only the simulation knows, was two point five and two. The fitted density, in orange, is close to the true one, dashed in white. Two lines of algebra, and a fit.

The tanks, by moments. A single captured tank is equally likely to carry any serial from one to N, so its average serial is N plus one over two. Set that equal to the sample mean, and solve: two x-bar minus one. Sampling without replacement doesn't change the expected mean, so it's unbiased. But look at our factory. Its six serials average a hundred and three, so the estimate is two hundred and five, and we have a tank numbered two hundred and fourteen in our hands. The method of moments can produce estimates the data have already ruled out. It only listens to averages, and here the average is the wrong thing to listen to.

Is the method of moments any good? Grade it. Four thousand samples of fifty from the same gamma, the shape estimated from each by moments. It's centred near two and a half, but spread out: standard deviation point six two. Now the same samples, estimated by maximum likelihood, which we'll build in the next chapter. Tighter: point five two, and less biased too. The simulated variance ratio is point seven one. If variance scales inversely with sample size, fitting by moments here is approximately like throwing away about thirty percent of the data. That was exactly Fisher's complaint. The method of moments is simple, it's often a good starting point, as we'll use it in chapter four, but it isn't the best that can be done.

One more thing the method gives for free. With independent identically distributed data and finite moments through order twice the highest moment used, the multivariate central limit theorem gives a joint normal limit for the moments. If the identifying inversion is differentiable, the delta method of Part 6 makes the estimator approximately normal too, with a variance we can compute from the gradient of the inversion and the covariance of the moments. So moment estimators come with standard errors. The catch is that higher moments are noisy: Pearson's fifth moment needs a finite tenth moment for its standard error to exist. The idea lives on in econometrics, where Lars Hansen's generalized method of moments, from 1982, uses more equations than unknowns and weights them optimally. It won him a share of the 2013 Nobel prize, and it returns with instrumental variables in Part 37.

What it does: Pearson's crabs; the recipe; a gamma fit; the tanks by moments; MoM vs MLE; the delta method; GMM.; Numbers (computed): x̄ = 4.80, s² = 7.35 → α̂ = 3.14, β̂ = 1.53 (truth 2.5, 2); SD 0.621 vs 0.523, efficiency 0.71

3Maximum likelihoodBachelor's7 min

In 1912, Ronald Fisher, then a Cambridge undergraduate, published a three-page paper proposing an absolute criterion for fitting curves: choose the curve that makes the sample you actually observed as probable as possible. Ten years later, working at the Rothamsted agricultural station, he wrote the paper that founded mathematical statistics as a subject, gave names to consistency, efficiency and sufficiency, and argued that his method was the best possible. He had forerunners: Daniel Bernoulli in 1778, Johann Lambert, and Gauss, who in 1809 derived the normal curve by asking which error law makes the average the most likely value. And Fisher was careful with words. He called the quantity the likelihood, to keep it distinct from a probability. It is the probability mass, or for continuous data the density, evaluated at the data and read as a function of the parameter. It is not the probability of the parameter.

Here's what it means. A coin is tossed ten times and lands heads seven times. What is p? Each panel is a candidate value of p, and the bars are the probabilities of every possible number of heads. We only care about one bar: seven, the one we saw. Under p equals point three, seven heads is rare: point zero zero nine. Under a fair coin, point one one seven. Under point seven, point two six seven. Under point nine, point zero five seven. Now slide p continuously and track the height of that one bar. That's the likelihood function: the data held fixed, the parameter moving. Its peak is the maximum likelihood estimate: point seven, the observed proportion. Notice the curve isn't a density in p; its area isn't one. It only ranks parameter values by how well they predicted what happened.

In practice we work with the logarithm of the likelihood: products of probabilities become sums, and the peak doesn't move. Here's the log-likelihood for seven heads in ten, shifted so its peak is zero. It's broad: p could easily be anything from point four to point nine. Seventy heads in a hundred: the same peak, but the curve is ten times as sharply curved. Seven hundred in a thousand: a narrow spike. More data, sharper likelihood. That curvature is going to be the whole story of this part. The sharper the peak, the more precisely the data pin the parameter down. Draw a line one point nine two below the peak, and the values of p above it form an approximate ninety-five percent confidence interval, which Part 11 will explain and test.

The machinery. For independent observations, the likelihood is a product of densities, one per observation. Its logarithm is a sum. The derivative of the log-likelihood has a name: the score. It's a sum of independent pieces, one per observation, so under the required moment and regularity conditions the law of large numbers and the central limit theorem apply to it, and that will be the key to everything in chapters five and nine. At a peak inside the parameter space, the score is zero. That's the likelihood equation. For the coin, the score is k over p minus n minus k over one minus p, and it vanishes at k over n. Maximum likelihood recovers the obvious answer, which is reassuring, and then goes on to give answers where nothing is obvious.

A real example, from Part 3's Museum. Ladislaus Bortkiewicz's two hundred corps-years of Prussian cavalry records, and the number of soldiers killed by horse kicks in each. If the counts are Poisson with rate lambda, the log-likelihood depends on the data only through their total, S. Set the score to zero: lambda hat is the sample mean, a hundred and twenty-two deaths over two hundred corps-years, point six one. Here's the curve, sharply peaked at point six one. And here's the check. With lambda equal to point six one, the Poisson model expects a hundred and nine corps-years with no deaths, and there were a hundred and nine; sixty-six with one, against sixty-five; twenty with two, against twenty-two. A one-parameter model, fitted by maximum likelihood, reproduces a century-old table almost exactly.

Now the tanks, by likelihood. Given N, every set of six serials from one to N is equally likely, so the probability of the six we saw is one over N choose six, provided N is at least the largest, and zero otherwise. As a function of N, the likelihood is zero up to two hundred and thirteen, jumps up at two hundred and fourteen, and then falls: every extra tank makes our particular six a little less probable. So the maximum likelihood estimate is the maximum itself. Two lessons. The peak is on the boundary, where the curve jumps, so setting a derivative to zero would never have found it. And the MLE here is the recipe we already saw was biased low: maximum likelihood is a principle, not a guarantee of quality in small samples.

One property makes maximum likelihood especially convenient. It's invariant. If theta hat maximizes the likelihood, then the maximum likelihood estimate of any function of theta is that function of theta hat. The probability that a corps-year passes without a death is e to the minus lambda, so its estimate is e to the minus point six one, point five four three. The MLE of a standard deviation is the square root of the MLE of the variance; of the log-odds, the log of the odds. Unbiasedness doesn't behave this way: s squared is unbiased for sigma squared, but s is biased for sigma, as Part 8 showed. The likelihood measures how well each distribution fits the data, and the same distribution fits equally well whatever coordinates we use to label it.

What it does: Fisher 1912/1922; the likelihood as a flipped pmf; sharpening with n; the score; the horse kicks; the tank likelihood; invariance.; Numbers (computed): 7 of 10: L = 0.009, 0.117, 0.267, 0.057 at p = 0.3, 0.5, 0.7, 0.9; λ̂ = 122/200 = 0.61; expected 108.7, 66.3, 20.2, 4.1, 0.6 vs 109, 65, 22, 3, 1; e^(−0.61) = 0.543

4Likelihoods in practiceBachelor's5 min

The normal distribution first. The log-likelihood has two parameters, the mean and the variance. The second term is minus the sum of squared deviations over twice the variance, so maximizing over mu means minimizing squared error: least squares is maximum likelihood for normal errors, which is how Gauss arrived at both. The derivative in mu vanishes at the sample mean, whatever sigma is. Plug that in and differentiate in the variance. The maximum likelihood estimate of the variance divides by n, not n minus one. It's biased, by a factor of n minus one over n, exactly the bias Part 8 removed. Maximum likelihood doesn't care about unbiasedness. As Part 8 also showed, the divisor n has a smaller mean squared error anyway.

With two parameters, the likelihood is a surface. Twenty draws from a normal with mean ten and standard deviation two. Each point of this plane is a candidate pair, mu and sigma, coloured by its log-likelihood: brighter is better. The top of the hill is at the sample mean and the divisor-n standard deviation. The truth, ten and two, sits inside the bright region. Notice the shape. The hill falls off steeply toward small sigma, since a narrow curve can't explain the spread we see, but only slowly toward large sigma. The white dots trace the contour about three log-likelihood units below the peak, an approximate ninety-five percent joint confidence region using two degrees of freedom. In more than one dimension, likelihood becomes geometry: a peak, a curvature matrix, and contours.

The exponential distribution, for waiting times. Its density is lambda e to the minus lambda x, so the log-likelihood is n log lambda minus lambda times the total waiting time. The score vanishes at one over the mean: if you waited two minutes on average, events happen at a rate of one half per minute. Twelve simulated waits give point five nine one; the truth was point five. And once again the MLE is biased: since one over the mean is a convex function of the mean, Jensen's inequality pushes it up, and the exact factor is n over n minus one. Chapter ten returns to this estimator to measure it against the best possible.

The uniform distribution on zero to theta is the tank problem with continuous serial numbers. Eight draws. The density is one over theta, but only up to theta, so the likelihood is theta to the minus n if theta is at least the largest observation, and zero otherwise. Any theta below nine point two four is impossible, because we've seen a value that big. Above it, the likelihood only falls. So the MLE is the largest observation. The peak sits at a jump. This is what statisticians call an irregular problem: the set of possible values depends on the parameter. The usual calculus fails, and chapter ten will show that the usual limits on accuracy fail too.

Most likelihoods have no closed-form maximum. The gamma from chapter two is the classic example. The scale can be eliminated, and the score for the shape involves the digamma function, the derivative of the log of the gamma function. No algebra solves it. So we solve it numerically, with Newton's method. Start somewhere, at alpha equals one. Draw the tangent to the score curve there, and jump to where the tangent crosses zero. Repeat. Each step replaces the curve with its tangent line, which means replacing the log-likelihood with its best-fitting parabola and jumping to the parabola's peak. Because this score curve is convex, every step lands short of the root, and the steps close in from the left. Part 21 studies optimization properly: Newton, Fisher scoring, gradient methods and the EM algorithm.

How fast does it converge? Start instead from the method-of-moments estimate, three point one three six, which is already close. After one Newton step the error is about two in ten million. After two, it's at the limit of double-precision arithmetic. Near the root, Newton's method squares the error at every step, so the number of correct digits doubles each time. That's quadratic convergence. And it suggests the method of moments' best role: not the final answer, but a good place to start the search for the maximum likelihood estimate.

What it does: The normal (divisor n) and its likelihood surface; the exponential; the uniform's boundary MLE; Newton on the gamma shape, with quadratic convergence.; Numbers (computed): λ̂ = 0.591 (12 waits); θ̂ = 9.24 (8 draws); Newton errors 8.3 × 10⁻⁴, 2.3 × 10⁻⁷, 1.8 × 10⁻¹⁴

5How good is the MLE?Master's7 min

Why should maximum likelihood work at all? Divide the log-likelihood by n. It becomes an average: the average, over the observations, of log p lambda of x. For ten Poisson observations, this curve is wobbly, and its peak can be far from the true rate, point seven. With a hundred, it's steadier. With two thousand, steadier still. Under a uniform law of large numbers, the curve converges uniformly to a fixed one: the expected log-density, averaged over the true distribution. And that limiting curve peaks exactly at the truth. With uniform convergence and a well-separated unique maximum, and control of the parameter space, the maximizing parameters converge too. That's consistency, and it's Abraham Wald's 1949 argument. Why does the limit peak at the truth? That's a theorem of its own.

Compare the expected log-density at any theta with the one at the truth, theta zero. The difference is the expected log of a ratio. The logarithm is concave, so by Jensen's inequality the average of the log is at most the log of the average. And the average of the ratio is the probability p theta assigns to the truth's support, at most one, and equal to one for a common positive support. Its logarithm is at most zero. So the gap is never positive. Turned around, the quantity is the Kullback–Leibler divergence, from information theory, and it is zero only when the two distributions agree. As long as different parameters give different distributions, which is called identifiability, the truth is the unique peak. Maximum likelihood is, in the limit, a search for the distribution closest to the truth in Kullback–Leibler divergence. Part 22 uses exactly this when the model is wrong.

Next, how big is the error? The answer comes from the score. At the MLE, the score is zero. Expand it in a Taylor series around the true value: the score at the truth plus the distance times the score's slope. Solve for the distance and multiply by root n. The score is a sum of n independent pieces with mean zero, so the central limit theorem makes the numerator normal, with a variance we'll call the Fisher information. The slope is also a sum, so the law of large numbers sends the denominator to a constant, which, as chapter nine proves, is the same Fisher information. By Slutsky's theorem from Part 6, root n times the error is approximately normal, with variance one over the information. Fisher conjectured this in 1922; making it rigorous took until the 1940s, and Part 47 does it properly.

In practice we turn that into a standard error, using the curvature of the log-likelihood. Here again is the horse-kick log-likelihood. Near its peak, any smooth curve looks like a parabola, and the parabola that matches it, in orange, has curvature minus the second derivative at the peak. That's called the observed information. For the Poisson it's the total count over lambda hat squared: three hundred and twenty-eight. The standard error is one over its square root: point zero five five. A sharply bent likelihood means a small standard error. Plus or minus one point nine six standard errors gives an interval from point five zero to point seven two. And notice that the parabola's interval and the curve's interval, where it drops one point nine two, nearly agree. With two hundred observations, the likelihood is already almost perfectly quadratic.

Does the formula match reality? Simulate twenty thousand Poisson samples at each of four sample sizes, with lambda equal to point seven, and measure the actual spread of the estimates. At twenty, the simulated standard deviation is point one eight seven, and the formula says point one eight seven. At fifty, two hundred and a thousand, the same agreement. For the Poisson that's no surprise, because lambda hat is a sample mean and its variance is lambda over n exactly. For most models the formula is only a large-sample approximation. So let's look at a case where it isn't exact.

The exponential rate. With five observations, the sampling distribution of one over x-bar is skewed, with a long right tail, and the normal approximation, in green, misses it badly: the estimator is biased up by a quarter, and its spread is larger than the formula predicts. With a hundred observations, the histogram and the normal curve are much closer, though some skewness remains. Large-sample theory is a statement about large samples. How large is large enough depends on the model and the parameter, and simulation is how you find out. Part 11 tests the resulting intervals on the Coverage Board, and Part 22 shows how to do better with the likelihood's own shape.

This all rests on conditions, and it's worth knowing exactly where they break. The model must be identifiable; the set of possible values mustn't depend on the parameter; the truth must be inside the parameter space, not on its edge; the log-density must be smooth; and the number of parameters must stay fixed as the data grow. This is a checklist of the main conditions, not a complete theorem: finite positive information, derivative domination and control of the maximizing solution also matter. Break the support condition and you get the uniform and the tanks, where the error shrinks like one over n and isn't normal. Let the parameters grow with the data, and the MLE can be inconsistent: Jerzy Neyman and Elizabeth Scott's 1948 example gives pairs of measurements, each pair with its own mean. The MLE of the common variance converges to half the truth, however much data you collect. A mixture of two normals has an unbounded likelihood: shrink one component onto a single data point and the likelihood goes to infinity. And a parameter on a boundary, like a variance that's truly zero, can produce an asymptotic likelihood-ratio law with a point mass, in the simplest single-component case half the mass at zero, which Part 25 meets.

What it does: Average log-likelihoods converge (Wald 1949); KL ≥ 0 by Jensen; asymptotic normality by Taylor + CLT + Slutsky; SE from the curvature; simulation check; small-n skew; regularity and its failures.; Numbers (computed): horse kicks: J = 327.9, SE 0.0552, CI [0.502, 0.718]; Poisson SDs 0.187/0.187 (n = 20) … 0.0265/0.0265 (n = 1,000)

6SufficiencyMaster's6 min

Toss a coin five times and get two heads. There are ten orders in which that could happen. If the chance of heads is point two, each particular order has probability point two squared times point eight cubed, about point zero two, and the chance of two heads in any order is ten times that. So given that there were two heads, each order has conditional probability exactly one in ten. Try p equals a half, or point eight: the individual probabilities change, but the conditional probability of each order is always one in ten. Once you know the number of heads, the order in which they came tells you nothing about p. Its distribution doesn't depend on p at all. The count is sufficient.

The definition. A statistic T is sufficient for theta if, once you know T, the conditional distribution of the full data doesn't depend on theta. Fisher introduced the idea in his 1922 paper: a sufficient statistic summarizes the whole of the relevant information the sample supplies. Whatever is left over, beyond T, is noise with a known distribution. And so anything you want to do about theta, estimating it, testing it, you can do from T alone, and lose nothing.

Here's a way to see why. Alice has twelve coin tosses. She sends Bob only one number: the count of heads, here three. Bob, who doesn't know p, can still manufacture a dataset: he scatters three heads among twelve places at random. Because the conditional distribution of the data given the count doesn't depend on p, he can do that without knowing p. And his fake data have exactly the same distribution as Alice's real data, for every value of p. So any estimator, any test, applied to Bob's fake data performs exactly as well as on Alice's. Nothing was lost in the message. Throwing the rest away is lossless compression, for the purpose of learning about p.

Checking the definition directly is tedious. Fisher's factorization makes it easy. T is sufficient exactly when the density splits into two factors: one that depends on theta, but only through T, and one that may depend on the data in any way, but not on theta. Jerzy Neyman proved it in 1935, and Paul Halmos and Jimmie Savage gave the general version in 1949. Here's the discrete proof. The conditional probability of the data given T equals t is the probability of x, over the total probability of all datasets with the same value of T. Factor the density. The theta-dependent factor is the same for every dataset in the sum, so it cancels, and what's left doesn't involve theta. That's sufficiency. For the converse, take g to be the probability of T itself.

With factorization, sufficient statistics can be read straight off the likelihood. Bernoulli: the likelihood depends on the data only through the number of successes. Poisson: only through the total, times a factor that doesn't involve lambda. Normal with both parameters unknown: through the sum and the sum of squares, or equivalently the sample mean and variance, which is why Part 8's x-bar and s squared were all a normal sample had to offer. Gamma: the sum of the logs and the sum. Notice that the method of moments used the sum of squares, which is not part of this pair, a first hint at why it wasted information. And the uniform, and the tanks: the maximum alone.

Back to the tanks, which can now be explained. The probability of the captured serials is one over N choose k if N is at least the maximum, and zero otherwise. It depends on the data only through the maximum, so the maximum is sufficient. Concretely: once you know the largest serial is two hundred and fourteen, the other five are just a random five from the serials below it, and that's true whatever N is. They're noise, with a known distribution. The mean averages the one informative number with five draws of noise. That's why two x-bar minus one is so much worse: it isn't a function of the sufficient statistic. The next chapter shows that this is always fixable.

How far can the data be compressed? The full dataset is trivially sufficient, so the aim is the smallest sufficient statistic. A minimal sufficient statistic is one that can be computed from any other sufficient statistic. Erich Lehmann and Henry Scheffé gave a test in 1950: two datasets should get the same value exactly when the ratio of their likelihoods doesn't depend on theta. And a deep theorem, from Edwin Pitman, Bernard Koopman and Georges Darmois in the mid-1930s, says that a sufficient statistic of fixed dimension, whatever the sample size, under the theorem's regularity assumptions, including fixed support, exists only in exponential families. Dimension here means a regular statistic, excluding artificial encodings of the whole sample into a number. So the normal, the Poisson and the gamma compress perfectly into a few sums, while for the Cauchy location model with known scale, nothing less than the whole sorted sample will do. Exponential families are special, and Part 22 shows how much else follows from that.

What it does: Ten orders of two heads; the definition; Alice and Bob; factorization (discrete proof); a catalogue; the tanks' maximum; minimal sufficiency and Pitman–Koopman–Darmois.; Numbers (computed): P(each order ∣ S = 2) = 0.1 for p = 0.2, 0.5, 0.8

7Rao-BlackwellMaster's7 min

In 1945 Calyampudi Radhakrishna Rao, twenty-four years old and working at the Indian Statistical Institute in Calcutta, published a paper in the Bulletin of the Calcutta Mathematical Society that contains two of the central results of estimation theory: the one in this chapter, and the variance bound of chapter ten. Two years later, David Blackwell at Howard University found the first result independently, and extended it to sequential sampling. Blackwell was the first Black scholar elected to the National Academy of Sciences, and Rao lived to be a hundred and two, receiving the International Prize in Statistics in 2023. The process their theorem describes is now called Rao–Blackwellization.

Here's the theorem. Take any estimator at all, however crude, and a sufficient statistic T. Replace the estimator by its conditional expectation given T. Three things are true. The result is a genuine estimator: you can compute it without knowing theta. It has the same mean as the original, so if the original was unbiased, so is the new one. And its mean squared error is never larger, for any value of theta, and strictly smaller unless the original was already a function of T. The first point is exactly where sufficiency is needed. To average over the data given T, you need the conditional distribution of the data given T, and sufficiency says that distribution doesn't involve theta. So the recipe is: take any estimator, and average away everything except the sufficient statistic.

The proof uses nothing but Part 5. The mean is unchanged, by the tower property: the average of conditional averages is the overall average. For the variance, use Eve's law: the total variance is the average variance within each value of T, plus the variance between the conditional means. But the conditional means are the new estimator, so the second term is its variance. The first term can't be negative. So the new variance is no bigger, and since the means agree, neither is the mean squared error. What's thrown away is exactly the within-T wobble, which is noise. And the same argument, using Jensen's inequality conditionally, works for any convex loss, not just squared error.

Let's watch it work. Suppose we want the probability of a quiet year, one with no deaths: e to the minus lambda, for Poisson counts. Here's a terrible estimator: look at the first observation only, and say one if it's zero and zero otherwise. It's unbiased, since its average is exactly the probability we want. But it ignores nine tenths of the data and can only say zero or one. Now condition on the total, which is sufficient. Given the total, each event is equally likely to have happened in any of the n years, so the first year's count is binomial, with s trials and probability one over n. The chance it's zero is one minus one over n, to the power S. That's the improved estimator. It uses all the data, through their total, and it's still exactly unbiased.

Twenty thousand samples of ten Poisson counts, with lambda point seven, so the target is point four nine seven. The crude estimator is a coin flip: zero about half the time, one the other half. On average it's right, but every single estimate is off by a half. Its standard deviation is point five. The Rao–Blackwellized estimator spreads over a range of values centred on the truth, and its standard deviation is point one three. Same mean, and fourteen times less variance, from one line of conditioning. And there's more: chapter eight will show that no unbiased estimator of this quantity does better.

Now the tanks. Start with the moment estimator, two x-bar minus one. It's unbiased, but it isn't a function of the sufficient statistic, the maximum m. So condition on m. Given m, one serial is m itself, and the other k minus one are a random sample from one to m minus one, each with average m over two. So the conditional mean of x-bar is m times k plus one over two k. Double it and subtract one: m times one plus one over k, minus one. Rao–Blackwell has turned the moment estimator into exactly the scaled maximum, the estimator that won chapter one. It wasn't a lucky guess. It's what you get by stripping the noise out of the average.

Here it is as a picture. Seven hundred factories, each with three hundred tanks, six captured. Each dot is one factory: across, the largest serial captured, and up, the moment estimate. For a given maximum, the moment estimate still wobbles up and down, depending on where the other five serials happened to fall. That wobble is pure noise: it has the same distribution whatever N is. Rao–Blackwell averages it away. Watch every dot drop onto its conditional mean, the line m times one plus one over k, minus one. The spread of estimates around the truth falls from seventy to forty-two, and the estimator is still unbiased.

The idea reaches far beyond estimators. In Monte Carlo, if you can compute a conditional expectation exactly, average that instead of the raw draws: Alan Gelfand and Adrian Smith made this standard in Bayesian computation in 1990, and Part 27 uses it. Particle filters integrate out whatever part of the model can be done exactly. Survey statisticians condition on what they know about the design. The lesson in each case is the same: randomness that carries no information about the parameter can only add variance, and it should be averaged out.

What it does: Rao 1945, Blackwell 1947; the theorem; proof by Eve's law and Jensen; P(X = 0) for Poisson; the tank moment estimator collapsing onto the UMVUE; Rao–Blackwellization elsewhere.; Numbers (computed): SD 0.500 → 0.134 (variance ÷ 14); tanks SD 70.4 → 42.3

8The best unbiased estimatorPhD6 min

Rao–Blackwell improves an estimator, but it raises a question. What if we'd started somewhere else? Here are three unbiased estimators of N: twice the mean minus one; twice the first serial captured, minus one; and the smallest plus the largest, minus one. Condition each on the maximum. All three arrive at the same place, the scaled maximum. Is that a coincidence? And might some other unbiased estimator, one we haven't thought of, still do better? The property that settles both questions is called completeness.

A statistic T is complete if the only function of T whose average is zero under every value of theta is the zero function itself. No non-trivial function of T can be centred at zero everywhere. Intuitively, the family of T's distributions is rich enough to distinguish any two functions of T. And here's why we care. Suppose two functions of T are both unbiased for the same quantity. Then their difference averages to zero for every theta, so by completeness it's zero. A complete statistic has at most one unbiased function for any target.

That gives the Lehmann–Scheffé theorem, from 1950. If T is complete and sufficient, and some function of T is unbiased, then that function is the best unbiased estimator there is: it has the smallest variance among all unbiased estimators, uniformly, at every value of theta. That's the mouthful U-M-V-U-E. The proof is two lines. Take any unbiased estimator and Rao–Blackwellize it: the result is unbiased and a function of T. By completeness it must be g of T, the only unbiased function of T. And Rao–Blackwell says its variance is no bigger than the starting estimator's. Since we could have started anywhere, g of T beats them all. Every road leads to the same place, and it's the best place.

Is the tank maximum complete? Its distribution is easy to write down: the chance that the largest of k serials is j is the number of ways to choose the other k minus one below j, over the total number of ways. Here's the table for k equals three. Each row is a value of N, each column a value of the maximum. Suppose some function g of m averages to zero for every N. Take the first row, N equals k: the maximum must equal k, so g of k is zero. The second row involves g of k, which we know is zero, and g of k plus one, so that's zero too. And so on down the diagonal: the system is triangular, and every value of g is forced to zero. The maximum is complete. So by Lehmann–Scheffé, the scaled maximum, unbiased and a function of m, is the best unbiased estimator of N. No unbiased recipe, however clever, can beat it for any N.

There's a lovely way to see what the best estimator does. Here are our six captured serials on a line. They split the serials below the maximum into six gaps of unseen tanks: three below the first, then twenty, forty-four, twenty-seven, a hundred and nine, and five. Their total is m minus k, two hundred and eight. By symmetry, the gap above the maximum, the one we can't see, has the same distribution as any of the others. So estimate it by the average gap, thirty-four point seven. Add it on: two hundred and forty-eight point seven, the best unbiased estimator. 'The maximum plus the average gap' is the easiest way to remember it. The truth, three hundred, was further out this time: the unseen gap happened to be big.

Where do complete statistics come from? Mostly from exponential families. If the density has the exponential-family form, and the natural parameters range over an open set, the sufficient statistic is complete. Part 45 proves it, using the uniqueness of Laplace transforms. So the best unbiased estimators of the textbook can be found by finding any unbiased function of the sufficient statistic. The sample mean, for a normal mean. The sample variance with n minus one, for a normal variance: Part 8's divisor is optimal among unbiased estimators. The Rao–Blackwellized quiet-year estimator of the last chapter: it can't be beaten either. The binomial variance, with its own small correction. And the tanks, which aren't an exponential family, but whose maximum we proved complete by hand.

But best unbiased doesn't always mean good. Here's a classic warning. One Poisson observation, and we want e to the minus two lambda, the chance of two quiet years in a row. An unbiased estimator g must satisfy this equation for every lambda. Multiply through by e to the lambda, and the left side is a power series in lambda that must equal e to the minus lambda. Match coefficients: g of x is minus one to the power x. That's the only unbiased estimator, so it's the UMVUE, and it estimates a probability as plus one or minus one. Simply replacing the negative values with zero gives a biased estimator that's never further from the truth, and strictly closer whenever the estimate was negative. Unbiasedness is a constraint we chose, not a virtue in itself, and chapter eleven lets bias back in.

What it does: Three roads to one estimator; completeness; Lehmann–Scheffé; the tank maximum is complete (triangular system); the average gap; exponential families; the absurd UMVUE (−1)ˣ.; Numbers (computed): gaps 3, 20, 44, 27, 109, 5; average 34.7; 214 + 34.7 = 248.7

9Fisher informationMaster's7 min

Chapter five's standard error depended on something called the Fisher information. Here's what it is. Start with the score of a single observation, the derivative of its log-density. Average it, with the observation drawn from the same theta. The density in the denominator cancels the one we're averaging over. What's left is the derivative of the total probability, if we can swap the derivative and the integral, which is exactly what the regularity conditions guarantee. The total probability is always one, so its derivative is zero. The score has mean zero at the true parameter. Evaluated at the truth, the log-likelihood is, on average, flat.

The Fisher information is the variance of the score: how much the slope of the log-likelihood at the truth varies from one observation to the next. A big variance means the data push the slope hard one way or the other, so they carry a lot of information about theta. And there's a second formula. Differentiate the mean-zero identity again. By the product rule we get two terms. Since the derivative of p is the score times p, the second term is the mean squared score. So the information is also minus the average second derivative of the log-density: its average curvature. The variance of the slope equals the mean curvature. That's the identity chapter five needed: the denominator and the numerator of the Taylor argument are the same number.

Here's the picture. Forty Poisson samples of twenty, each drawn with lambda point seven. Each curve is one sample's score function. Each crosses zero at its own estimate. Now look along the line at the true value. The scores there scatter around zero: their mean is close to zero, and their variance is twenty-six, close to n over lambda, twenty-eight point six, for only forty samples. That's n times the information. And the curves' slopes at the truth average minus twenty-eight point six as well. A big spread at the truth goes with steep slopes, and steep slopes mean each curve crosses zero close to the truth. That's why the error of the MLE is about the spread divided by the slope: root n I over n I, one over root n I.

The information for the familiar models. For a coin, one over p times one minus p. For the Poisson, one over lambda. For a normal mean, one over sigma squared, and for its variance, one over two sigma to the fourth. For the exponential rate, one over lambda squared. And for the centre of a Cauchy distribution, one half. The last column, one over n I, is the variance the maximum likelihood estimator achieves in large samples. For the normal mean it's sigma squared over n, which x-bar achieves exactly. For the Cauchy it's two over n. The sample mean of Cauchy data doesn't converge at all, as Part 6 showed, and the median does reasonably well, at about two point four seven over n, but the MLE does better still.

The coin's information has a lesson. One over the information is p times one minus p, largest at a half. A fair coin is the hardest coin to pin down: each toss is maximally unpredictable, and an unpredictable outcome is a noisy measurement. Near zero or one, the tosses are nearly all the same, and p is pinned down well, in absolute terms. But divide the standard error by p itself. For a rare event, a disease with prevalence one in a hundred, say, the relative error explodes: you need huge samples to see enough cases. Which picture matters depends on the question, and on the coordinates you measure in.

Two rules make information easy to work with. First, it adds: n independent identically distributed observations carry n times the information of one, which is where the root n in regular standard errors comes from. Second, it transforms by the chain rule. If theta is a function of some other parameter eta, the score picks up a factor of the derivative, and the information picks up its square. Measure a coin on the log-odds scale, the scale of logistic regression: the information becomes p times one minus p, now largest at a half. So on the log-odds scale, extreme probabilities are the hardest to estimate. Information isn't a property of the experiment alone; it depends on what you're asking.

With several parameters, the information becomes a matrix: the covariance matrix of the score vector, or minus the average Hessian of the log-density. Being a covariance matrix, it's positive semidefinite. For the normal, it's diagonal: the mean and the variance are orthogonal parameters, so not knowing one costs no first-order asymptotic information for the other. Finite-sample uncertainty can still increase. The MLE is asymptotically normal with covariance matrix the inverse of the information. And here's a subtle fact from Part 4's Schur complement: the first diagonal entry of the inverse is at least one over the first diagonal entry. Not knowing the other parameters can only hurt. Unknown nuisance parameters cost information, unless they're orthogonal to the one you care about.

One last view, which ties this chapter to chapter five. Here is the Kullback–Leibler divergence from the true Poisson, with rate point seven, to every other Poisson. It's zero at the truth and grows on both sides. Near the bottom it's a parabola, and the parabola's curvature is the Fisher information, exactly. So information measures how quickly the distributions near the truth become distinguishable from it. Large information, a steep bowl: a slightly wrong parameter already predicts visibly different data. Rao noticed in 1945 that this makes the information a way of measuring distance on the space of models, a Riemannian metric, and that idea grew into the field of information geometry.

What it does: E u = 0; I = Var u = −E u′; forty score curves; a catalogue; the coin; reparametrization and the log-odds; the information matrix and nuisance parameters; KL's curvature.; Numbers (computed): score at λ₀: variance 26.1 vs n/λ = 28.6 (40 samples)

10The Cramer-Rao boundMaster's7 min

This result was found several times in a few years. Rao proved it in the same 1945 paper as the Rao–Blackwell theorem. Harald Cramér proved it in his 1946 book, Mathematical Methods of Statistics, written in neutral Sweden during the war, which also made the large-sample theory of chapter five rigorous and trained a generation of statisticians. Maurice Fréchet had it in 1943, Georges Darmois in 1945, and Alexander Aitken and Harold Silverstone came close in 1942. So some books call it the information inequality, which shares the credit.

The statement. Under the regularity conditions, any unbiased estimator of a function psi of theta, from n independent observations, has variance at least psi prime squared over n times the information. For theta itself, the standard deviation is at least one over root n I. It's a speed limit. However clever the recipe, if it's unbiased, its error can't shrink faster than one over root n, and the constant is fixed by the information. And chapter five said the MLE achieves this limit in large samples: maximum likelihood is asymptotically as good as any unbiased estimator can be. That's what Fisher had claimed in 1922.

The proof is four lines, and the key is Cauchy–Schwarz. Unbiasedness says the mean of T is psi of theta, for every theta. So we can differentiate it in theta. The derivative of the density is the score times the density, and since the score has mean zero, the result is the covariance between T and the score. A covariance squared is at most the product of the variances, the Cauchy–Schwarz inequality: a correlation can't exceed one. The score's variance is n times the information. Divide, and that's the bound. Every unbiased estimator must be correlated with the score, because its mean has to track theta; and its correlation with the score can't exceed one, so its variance can't be too small.

Here's the same proof as a picture. Treat random variables with mean zero as vectors, with the covariance as the dot product, so a standard deviation is a length. The score is one vector. T minus its mean is another. Unbiasedness pins down the covariance of T with the score, so it fixes the length of T's shadow on the score direction. A vector is never shorter than its shadow. So T's standard deviation is at least the shadow's length: that's the bound. And it's attained only when T points exactly along the score, with no sideways component, when T is a linear function of the score.

When can the bound be reached exactly? Only when T minus its mean is a multiple of the score, for every theta. Rearranged, the derivative of the log-density is a function of theta times T, plus another function of theta. Integrate, and the log-density has exponential-family form, with T as its sufficient statistic. So the bound is attained only by the natural statistic of an exponential family, estimating its own mean. The sample mean for a normal mean, or a Poisson rate, or a proportion. For these other examples, the exponential's rate, a normal standard deviation, the probability of a quiet year, the best unbiased estimator exists, but its variance sits strictly above the bound.

The exponential rate shows what that looks like. The bound is lambda squared over n; divide every variance by it, so the bound becomes the green line at one. The best unbiased estimator, n minus one over the total, has variance exactly n over n minus two times the bound. At five observations that's one and two thirds; at a hundred, one point zero two. It never touches the line, but it approaches it. The MLE, n over the total, is biased, so compare its mean squared error instead: worse still at small n, nearly three times the bound at n equals five, and also converging to one. The bound is valid at every sample size under its assumptions, but it need not be tight. Here the unbiased estimator approaches it as the sample grows.

And now the tanks break the speed limit. On log scales, a one over root k rate is a line of slope minus a half. The moment estimator approximately follows it while k is small relative to N. For one much smaller than k and k much smaller than N, the best unbiased estimator approximately falls with slope minus one: its standard deviation shrinks like one over k, not one over root k. The dashed line is any estimator obeying a one over root k law, matched at two tanks. By twenty tanks the scaled maximum is already more than twice as accurate, and the gap keeps widening. How is that allowed? The bound's proof differentiated the density in theta, and here the set of possible serials, one to N, moves with N. N is integer-valued and the support moves, so the usual score-based Cramér–Rao proof does not apply. Other bounds for irregular models still exist. Each extra captured tank tells us about the edge of the distribution directly, and the edge is the parameter. Irregular problems, like boundaries and change points, can be estimated at rate one over n, and Part 47 studies such rates in general.

Two more ways around the bound. The same proof works for a biased estimator, with the derivative of its mean in place of one. If the bias shrinks estimates toward a point, so that the derivative of its mean lies between zero and one, the variance floor drops below one over n I. So biased estimators can beat the bound at some values of theta: Part 8's n plus one divisor did, and James–Stein shrinkage does. And in 1951 Joseph Hodges built an estimator that beats the bound asymptotically at one point, at no cost elsewhere in the limit. Lucien Le Cam later showed that this can only happen on a negligible set of parameter values, and that such estimators pay heavily nearby: Part 47 tells that story. The Cramér–Rao bound is a benchmark for regular, unbiased estimation, not a law of nature.

What it does: Rao, Cramér, Fréchet, Darmois, Aitken & Silverstone; the statement; the proof by Cauchy–Schwarz; the geometric picture; attainment means an exponential family; the exponential rate; the tanks beat it; biased estimators and Hodges.; Numbers (computed): exponential: UMVUE at n/(n − 2) × the bound (1.67 at n = 5, 1.02 at n = 100); tanks: SD 13.8 vs 33.5 at k = 20 for a 1/√k rate matched at k = 2

11Comparing estimatorsPractice5 min

Time to compare the recipes, and to test them on more than the textbook model. Here's an MSE board: four estimators, each graded on ten thousand factories with three hundred tanks, five captured, under three different worlds. The big number is the root mean squared error; underneath are the bias and the standard deviation. We've added a fourth recipe, built from the range between the smallest and largest serial, for a reason that will become clear. In the textbook world, where every tank is equally likely to be captured, the best unbiased estimator wins, at fifty. The maximum is biased low, the moment estimator is noisy, and the range estimator is noisier still, since it uses two order statistics and an assumption less. Now suppose newer tanks, the ones with higher serials, are more likely to be at the front and so more likely to be captured, with sequential sampling weights up to three times as large. These are sampling weights, not an exact ratio of marginal inclusion probabilities. Every estimator is pushed upward. The moment estimator is now biased by nearly fifty. The best unbiased estimator is biased too, by sixteen, but it still wins on error. Finally, suppose the numbering doesn't start at one, but at a thousand and one, and nobody told us. Every estimator that assumed a start at one is off by hundreds or thousands. Only the range estimator, which never assumed where the numbers start, is still right on average, with the same error of about eighty it had everywhere else.

Is the best unbiased estimator the best, full stop? Consider every recipe of the form a times the maximum, minus one. The maximum's distribution is known exactly, so each recipe's mean squared error can be computed exactly, with no simulation. The unbiased choice, a equals one plus one over k, gives fifty point four. But the minimum is a little to the left, at a multiplier close to k plus two over k plus one. That recipe is biased low, slightly, and its error is slightly smaller, forty-nine point seven. And a star barely depends on N, so the shrunken recipe can be approximated without knowing N by the fixed multiplier k plus two over k plus one. The exact optimum shown still uses the simulated truth. Part 8's lesson again: accepting a little bias can buy a little variance. Here the gain is small, about one and a half percent. The big differences on the board came from the model, not from bias.

And here is the game, built into statkit, so you can play it yourself. Write any recipe as a function of the captured serials, one row per factory. This one is the maximum plus the maximum over k, a near-miss of the best unbiased estimator. The game simulates ten thousand factories and grades the recipe, reporting its bias, its standard deviation and its root mean squared error, with Monte Carlo standard errors for bias and RMSE, as Part 7 insisted; SD is reported as a point estimate. And you can grade it on worlds it didn't assume. Try to beat forty-two under the textbook model. The theory of this part says you can't with an unbiased recipe, while within the multiplier family shown, a modest shrinkage buys a small gain here. A biased estimator can do much better at a particular N and worse elsewhere.

What does the board teach? Efficiency is bought with assumptions. The best unbiased estimator is the best only in the world it was derived for, where serials start at one and every tank is equally likely to be caught. The range estimator gives up sixty percent more error to survive not knowing where the numbers start. Which to use is a judgement about which world you're in. The wartime statisticians knew this. Much of their real work was learning how the Germans numbered things: blocks of serials allotted to each manufacturer, codes stamped on gearboxes, and wheel moulds that could be counted directly. When the model is wrong, maximum likelihood still estimates something: the member of the model closest to the truth in Kullback–Leibler divergence, which Part 22 makes precise. And estimators designed to degrade gracefully when the model is a little wrong are the subject of robust statistics, in Part 30.

What it does: The MSE board under three worlds; the MSE-optimal multiple of m; the tank factory game; efficiency versus robustness.; Numbers (computed): the table above; a* = 1.167: RMSE 49.7 vs 50.4

Recap, problems, and the road aheadAll tracks3 min

Part nine in twelve lines. Serial numbers on captured tanks beat the intelligence services. An estimator is a recipe, judged by its sampling distribution. The method of moments matches averages; maximum likelihood chooses the parameter that makes the data most probable, solved by calculus, or by Newton's method, or, at a boundary, by inspection, and it's invariant to reparametrization. It's consistent because the expected log-likelihood peaks at the truth, and its standard error comes from the curvature. Sufficiency says which part of the data matters, and factorization finds it. Rao–Blackwell improves any estimator by conditioning on it, and with completeness, the result is the best unbiased estimator: for the tanks, the maximum plus the average gap. Fisher information is the variance of the score, and the Cramér–Rao bound says no unbiased estimator beats one over n I, except in irregular problems like the tanks. And efficiency is bought with assumptions.

Where it comes back. Likelihood is the backbone of the rest of the course: the likelihood ratio test in Part 10, logistic and Poisson regression in Parts 14 and 24, and likelihood in depth in Part 22. Newton's method grows into Fisher scoring and the EM algorithm in Part 21. Sufficiency, completeness and the best unbiased estimators are proved in full generality in Part 45, with decision theory. And the Cramér–Rao bound becomes the theory of efficiency: asymptotic in Part 47, semiparametric in Part 49, and minimax in Part 50.

Six problems, with full solutions in the README. Moments for the beta distribution; the Pareto's maximum likelihood estimate and its standard error; the best unbiased estimator for a uniform; a Rao–Blackwellized normal probability; the Cramér–Rao bound for a normal variance; and the unbiasedness of the tank estimator, with a hint. Pause here if you want to try them.

The books and papers this part follows: Casella and Berger, Lehmann and Casella's Theory of Point Estimation, Rice and Wasserman, Cramér's 1946 book and Stephen Stigler's history of maximum likelihood, with the original papers from Pearson and Fisher to Ruggles and Brodie, and Leo Goodman's 1952 analysis of serial-number estimation.

Nine parts of sixty-five. We can now build estimators, grade them, improve them, and say how good any of them can be. But an estimate is not yet a decision. In 1710, John Arbuthnot noticed that more boys than girls had been baptized in London in each of eighty-two years in a row, and asked whether chance could explain it. Two centuries later, a lady at Rothamsted claimed she could taste whether the milk had been poured before the tea. When is a pattern too strong to be chance? Part 10: significance.

Where it goes next. Likelihood, the MLE and Fisher information carry Parts 10, 14, 22 and 24; Newton's method grows into Fisher scoring and EM in Parts 21 and 24; sufficiency, completeness and the UMVUE are proved in general in Part 45; Cramer-Rao and irregular rates return in Parts 47 and 50; misspecification and robustness in Parts 22 and 30; the tank factory game grades estimators in later parts.

Key results

The part's results in one place, for revision.

The tank UMVUE (m the largest of k serials)\(\displaystyle \hat N=m\bigl(1+\tfrac1k\bigr)-1:\qquad\allowbreak E\,\hat N=N,\quad\allowbreak \operatorname{Var}(\hat N)=\tfrac{(N-k)(N+1)}{k(k+2)}\)
Maximum likelihood, large n\(\displaystyle \sqrt n\,(\hat\theta-\theta)\xrightarrow{d}N\bigl(0,I(\theta)^{-1}\bigr),\qquad\allowbreak \operatorname{SE}(\hat\theta)\approx\bigl(-\ell''(\hat\theta)\bigr)^{-1/2}\)
Factorization\(\displaystyle T \text{ is }\allowbreak \text{sufficient}\iff p_\theta(x)=g_\theta\bigl(T(x)\bigr)\,h(x)\)
Rao-Blackwell\(\displaystyle \tilde\delta=E(\delta\mid T),\ T \text{ sufficient}:\qquad\allowbreak E\,\tilde\delta=E\,\delta,\quad\allowbreak \operatorname{Var}(\tilde\delta)\le\operatorname{Var}(\delta)\)
Fisher information\(\displaystyle u(\theta)=\frac{\partial}{\partial\theta}\log p_\theta(X):\qquad\allowbreak E\,u=0,\qquad\allowbreak I(\theta)=\operatorname{Var}(u)=-E\,\frac{\partial u}{\partial\theta}\)
Cramer-Rao\(\displaystyle E_\theta T=\psi(\theta)\ \Longrightarrow\ \operatorname{Var}_\theta(T)\ge\frac{\psi'(\theta)^2}{n\,I(\theta)}\qquad\allowbreak \text{(regular }\allowbreak \text{models)}\)

Try it

Lab 9 · The tank factory game

Grade three estimators of the number of tanks N on simulated factories (N = 300, k = 6 captured), check their bias and spread against the exact formulas, average the moment estimator within each value of the maximum to recover the best unbiased estimator, and measure how each one's spread falls as k grows.

Figure produced by Lab 9: The tank factory game
Produced by the lab below, seed 0, in 0.4 s.
python -m videos.stats.labs 9 needs numpy, scipy, matplotlib · download lab09.py · source on GitHub
2 x-bar - 1 (moments)                           bias   -0.1 (exact +0.0)   SD  70.3 (exact 70.1)   RMSE 70.3
max (MLE)                                       bias  -42.0 (exact -42.0)   SD  36.5   RMSE 55.6
max (1 + 1/k) - 1 (UMVUE)                       bias   +0.0 (exact +0.0)   SD  42.6 (exact 42.9)   RMSE 42.6
E(2 x-bar - 1 | max) against max (1 + 1/k) - 1  mean squared z-score 1.20 over 108 values of the max (1 if equal)
log-log slope of SD against k, k = 2..30        moments -0.52 (1/sqrt(k) is -0.5)   UMVUE -0.91 (1/k is -1)
SD at k = 20                                    UMVUE 13.6 (exact 13.8)   a 1/sqrt(k) law matched at k = 2: 33.5

Conditioning the moment estimator on the sufficient maximum removes its extra noise and lands on the UMVUE, whose spread falls nearly like 1/k: faster than the Cramer-Rao rate, because the support 1..N moves with the parameter.
The code (79 lines; it asserts its own result)
"""Lab 9: play the tank factory game, Rao-Blackwellize the moment estimator, and watch a 1/k rate beat 1/sqrt(k)."""

import numpy as np

from videos.coursekit import labs
from explainer.stats.kit import estimation as est

TITLE = "The tank factory game"
GOAL = ("Grade three estimators of the number of tanks N on simulated factories (N = 300, k = 6 captured), check "
        "their bias and spread against the exact formulas, average the moment estimator within each value of the "
        "maximum to recover the best unbiased estimator, and measure how each one's spread falls as k grows.")
TASKS = [
    "Grade the recipes under model='newer' and model='offset' in est.tank_game. Which one survives serials that "
    "start at 1,001, and what does it pay for that under the textbook model?",
    "Grade a * max - 1 for a between 1.10 and 1.25 at k = 5. Where is the RMSE least, and is that recipe unbiased?",
    "Write your own recipe as a function of the (reps, k) array of serials and try to beat the UMVUE's RMSE.",
]


def run(seed=0):
    lab = labs.Lab()
    N, k, reps = 300, 6, 20_000
    games = {name: est.tank_game(est.TANK_ESTIMATORS[name], N=N, k=k, reps=reps, seed=seed) for name in ("mom", "max", "umvue")}
    exact = {"mom": (0.0, est.mom_sd(N, k)), "max": ((k - N) / (k + 1), None), "umvue": (0.0, est.umvue_sd(N, k))}
    names = {"mom": "2 x-bar - 1 (moments)", "max": "max (MLE)", "umvue": "max (1 + 1/k) - 1 (UMVUE)"}
    for name, g in games.items():
        bias, sd = exact[name]
        lab.row(names[name], f"bias {g['bias']:+6.1f} (exact {bias:+.1f})   SD {g['sd']:5.1f}"
                + (f" (exact {sd:.1f})" if sd else "") + f"   RMSE {g['rmse']:.1f}")
        assert abs(g["bias"] - bias) < 4 * g["bias_mcse"] + 0.01, f"{name}: bias as derived"
        if sd:
            assert abs(g["sd"] / sd - 1) < 0.04, f"{name}: SD matches the exact formula"
    assert games["umvue"]["rmse"] < games["max"]["rmse"] < games["mom"]["rmse"], "the UMVUE wins under the textbook model"

    # Rao-Blackwell: the same seed gives the same factories, so the estimates are paired.  Average the moment
    # estimator over all captures that share a maximum: the result is the UMVUE, a function of the maximum alone.
    m = games["max"]["estimates"].astype(int)
    mom = games["mom"]["estimates"]
    counts = np.bincount(m)
    big = np.flatnonzero(counts >= 40)
    cond_mean = np.array([mom[m == v].mean() for v in big])
    cond_se = np.array([mom[m == v].std(ddof=1) / np.sqrt(counts[v]) for v in big])
    zscore = (cond_mean - (big * (1 + 1 / k) - 1)) / cond_se
    lab.row("E(2 x-bar - 1 | max) against max (1 + 1/k) - 1", f"mean squared z-score {np.mean(zscore ** 2):.2f} over {len(big)} values of the max (1 if equal)")
    assert np.mean(zscore ** 2) < 1.6 and abs(zscore.mean()) < 0.5, "conditioning on the maximum gives the UMVUE"

    # Rates: the moment estimator's SD falls like 1/sqrt(k), the UMVUE's nearly like 1/k.
    ks = np.array([2, 3, 5, 8, 12, 20, 30])
    sd_mom = np.array([est.tank_game(est.TANK_ESTIMATORS["mom"], N=N, k=int(q), reps=4000, seed=seed + 1)["sd"] for q in ks])
    sd_umv = np.array([est.tank_game(est.TANK_ESTIMATORS["umvue"], N=N, k=int(q), reps=4000, seed=seed + 1)["sd"] for q in ks])
    slope_mom = np.polyfit(np.log(ks), np.log(sd_mom), 1)[0]
    slope_umv = np.polyfit(np.log(ks), np.log(sd_umv), 1)[0]
    lab.row("log-log slope of SD against k, k = 2..30", f"moments {slope_mom:.2f} (1/sqrt(k) is -0.5)   UMVUE {slope_umv:.2f} (1/k is -1)")
    lab.row("SD at k = 20", f"UMVUE {sd_umv[5]:.1f} (exact {est.umvue_sd(N, 20):.1f})   a 1/sqrt(k) law matched at k = 2: {est.umvue_sd(N, 2) * np.sqrt(2 / 20):.1f}")
    assert np.allclose(sd_umv, [est.umvue_sd(N, int(q)) for q in ks], rtol=0.08), "UMVUE SDs match the formula"
    assert slope_mom > -0.62 and slope_umv < -0.8, "the tanks beat the 1/sqrt(k) rate"
    lab.note = ("Conditioning the moment estimator on the sufficient maximum removes its extra noise and lands on "
                "the UMVUE, whose spread falls nearly like 1/k: faster than the Cramer-Rao rate, because the "
                "support 1..N moves with the parameter.")

    fig, ax = labs.figure(2, size=(11, 4.2))
    bins = np.arange(99.5, 561, 7)  # width 7 holds six values of the UMVUE, so the histogram has no comb
    for name, color in (("mom", labs.BLUE), ("max", labs.RED), ("umvue", labs.GOLD)):
        ax[0].hist(games[name]["estimates"], bins=bins, density=True, histtype="stepfilled", alpha=0.45, color=color, label=names[name])
    ax[0].axvline(N, color=labs.INK, ls="--", lw=1)
    ax[0].set(title="20,000 factories of 300 tanks, 6 captured", xlabel="estimate of N (dashed: the truth)", ylabel="density")
    ax[0].legend()
    kk = np.linspace(2, 30, 100)
    ax[1].loglog(kk, [est.mom_sd(N, q) for q in kk], color=labs.BLUE, label="moments, exact")
    ax[1].loglog(kk, [est.umvue_sd(N, q) for q in kk], color=labs.GOLD, label="UMVUE, exact")
    ax[1].loglog(kk, est.umvue_sd(N, 2) * np.sqrt(2 / kk), color=labs.MUTED, ls="--", label="1/sqrt(k), matched at k = 2")
    ax[1].loglog(ks, sd_mom, "o", color=labs.BLUE)
    ax[1].loglog(ks, sd_umv, "o", color=labs.GOLD, label="simulated")
    ax[1].set(title="Spread against the number of tanks captured", xlabel="k", ylabel="SD of the estimate")
    ax[1].set_xticks([2, 3, 5, 10, 20, 30], labels=["2", "3", "5", "10", "20", "30"])
    ax[1].set_xticks([], minor=True)
    ax[1].legend()
    lab.fig = fig
    return lab

Now change it

  1. Grade the recipes under model='newer' and model='offset' in est.tank_game. Which one survives serials that start at 1,001, and what does it pay for that under the textbook model?
  2. Grade a * max - 1 for a between 1.10 and 1.25 at k = 5. Where is the RMSE least, and is that recipe unbiased?
  3. Write your own recipe as a function of the (reps, k) array of serials and try to beat the UMVUE's RMSE.

Problems, with solutions

Try each problem before opening its solution.

1. Moments for the Beta. Method of moments for the Beta\((\alpha, \beta)\): express \(\hat\alpha, \hat\beta\) in terms of \(\bar x\) and \(v = \tfrac1n\sum (x_i - \bar x)^2\).

Solution

With m = x̄, matching E X = α/(α + β) = m and Var X = m(1 − m)/(α + β + 1) = v gives α + β = m(1 − m)/v − 1 =: c. So α̂ = m·c and β̂ = (1 − m)·c. This needs v < m(1 − m), and v > 0; these hold for a nonconstant sample in (0, 1) when v uses divisor n.

2. The Pareto. Pareto: \(p_\theta(x) = \theta x^{-\theta - 1}\) for \(x \ge 1\). Find the MLE of \(\theta\), the Fisher information, and the MLE's approximate standard error.

Solution

ℓ(θ) = n log θ − (θ + 1)Σ log xᵢ, so U(θ) = n/θ − Σ log xᵢ and θ̂ = n/Σ log xᵢ. Next, −∂²/∂θ² log p = 1/θ², so I(θ) = 1/θ² and SE(θ̂) ≈ θ̂/√n. (log X is exponential with rate θ, so θ̂ is chapter 4's exponential MLE in disguise.)

3. The uniform. For \(X_1, \dots, X_n\) uniform on \((0, \theta)\): show \(M = \max X_i\) is sufficient and complete, and find the UMVUE of \(\theta\).

Solution

p_θ(x) = θ⁻ⁿ 1{M ≤ θ} · 1{min xᵢ ≥ 0}, so M is sufficient by factorization. M has density n mⁿ⁻¹/θⁿ on (0, θ). If E_θ g(M) = 0 for all θ, then ∫₀^θ g(m) mⁿ⁻¹ dm = 0 for all θ. Differentiating in θ gives g(θ)θⁿ⁻¹ = 0, so g = 0 almost everywhere, and M is complete. Since E M = nθ/(n + 1), the UMVUE is (n + 1)M/n by Lehmann–Scheffé.

4. A Rao–Blackwellized probability. \(X_i \sim N(\mu, 1)\): Rao–Blackwellize \(\mathbf 1\{X_1 \le c\}\) given \(\bar X\) to get the UMVUE of \(P(X \le c) = \Phi(c - \mu)\).

Solution

1{X₁ ≤ c} is unbiased for Φ(c − μ), and X̄ is complete and sufficient. For n > 1, (X₁, X̄) is bivariate normal with Cov(X₁, X̄) = 1/n = Var X̄, so X₁ ∣ X̄ ~ N(X̄, 1 − 1/n). Hence

E(1{X₁ ≤ c} ∣ X̄) = Φ((c − X̄)/√(1 − 1/n)),

the UMVUE. It is not the plug-in Φ(c − X̄), which is biased.

5. The Cramér–Rao bound for a normal variance. \(X_i \sim N(0, \sigma^2)\): find \(I(\sigma)\) and the Cram'er–Rao bound for unbiased estimators of \(\sigma^2\); is it attained?

Solution

log p = −log σ − x²/(2σ²) + const, so u = −1/σ + x²/σ³ and I(σ) = Var(X²)/σ⁶ = 2σ⁴/σ⁶ = 2/σ². For ψ(σ) = σ², ψ′ = 2σ, and the bound is (2σ)²/(n · 2/σ²) = 2σ⁴/n. The estimator (1/n)Σxᵢ² is unbiased with variance 2σ⁴/n, so the bound is attained. This is the exponential-family case: T = Σxᵢ², estimating its own mean. With μ unknown, s² has variance 2σ⁴/(n − 1) and does not attain it.

6. The tank estimator is unbiased. Tanks: show \(E\,m = \tfrac{k(N + 1)}{k + 1}\), so \(m(1 + \tfrac1k) - 1\) is unbiased. (Hint: \(\sum_{j=k}^N j\binom{j-1}{k-1} = k\sum_{j=k}^N \binom{j}{k}\).)

Solution

P(m = j) = C(j − 1, k − 1)/C(N, k), and j·C(j − 1, k − 1) = k·C(j, k). By the hockey-stick identity, Σⱼ₌ₖᴺ C(j, k) = C(N + 1, k + 1). So

E m = k·C(N + 1, k + 1)/C(N, k) = k(N + 1)/(k + 1),

and E[m(1 + 1/k) − 1] = (N + 1) − 1 = N.

Notes and sources

Where it comes back

Idea Returns in
likelihood, the MLE, Fisher information 10, 14, 22, 24, 47
Newton's method, Fisher scoring, EM 21, 24, 27
sufficiency, exponential families 22, 45
Rao–Blackwell, conditioning 18, 27, 45
completeness, the UMVUE 45
Cramér–Rao, efficiency 45, 47, 49, 50
irregular rates, superefficiency 47, 50
misspecification, robustness 22, 30, 60
the tank factory game, statkit every part that grades an estimator

Sources

  • Tanks.
    • R. Ruggles & H. Brodie, "An empirical approach to economic intelligence in World War II", JASA 42 (1947).
    • L. Goodman, "Serial number analysis", JASA 47 (1952).
  • Moments.
    • K. Pearson, Phil. Trans. R. Soc. A 185 (1894).
    • L. P. Hansen, Econometrica 50 (1982).
  • Likelihood.
    • R. A. Fisher, Messenger of Mathematics 41 (1912); Phil. Trans. R. Soc. A 222 (1922).
    • A. Wald, Ann. Math. Stat. 20 (1949).
    • J. Neyman & E. Scott, Econometrica 16 (1948).
    • P. Zehna, Ann. Math. Stat. 37 (1966).
    • S. Kullback & R. Leibler, Ann. Math. Stat. 22 (1951).
    • S. Stigler, "The epic story of maximum likelihood", Stat. Sci. 22 (2007).
  • Sufficiency and unbiasedness.
    • J. Neyman, Giorn. Ist. Ital. Attuari 6 (1935); P. Halmos & L. J. Savage, Ann. Math. Stat. 20 (1949).
    • C. R. Rao, Bull. Calcutta Math. Soc. 37 (1945).
    • D. Blackwell, Ann. Math. Stat. 18 (1947).
    • E. Lehmann & H. Scheffé, Sankhyā 10 (1950), 15 (1955).
    • E. Pitman (1936); B. Koopman (1936); G. Darmois (1935).
    • A. Gelfand & A. F. M. Smith, JASA 85 (1990).
  • Bounds.
    • H. Cramér, Mathematical Methods of Statistics (1946).
    • M. Fréchet (1943); A. Aitken & H. Silverstone (1942).
    • L. Le Cam, Univ. Calif. Publ. Stat. 1 (1953), on Hodges' estimator.
  • Textbooks.
    • G. Casella & R. Berger, Statistical Inference (2nd ed., 2002), chs. 6–7.
    • E. Lehmann & G. Casella, Theory of Point Estimation (2nd ed., 1998).
    • J. Rice, Mathematical Statistics and Data Analysis (3rd ed., 2007), ch. 8.
    • L. Wasserman, All of Statistics (2004), ch. 9.
About this partfrom its README

Part 9 of a sixty-five-part course in statistics, from a first course to a PhD (see the series plan and the syllabus), in Stage I, Bachelor's: Foundations. Part 8 showed how a statistic varies from sample to sample. This part asks where good estimators come from, how to improve them, and how good any of them can be.

It opens with the German tank problem. In the Second World War, Allied statisticians estimated German tank production from the serial numbers on captured tanks, and came much closer than conventional intelligence. Ruggles & Brodie (1947) give, for example, 169 vs 1,000 vs 122 (statistical estimate, intelligence, German records) for June 1940. From there the part covers:

  • estimators as recipes, graded by their sampling distributions;
  • the method of moments (Pearson 1894);
  • maximum likelihood (Fisher 1912, 1922): likelihood curves sharpening, the score, invariance, the boundary MLE, Newton's method;
  • consistency by Kullback–Leibler, asymptotic normality, the standard error from the curvature, and where the theory breaks (Neyman–Scott);
  • sufficiency and the factorization theorem;
  • Rao–Blackwell, which turns the tank moment estimator into the scaled maximum;
  • completeness, Lehmann–Scheffé and the UMVUE ("the maximum plus the average gap");
  • Fisher information, as the score's variance, as curvature, and as the curvature of KL;
  • the Cramér–Rao bound by Cauchy–Schwarz, its geometry, when it is attained, and how the tanks beat it (rate 1/k);
  • comparing estimators on an MSE board under three worlds.

Every number on screen is computed in compute.py. The Museum supplies:

  • the tank figures (museum.TANKS, from Ruggles & Brodie 1947);
  • Bortkiewicz's horse kicks (museum.HORSEKICK_*, Part 3).

Everything else is a seeded simulation or an exact calculation, and is tagged as such.

Built in this part: the tank factory game, explainer/stats/kit/estimation.py (tested in tests/test_stats_kit_estimation.py). tank_game(recipe, N, k, reps, model) grades any estimator of N, given as a function of a (reps, k) array of captured serials, on simulated factories. It reports the bias, the SD and the RMSE; bias and RMSE include Monte Carlo errors, under the textbook model ("uniform") or a world the recipe did not assume ("newer": sequential capture weights increase from 1 to 3; "offset": serials start at 1,001). The module also has newton and observed_information. The TankFactory picture is in explainer/stats/viz.py.

RMSE, N = 300, k = 5 uniform newer offset
2x̄ − 1 76.7 87.9 2,001
max (MLE) 64.0 48.0 951
m(1 + 1/k) − 1 (UMVUE) 49.8 42.0 1,200
(m − m₁)(k + 1)/(k − 1) − 1 79.6 83.0 79.0
Chapter notes
# Chapter What it does Numbers (computed)
0 The German tank problem Ruggles & Brodie's story and table; the factory in miniature; objectives. 169 / 1,000 / 122; 244 / 1,550 / 271; 327 / 1,550 / 342. One factory, N = 300, serials 4, 25, 70, 98, 208, 214: 2x̄ − 1 = 205, max 214, UMVUE 249
1 Estimators as recipes Model, estimator, estimate; three factories; the sampling distributions of three recipes; RMSE against k; where recipes come from. k = 6: SD 70 (2x̄ − 1), RMSE 56 (max, bias −42), SD 43 (UMVUE); rates 1/√k vs 1/k
2 The method of moments Pearson's crabs; the recipe; a gamma fit; the tanks by moments; MoM vs MLE; the delta method; GMM. x̄ = 4.80, s² = 7.35 → α̂ = 3.14, β̂ = 1.53 (truth 2.5, 2); SD 0.621 vs 0.523, efficiency 0.71
3 Maximum likelihood Fisher 1912/1922; the likelihood as a flipped pmf; sharpening with n; the score; the horse kicks; the tank likelihood; invariance. 7 of 10: L = 0.009, 0.117, 0.267, 0.057 at p = 0.3, 0.5, 0.7, 0.9; λ̂ = 122/200 = 0.61; expected 108.7, 66.3, 20.2, 4.1, 0.6 vs 109, 65, 22, 3, 1; e^(−0.61) = 0.543
4 Likelihoods in practice The normal (divisor n) and its likelihood surface; the exponential; the uniform's boundary MLE; Newton on the gamma shape, with quadratic convergence. λ̂ = 0.591 (12 waits); θ̂ = 9.24 (8 draws); Newton errors 8.3 × 10⁻⁴, 2.3 × 10⁻⁷, 1.8 × 10⁻¹⁴
5 How good is the MLE? Average log-likelihoods converge (Wald 1949); KL ≥ 0 by Jensen; asymptotic normality by Taylor + CLT + Slutsky; SE from the curvature; simulation check; small-n skew; regularity and its failures. horse kicks: J = 327.9, SE 0.0552, CI [0.502, 0.718]; Poisson SDs 0.187/0.187 (n = 20) … 0.0265/0.0265 (n = 1,000)
6 Sufficiency Ten orders of two heads; the definition; Alice and Bob; factorization (discrete proof); a catalogue; the tanks' maximum; minimal sufficiency and Pitman–Koopman–Darmois. P(each order ∣ S = 2) = 0.1 for p = 0.2, 0.5, 0.8
7 Rao–Blackwell Rao 1945, Blackwell 1947; the theorem; proof by Eve's law and Jensen; P(X = 0) for Poisson; the tank moment estimator collapsing onto the UMVUE; Rao–Blackwellization elsewhere. SD 0.500 → 0.134 (variance ÷ 14); tanks SD 70.4 → 42.3
8 The best unbiased estimator Three roads to one estimator; completeness; Lehmann–Scheffé; the tank maximum is complete (triangular system); the average gap; exponential families; the absurd UMVUE (−1)ˣ. gaps 3, 20, 44, 27, 109, 5; average 34.7; 214 + 34.7 = 248.7
9 Fisher information E u = 0; I = Var u = −E u′; forty score curves; a catalogue; the coin; reparametrization and the log-odds; the information matrix and nuisance parameters; KL's curvature. score at λ₀: variance 26.1 vs n/λ = 28.6 (40 samples)
10 The Cramér–Rao bound Rao, Cramér, Fréchet, Darmois, Aitken & Silverstone; the statement; the proof by Cauchy–Schwarz; the geometric picture; attainment means an exponential family; the exponential rate; the tanks beat it; biased estimators and Hodges. exponential: UMVUE at n/(n − 2) × the bound (1.67 at n = 5, 1.02 at n = 100); tanks: SD 13.8 vs 33.5 at k = 20 for a 1/√k rate matched at k = 2
11 Comparing estimators The MSE board under three worlds; the MSE-optimal multiple of m; the tank factory game; efficiency versus robustness. the table above; a* = 1.167: RMSE 49.7 vs 50.4
12 Outro Recap, payoffs, problems, references, the Transcript, Part 10's question. —
The syllabus's plan for this partfrom SYLLABUS.md, the plan of record
  1. Hook: the German tank problem. Serial numbers vs intelligence estimates vs the post-war records (Ruggles & Brodie 1947).
  2. Estimators as recipes. For the tanks: 2·mean − 1 and the maximum, with their sampling distributions.
  3. The method of moments (Pearson 1894). Gamma and beta fits.
  4. Maximum likelihood (Fisher 1912, 1922). Likelihood curves sharpening with n; score equations; invariance.
  5. Examples. Normal, Poisson, exponential, uniform (the boundary MLE); Newton's method, first look.
  6. Properties. Bias, MSE, consistency; the MLE's standard error from the curvature (asymptotic normality, stated).
  7. Sufficiency (Fisher 1922). The idea; the factorization theorem in the discrete case.
  8. Rao–Blackwell. Conditioning never hurts (Jensen); the tank estimator improved live.
  9. The best unbiased estimator. Completeness, stated; the tank UMVUE m(k + 1)/k − 1 (Part 45 proves it in general).
  10. Fisher information. The score's mean and variance; information as curvature.
  11. Cramér–Rao. Proof by Cauchy–Schwarz; the tanks beat it (rate 1/n², since the support depends on N).
  12. Comparing estimators. An MSE board for the tank estimators; robustness to model error, first look.
  13. Outro.

Built: the tank factory game, grading the viewer's estimator.

Build the film

python -m videos.stats.stats9.compute        # the part's numbers, into .cache/stats9
python tools/build.py stats9                  # render and assemble the film
EXPLAINER_TTS=silent python tools/qa_scene.py stats9 Hook   # one chapter, silent, with a contact sheet

Scenes: videos/stats/stats9. Setup: see the course page. Source of these notes: the README and the scenes' narration.

Build it
python -m videos.stats.stats9.compute          # once: every computed item (seconds; cached in .cache/stats9)
python tools/build.py stats9 -q l              # fast 480p preview
python tools/build.py stats9                   # 1080p30 -> renders/stats9.mp4
python tools/qa_scene.py stats9 CramerRao      # one chapter, silent, with a contact sheet
python tools/lecture_length.py stats9 --floor 50