The Theory of Estimation
What does 'best' mean for an estimator, and why is the obvious estimator inadmissible in three dimensions?
At the Third Berkeley Symposium, published in 1956, Charles Stein shows that for three or more normal means the observations themselves are inadmissible: the James-Stein estimator has smaller expected squared error at every value of the means. The part asks what best can mean. Wald's decision theory gives the language, and the risk-set explorer draws a whole problem at once: sixteen rules for calling a coin fair or biased, their convex hull, Bayes rules as supporting lines and the minimax rule on the diagonal. Exponential families are read as convex duality, and sufficiency, completeness, Rao-Blackwell, Lehmann-Scheffe and Basu say when a best estimator exists in a class, with the German tank problem as the example and the absurd unbiased estimator as the warning. The turn is chapter 10: Stein's lemma gives an unbiased estimate of risk and the exact risk of James-Stein, and Brown explains the number three by the recurrence of Brownian motion. The part ends with Strawderman's proper Bayes minimax rules and with Robbins's empirical Bayes on 9,461 insurance policies.
What you need. Part 43's measure theory (conditional expectation as in Part 44), convexity and the Legendre transform, and the estimation theory of Part 9.
- Hook
- Stein's 1956 shock
- Mathematics
- decision theory, complete classes, exponential families as convex duality, sufficiency and completeness, Basu, equivariance, Stein, Brown's recurrence theorem, empirical Bayes theory
- Built
- a risk-set explorer
What you will be able to do
Bachelor's
- State Stein's paradox in words and say what 'smaller risk for every value of the means' does and does not promise about a single coordinate.
- Read a risk set: find the dominated rules, the Bayes rule for a prior, and the minimax rule.
Master's
- Compute the risk function of (X + a)/(n + a + b) for a binomial and find the rule with constant risk.
- Rao-Blackwellize an unbiased estimator given a sufficient statistic, as for the tanks' maximum.
- Apply Robbins's formula and Tweedie's formula to counts and to normal observations.
PhD
- Prove Lehmann-Scheffe and Basu's theorem, and give families in which the sufficient statistic is not complete.
- Prove Stein's lemma, derive SURE and the exact risk of James-Stein, and state Baranchik's condition for minimaxity.
- State Brown's criterion linking admissibility of a generalized Bayes rule to recurrence, and apply it to the flat prior in p dimensions.
Practice
- Choose between an unconditional and a conditional interval when an ancillary statistic (which instrument, the sample range) is observed, and report the conditional one.
- Shrink many noisy estimates with James-Stein or empirical Bayes, and say why an interval of the usual width around a shrunken estimate can undercover.
Contents
Each chapter has a home level. Choose a track to see what to read and watch: Bachelor's 10 min · Master's 20 min · PhD 70 min · Practice 20 min.
- 0Stein's paradox, 1956Bachelor's3 min
- 1Decision theoryPhD5 min
- 2Risk setsBachelor's4 min
- 3Complete class theoremsPhD5 min
- 4Exponential families as convex dualityPhD5 min
- 5Sufficiency in generalPhD4 min
- 6Rao-Blackwell and Lehmann-ScheffePhD5 min
- 7Ancillarity and BasuPractice5 min
- 8Information inequalitiesPhD5 min
- 9EquivariancePhD5 min
- 10Stein's lemma, SURE, James-SteinPhD5 min
- 11Why three dimensionsPhD5 min
- 12Minimaxity and admissibility for normal meansPhD5 min
- 13Empirical Bayes theoryPractice6 min
- 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. A dashed box stands for a number the film computes when it is rendered (hover over it to see what is computed); the README's figures for each chapter, where it lists them, follow the chapter's text.
Stein's paradox, 1956Bachelor's3 min
At the Third Berkeley Symposium, held in 1954 and 1955 and published in 1956, Charles Stein presented a result that many statisticians at first refused to believe. If you estimate three or more normal means, each from its own observation, the obvious estimate, the observations themselves, is inadmissible. There is another estimator whose expected squared error is smaller for every possible value of the means, with no exceptions. In 1961, with Willard James, he wrote one down: the James–Stein estimator, which shrinks every observation toward zero.
Here is the claim, drawn exactly. Observe X, normal with mean vector theta and identity covariance in p dimensions, and pay the squared distance from your estimate to theta. The obvious estimate, X itself, has expected loss p, whatever theta is: the flat blue line, divided by p. James and Stein multiply X by one minus p minus two over the squared length of X. Its risk, computed exactly from a Poisson mixture of chi-squares, lies below the line everywhere, in three, five and ten dimensions. At theta equal to zero the risk is two, for every dimension at least three; far away it creeps back up to p, but never reaches it.
What made the result so hard to accept is that the coordinates need have nothing to do with each other: the price of tea in Leeds, a hitter's batting average, the brightness of a star. Measure each once, with independent unit-variance Gaussian noise after choosing the measurement scale and squared-error weights. The James–Stein estimate shrinks all three toward zero by a common factor that depends on all three measurements. And its total squared error is smaller on average, for every combination of tea, hitter and star. The catch, which we will make precise, is that the guarantee is for the total; no single coordinate is promised an improvement.
So this part asks what best means for an estimator. Abraham Wald's decision theory gives the language: estimation as a game against nature, each strategy scored by its risk. Sufficiency, completeness and equivariance tell us when a best estimator exists within a natural class. And Stein's paradox, explained by Lawrence Brown in 1971 through the recurrence of Brownian motion from Part forty-four, shows where that search for the best runs out.
Two promises are due. Part nine called the minimum-variance unbiased estimator best and proved the Cramér–Rao bound, but best only among unbiased estimators; chapters one to eight set out what best means in general, prove Lehmann–Scheffé, and show where unbiasedness becomes absurd. Part twenty-five showed James–Stein winning on Efron and Morris's hitters, by simulation and a sketch; chapters ten to thirteen give exact risks, the reason for three dimensions, and proper Bayes estimators that are minimax.
Numbers: James–Stein risk 2 at θ = 0 for every p ≥ 3, below p everywhere
1Decision theoryPhD5 min
Decision theory: estimation as a game against nature. John von Neumann's theory of games, from 1928 and his 1944 book with Oskar Morgenstern, studied two players choosing strategies against each other. In 1939 Abraham Wald saw that estimation and testing are one problem of this kind: choosing an action when the state of the world is unknown. His book Statistical Decision Functions appeared in 1950, the year he died in a plane crash in India. In Wald's game, nature picks the parameter, the statistician picks a rule for turning data into an action, and the loss is scored on average over the data.
The ingredients. A loss function scores each action against each possible truth; for estimation, usually the squared error. A decision rule maps every possible data set to an action: an estimator, or a test. Its risk function is the expected loss when the truth is theta: a whole curve, one value for each theta, not a single number. A rule is inadmissible if another rule's risk is never larger and somewhere smaller. Under the specified model, loss and permitted actions, a dominating rule has no larger risk; Stein's theorem says that the sample means are one.
A first example: estimate a proportion p from sixteen trials, with squared error loss. The sample proportion, X over n, has risk p times one minus p over n: zero at the ends, largest in the middle. Laplace's rule of succession, X plus one over n plus two, pulls toward a half: better in the middle, worse near the ends. And a stranger rule, X plus root n over two, over n plus root n, has exactly the same risk at every p: a flat line at . The curves cross. No rule is best at every p, so we need a way to summarize a risk curve by a single number.
Two summaries dominate the theory. The minimax criterion judges a rule by its worst risk and picks the rule whose worst case is best. The Bayes criterion averages the risk over a prior distribution for theta; for squared error the minimizer is the posterior mean. The sample proportion's worst risk is one over four n, ; the flat rule's is , and it is the minimax rule. Averaged over a uniform prior, Laplace's rule does best, as it must: it is the posterior mean under that prior. The flat rule is itself Bayes, for a Beta prior with both parameters equal to root n over two.
But look at where the minimax rule wins. With sixteen trials, it beats the sample proportion between and . With a hundred, only between and ; with a thousand, between and . For each fixed sample size, its risk ratio diverges as p tends to zero or one, because its risk never falls below its constant. Minimax buys protection against the worst value of p, which may be a value nobody believes. That tension, between guarding the worst case and doing well on average, runs through the whole subject.
Why not simply ask for the rule that is best at every theta? Because of the stopped clock: the rule that ignores the data and always answers theta nought has zero risk at theta nought. A uniformly best rule would have to match it, so it would need zero risk at every theta, which is impossible unless the data reveal theta exactly. There are two ways out, and this part takes both: restrict the competition to a natural class, such as unbiased or equivariant rules, and find the best there; or summarize each risk curve by its maximum or its average.
Numbers: Bin(16): max risk 0.0156 (X/n) vs 0.0100 (minimax); Bayes risks 0.0104 / 0.0093 / 0.0100
2Risk setsBachelor's4 min
Risk sets: a whole decision problem in one picture. A problem small enough to see whole. A coin is either fair or biased, landing heads with probability point eight. We toss it three times and count the heads; here are the chances of each count under both states. We must say fair or biased. Calling a fair coin biased costs one; missing a biased coin costs two. A rule assigns an answer to each of the four possible counts, so there are sixteen rules, and each has just two risks, one for each state of nature: a point in the plane.
Here are the sixteen rules as points: across, the risk when the coin is fair; up, the risk when it is biased. The rule that always says fair sits at the top left; always biased, at the bottom right. Flip a coin to choose between two rules, and you get any point on the segment between them, so the randomized rules fill the convex hull. Smaller is better in both directions, so only the lower-left edge matters: every point above or to the right of it is dominated by a point on it. Its corners are the five threshold rules: say biased when the number of heads is at least c. Rules such as saying biased after zero heads but fair after three sit far inside, dominated many times over.
Now put a prior on the states: probability pi that the coin is fair. The Bayes risk of a rule is pi times its first risk plus one minus pi times its second. Rules with equal Bayes risk lie on a straight line, and changing the Bayes risk slides the line parallel to itself. So the Bayes rule is found by sliding the line down until it first touches the risk set: a supporting line. With a quarter on fair, it touches the threshold rule c equals one; with a half, c equals two; with three quarters, c equals three. For the three positive priors shown, these Bayes rules are thresholds on the number of heads, which is a threshold on the likelihood ratio, as Neyman and Pearson will explain in Part forty-six.
The minimax rule minimizes the larger of the two risks. Grow a square from the origin until it first meets the risk set. It meets the lower edge on the diagonal, where the two risks are equal, at : an equalizer rule. That point lies between two corners, so the minimax rule randomizes: it uses the threshold three about a quarter of the time and the threshold two about three quarters of the time; in effect, with exactly two heads it flips a biased coin of its own. The edge's supporting line there has a slope, and that slope is a prior: on fair, the least favourable prior. The minimax rule is the Bayes rule for the prior that makes the statistician's job hardest.
For this finite-state, finite-outcome and finite-action randomized problem, compactness and convexity give the minimax theorem: the best worst-case risk equals the largest Bayes risk that any prior can force. A prior attaining it is least favourable: nature's best strategy in the game. And it gives the practical recipe: a Bayes rule whose risk is constant is minimax, because its worst case equals its average, and no rule can beat that average everywhere. In our coin problem both sides equal the same number, and chapter one's flat binomial rule is minimax for exactly this reason: it is Bayes for a Beta prior and its risk is constant.
Numbers: 16 rules; minimax 0.404 on the diagonal; least favourable prior 0.672
3Complete class theoremsPhD5 min
Complete class theorems: which rules are worth considering at all? First, the easy direction. Take a proper prior with finite Bayes risk and a Bayes rule unique up to sets null under every model law. This holds for the full-support finite example and for the Gaussian examples here. Posterior uniqueness only under the prior predictive law would not be sufficient in every statistical model. If some rule dominated it, then averaging its smaller-or-equal risk over the prior would give a Bayes risk no larger. So the dominating rule would also be Bayes, and by uniqueness it would be the same rule: there is no strict domination. Unique Bayes rules are admissible. The deeper question is the converse: is every admissible rule Bayes?
In the coin problem, sweep the prior from zero to one. Each prior's supporting line touches the lower edge somewhere, and as the prior moves, the touching points visit every corner; points between corners are mixtures of two Bayes rules, Bayes for the prior at which the line lies flat along that edge. So every admissible rule is Bayes. That is the finite randomized decision theorem for this compact risk polytope: the Bayes rules form a complete class, meaning that any rule outside it is dominated by one inside. The proof is the supporting-hyperplane theorem for convex sets, which this picture shows in two dimensions.
With infinitely many parameter values the converse fails as stated: there are admissible rules that are Bayes for no proper prior. Under the relevant compactness, continuity and loss assumptions, complete-class theorems of Wald, Le Cam and Brown represent admissible rules through suitable limits of Bayes rules. Mere pointwise convergence alone does not prove admissibility. In particular regular exponential-family decision problems, with the specified loss and complete-class conditions, one obtains generalized Bayes representations, possibly using improper priors. This is not a statement about every loss and exponential family. So the search for good rules becomes a search over priors, whether or not one believes in them. That is a frequentist argument for Bayesian methods.
The binomial shows it. A Beta prior with both parameters equal to epsilon has Bayes rule X plus epsilon over n plus two epsilon. As epsilon shrinks from four to one, a quarter and a twentieth, the risk curves close in on one limit, the risk of the sample proportion, The sample proportion is not Bayes for a nondegenerate proper interior prior. Priors on the endpoints are an exception because the experiment then reveals the parameter. Unbiasedness alone is not a universal obstruction to every Bayes representation in all models. For interior counts it is the formal posterior mean under Haldane's improper prior. At zero or n heads that posterior is improper; the endpoint answers come from the limit of the proper Beta rules. And it is admissible, as a limit of Bayes rules whose risks converge fast enough.
Colin Blyth's 1951 method makes the limit argument precise. Observe one normal with mean theta, and use normal priors with variance tau squared; the Bayes rule shrinks X by tau squared over one plus tau squared. The Bayes risk of X itself exceeds the Bayes rule's by one over one plus tau squared: the gap closes like one over tau squared. Suppose a dominating finite-risk rule improved by epsilon near some fixed parameter value. Continuity of its normal-model risk provides an interval of strict improvement, not necessarily around zero. A normal prior of width tau puts mass of order one over tau there, so the rival would gain at least a constant times epsilon over tau in Bayes risk. For large tau that gain is larger than the whole gap, which is impossible. So X is admissible in one dimension. Chapter eleven will show that the same race between gap and mass is lost in three.
Admissibility can embarrass familiar estimators. Estimate a normal variance from ten observations by a constant times the sum of squared deviations, and plot the mean squared error, in units of sigma to the fourth, against the constant. The unbiased choice, one over n minus one, scores ; the MLE, one over n, ; and one over n plus one, , the minimum, at every value of sigma, because all three risks are proportional to sigma to the fourth. So the unbiased sample variance is inadmissible under squared error. And in 1964 Stein showed that even the best of these is inadmissible when the mean is unknown: using the sample mean's size as well does slightly better.
Numbers: Beta(ε, ε) rules → X/n; σ²: 0.222 (unbiased), 0.190 (MLE), 0.182 (n + 1)
4Exponential families as convex dualityPhD5 min
An exponential family has densities of this form: a base measure h, a statistic T, a natural parameter eta, and a normalizer A of eta. A is the log of the Laplace transform of h along T, and by Hölder's inequality it is convex. At interior natural parameters the required differentiations are valid. Its first two derivatives give the mean and variance of T: the first is the mean, the second the variance, which is also the Fisher information about eta. The score is T minus A prime of eta, so a finite interior maximum likelihood estimate, when it exists, matches the model's mean of T to the sample mean. Everything about the family is coded in the single convex function A.
The Bernoulli family, drawn. Its natural parameter is the log-odds, and its statistic is the outcome itself. On the left, A of eta, the log of one plus e to the eta: convex, with slope at each eta equal to the success probability. At eta equal to , the tangent's slope is . On the right, its convex conjugate, A star of mu: mu log mu plus one minus mu log one minus mu, which is minus the entropy of the coin. Its slope at mu equal to is again. The two derivatives are inverse maps: one carries the natural parameter to the mean, the other carries the mean back.
The conjugate is the Legendre–Fenchel transform: the largest gap between a line of slope mu and the curve A. And look at the log-likelihood of n observations: n times eta times the average of T, minus A of eta. Maximizing the parameter-dependent part over eta is the Legendre transform at the sample mean of T. The base-density term is an additional constant in eta. Maximum likelihood in an exponential family is convex duality. The two parametrizations, natural and mean-value, are dual coordinates, and in a full minimal steep regular exponential family, an interior MLE exists when the sample statistic is inside the convex support. Without steepness, the safe condition is that it lie in the image of the mean map. Barndorff-Nielsen's theory makes these distinctions precise. All heads, in a Bernoulli sample, lies on the edge: no finite log-odds.
Duality also gives the family its geometry. The Bregman divergence of a convex function is the gap between the function and its tangent line. For A star, that gap is exactly the Kullback–Leibler divergence between the two members of the family. For coins with success probabilities point three and point seven, both are . And the deviance of Part twenty-four, the likelihood-ratio statistic, is twice n times the Bregman gap between the sample mean and the fitted mean, for the corresponding full canonical model, using the appropriate boundary extension when needed.
In the Poisson family A is the exponential function, so the mean, the variance and A itself all coincide: one blue curve. Dashed in gold, the information about eta, the same curve again. The information about eta is lambda; about lambda it is one over lambda. The sample mean is unbiased for lambda with variance lambda over n, exactly the Cramér–Rao bound. But no unbiased estimator of the log of lambda exists at all, if the estimator must be finite-valued and integrable at every positive lambda. As lambda decreases to zero, its expectation tends to its value at the all-zero sample, whereas log lambda diverges to minus infinity. Within a regular one-parameter full exponential family, a globally efficient unbiased estimator is affine in the canonical statistic, and hence estimates an affine function of the mean map. Such characterizations require the score and moment regularity: the bound singles out the family's dual coordinates.
Why do exponential families matter so much? Edwin Pitman, Bernard Koopman and Georges Darmois proved independently, in 1935 and 1936, that under the usual smooth iid model and statistic regularity, a nonpathological sufficient statistic of fixed dimension for every sample size, together with parameter-independent support, forces an exponential family. Arbitrary measurable encodings of the whole sample into one real number are excluded by those regularity conditions. Data reduction without loss, at every n, essentially characterizes them. The uniform on zero to theta escapes because its support moves; its maximum is sufficient. And the Cauchy location family, at the other extreme, admits no reduction below the sorted sample: the next chapter makes these ideas precise.
Numbers: KL(0.3 ‖ 0.7) = Bregman gap = 0.3389
5Sufficiency in generalPhD4 min
Sufficiency in general: when can data be thrown away without loss? Fisher's definition, from 1922: a statistic T is sufficient if, once T is known, the conditional law of the rest of the data no longer depends on the parameter. In Part forty-four's language, conditional expectations given the sigma-algebra of T can be chosen the same for every theta. Paul Halmos and Jimmie Savage proved the factorization theorem in this generality in 1949: for a family dominated by a common sigma-finite measure, T is sufficient exactly when each density factors into a function of theta and T, times a function of the data alone. The key step is a lemma: a family dominated by a sigma-finite measure admits a dominating countable mixture of its own members, which plays the role of a reference measure that no parameter value can see past.
Sufficient statistics are not unique: the whole data set is one. The useful one is minimal, a function of every other sufficient statistic, the coarsest summary that loses nothing. Erich Lehmann and Henry Scheffé gave a test in 1950: two samples should be lumped together exactly when their likelihood ratio does not depend on the parameter. For the normal, the ratio involves the data only through the sums of the observations and of their squares, so those two numbers, or equivalently its mean and the sample variance, are minimal sufficient for n at least two.
A small catalogue. For the normal, the mean and the variance; for the Poisson and the binomial, the total count; for the uniform on zero to theta, the maximum. These are all complete, a property defined next. The uniform on theta to theta plus one needs both the minimum and the maximum, and the normal whose standard deviation equals its mean, a curved family, still needs two numbers for one parameter; neither is complete. For the Cauchy and the Laplace location families, nothing short of the whole sorted sample will do.
A statistic is complete if every function integrable under all parameter values, with mean zero for every theta, vanishes almost surely under every model law. For the binomial, a function with mean zero gives a polynomial in the odds that vanishes for every value of the odds, so every coefficient is zero: the count is complete. For the uniform on theta to theta plus one, the range minus its expectation, n minus one over n plus one, has mean zero for every theta but is not zero: the minimal sufficient statistic is not complete. Completeness says that the statistic carries no component whose average is always nothing, no pure noise. That is exactly what the next chapter needs to make a best unbiased estimator unique.
Here is that offending piece of the uniform's sufficient statistic. Take five observations from the uniform on theta to theta plus one. The range, the maximum minus the minimum, has this beta-shaped density, and shifting theta shifts every observation together, so the range's law is the same for every theta: it is ancillary, carrying no information about theta by itself. Its mean, , is the constant that makes the counterexample to completeness. Yet the range is far from useless: a wide range pins theta down tightly. Chapter seven returns to this.
Most of the families in this course are covered by one theorem. In an exponential family whose natural parameter ranges over a set with nonempty interior, the sum of the statistics T is both complete and minimal sufficient. The proof: if a function of T has mean zero on an open set of natural parameters, a two-sided Laplace transform vanishes on an open set, and by its uniqueness the function is zero. Curved families, with fewer free parameters than statistics, like the normal whose mean equals its standard deviation, can fail it.
Numbers: the uniform range, ancillary, mean (n − 1)/(n + 1) = 0.667
6Rao-Blackwell and Lehmann-ScheffePhD5 min
Rao–Blackwell and Lehmann–Scheffé: averaging over what does not matter. Take an integrable estimator with actions in a convex space and average it over the data given a sufficient statistic. Because T is sufficient, that conditional expectation does not depend on theta, so it is a genuine estimator, computable from data. By the tower property it has the same expectation, hence the same bias. By the conditional variance decomposition for square-integrable estimators its variance is no larger, by the average conditional variance that was thrown away. And for any convex loss, Jensen's inequality gives no larger risk at every theta whenever the relevant convex-loss expectations exist. That is the theorem of C. R. Rao, 1945, and David Blackwell, 1947: under convex loss, only functions of a sufficient statistic are worth considering.
Part nine's tanks, Rao–Blackwellized in a picture. There are tanks and we capture serial numbers. A silly unbiased estimator uses only the first serial seen: twice it, minus one. Each blue dot is one simulated capture, plotted against the largest serial in that capture. The maximum is sufficient. Given that it equals m, the first serial is m itself with probability one over k, and otherwise uniform below m. Averaging gives the green line, m times k plus one over k, minus one: the vertical scatter at each m collapses onto its mean. The standard deviation falls from to , and the estimator is still unbiased.
Lehmann and Scheffé's theorem adds completeness. Suppose T is complete and sufficient, and some function of T is unbiased for the quantity we want. Then it is the only one: two unbiased functions of T differ by a function with mean zero everywhere, which completeness forces to vanish. Now take any unbiased estimator at all. Rao–Blackwellizing it gives an unbiased function of T, which must be that same one. So the unbiased function of a complete sufficient statistic beats every unbiased estimator, at every theta, under every convex loss: the uniformly minimum-variance unbiased estimator. Part nine stated this; here it is proved.
The three unbiased estimators side by side, for tanks and serials, with exact and simulated standard deviations. One serial alone: about . The method of moments, twice the average serial minus one: . The UMVUE: , best among all unbiased estimators, by Lehmann–Scheffé. And the real thing: Richard Ruggles and Henry Brodie's serial-number estimates of monthly German tank production, against Allied intelligence and the German records found after the war. The statisticians were far closer.
But unbiasedness can be absurd. Observe one Poisson count with mean lambda and estimate e to the minus two lambda: the chance of no events in the next two periods. Expanding the Poisson probabilities shows that the only unbiased estimator is minus one to the power X: plus one for an even count, minus one for an odd count. The count is complete and sufficient, so this is the UMVUE, and it can estimate a probability by minus one. That probability is one minus e to the minus two lambda, divided by two; it approaches a half only as lambda grows. Replacing minus one by zero, the indicator that X is even, is biased but dominates it everywhere. And the maximum likelihood estimate, e to the minus two X, is better still across this range. Best among unbiased estimators can mean best among bad ones.
The lessons. For integrable estimators, convex actions and convex loss, Rao–Blackwellization cannot increase risk. Equality is possible. Lehmann–Scheffé, with completeness, singles out the best unbiased estimator. But unbiasedness is a restriction on the competition, not a virtue in itself, and it can exclude every sensible rule. Chapter three's sample variance and this chapter's minus one to the X are both unbiased and both inadmissible.
Numbers: tanks: SD 173 → 70 → 43; (−1)^X: MSE 1 − e^{−4λ}
7Ancillarity and BasuPractice5 min
Ancillarity and Basu's theorem: statistics that say nothing about theta, yet matter. A statistic is ancillary if its distribution does not depend on the parameter at all, like the uniform range of chapter five. Debabrata Basu proved in 1955 that such a statistic is independent of any complete sufficient statistic. Take the conditional probability of an event for V given T, minus its unconditional probability; sufficiency makes this a function of T alone, and ancillarity makes the second term a constant. Its mean is zero for every theta, so completeness forces it to be zero: the conditional law of V given T equals its unconditional law. T and V are independent, at every theta.
The classic application. Take normal observations and, for the moment, treat sigma as known. Then the sample mean is complete and sufficient for the mean. The sample variance is computed from deviations about the mean, so shifting mu leaves its distribution unchanged: it is ancillary. Basu's theorem says they are independent for every mu, and since sigma was arbitrary, for every sigma too. Eight hundred pairs are displayed; the reported correlation uses all four thousand simulated samples: . That is the independence of x-bar and s squared behind Student's t, in three lines. It is special to the normal: for exponential data the two are strongly correlated.
But ancillary statistics can matter enormously, as David Cox showed in 1958. A fair coin decides whether a quantity is measured with a precise instrument, standard deviation one, or a rough one, standard deviation ten, and we know which was used. Which instrument is ancillary: its probability does not depend on the quantity. An interval of plus or minus covers the truth ninety percent of the time over repetitions of the whole experiment. But given the instrument, it covers essentially always with the precise one, and only eighty percent of the time with the rough one. Its conditional coverage misses the nominal ninety percent for each instrument, although its unconditional coverage is valid. The sensible interval conditions on the instrument: plus or minus , or plus or minus , each covering ninety percent of the time.
The same thing happens without any coin. Take observations uniform on theta minus a half to theta plus a half, and estimate theta by the midrange. The interval midrange plus or minus covers ninety percent of the time overall. But sort the samples by their range, which is ancillary. When the range is small, the sample says little, and the interval covers less than half the time; when it is large, the data pin theta down and the interval always covers. Conditioning on the range, theta must lie between the maximum minus a half and the minimum plus a half, The frequentist parameter is fixed. Conditional on the range R, the midrange error is uniform between minus and plus one minus R over two. Equivalently, a flat-prior posterior is uniform on the observed compatible interval; that is a separate Bayesian interpretation. The central ninety percent of that interval covers ninety percent of the time at every range: honest for the sample at hand.
Cox's conclusion became the conditionality principle: inference should be conditional on ancillary features of the experiment that was actually performed. In 1962 Allan Birnbaum derived the likelihood principle from particular formulations of sufficiency and mixture conditionality. The exact formulation of conditionality matters; which much of frequentist practice violates, as Part twenty-two's stopping-rule example showed; the argument is still debated. A useful practical lesson is to report the precision of the experiment you ran, Efron and Hinkley studied observed information as an approximation to conditional precision in regular models. Observed information is not generally ancillary or uniformly preferable to expected information.
Numbers: x̄, s² correlation −0.02 (exponential 0.70); Cox: 100% / 80%; uniform 42% → 100% by range
8Information inequalitiesPhD5 min
Information inequalities: how small can the variance of an unbiased estimator be? First the general Cramér–Rao bound, for a vector parameter. Assume a regular model with justified differentiation of expectations, finite second moments and nonsingular information. The score then has mean zero and covariance equal to the Fisher information matrix. If T is unbiased for g of theta, differentiating its expectation under the integral shows that the covariance of T with the score is the gradient of g. The joint covariance matrix of T and the score is positive semidefinite, and its Schur complement gives the bound: the variance of T is at least the gradient of g, times the inverse information, times the gradient again. Equality needs T to be an affine function of the score, at the parameter value in question. A global exponential-family characterization requires additional regularity; being an exponential family alone does not make every target efficient.
For the normal with unknown mean and variance, the information matrix is diagonal. The bound for the variance is two sigma to the fourth over n, but the sample variance, the UMVUE, has two sigma to the fourth over n minus one. Its efficiency is n minus one over n: at five observations, at fifty. Since the UMVUE is best among unbiased estimators, no unbiased estimator attains the bound. The matrix form also prices ignorance: the bound for one parameter with the others unknown uses the inverse matrix's diagonal entry, which is at least one over the information's entry, with equality only when the parameters are orthogonal, as the normal's mean and variance are.
When the bound is not attained, it can be sharpened. Anil Bhattacharyya, in 1946, used the higher derivatives of the density, each divided by the density. Projecting T onto all of them, instead of the score alone, gives a larger lower bound. For theta squared from n normal observations, the first two of these functions are uncorrelated, with variances n and two n squared, and the derivatives of theta squared are two theta and two. The second-order bound is four theta squared over n plus two over n squared, and the UMVUE, x-bar squared minus one over n, attains it exactly.
Drawn for ten observations. In blue the Cramér–Rao bound, four theta squared over n. In green the UMVUE's variance, which coincides with Bhattacharyya's second-order bound. The absolute gap is constant, two over n squared. Its relative size is largest at theta equal to zero, where the first derivative of theta squared vanishes and the Cramér–Rao bound says nothing at all, while the true minimum is two over n squared.
Douglas Chapman and Herbert Robbins removed the regularity altogether in 1951. Use unbiasedness at two parameter values, theta and theta prime. The difference of the two means is the covariance of T with the likelihood ratio minus one, by a change of measure. Cauchy–Schwarz bounds the variance of T below by the squared difference over the ratio's second moment, and we may take the supremum over theta prime. Comparison uses those theta prime whose model law is absolutely continuous with respect to the law at theta. Finite estimator variance and a finite likelihood-ratio second moment give a nontrivial bound; derivatives are not required. Letting theta prime approach theta recovers Cramér–Rao when the model is smooth.
The uniform on zero to theta is the standard non-regular case: the support moves with theta, and the interior score does not satisfy the usual zero-mean identity, and Part nine's tanks broke the Cramér–Rao bound. Chapman–Robbins still applies, with theta prime below theta. Here is its bound against the UMVUE's variance, for two up to a hundred observations. The ratio falls toward point six five, the maximum of s squared over e to the s minus one, and the best theta prime closes in on theta. Both shrink like one over n squared, faster than the usual regular root-n squared-error rate over a neighborhood. A biased estimator can still be superefficient at individual parameter values.
A caution. These bounds are for unbiased estimators, one parameter value at a time. Joseph Hodges's estimator of 1951 uses the sample mean unless it is very close to zero, and then reports zero. At theta equal to zero it beats the information bound, a phenomenon called superefficiency, but it pays with large risk at parameter values near zero. The correct asymptotic version of the bound is local and minimax: Jaroslav Hájek's and Lucien Le Cam's theory, in Part forty-seven.
Numbers: s² efficiency 0.8–0.98; Chapman–Robbins / UMVUE 0.72 → 0.65
9EquivariancePhD5 min
Equivariance: rules that respect the symmetry of the problem. Chapter one's second escape: restrict the competition by symmetry. In a location family, each observation is theta plus an error with a known density f. If we shift every observation by c, the problem is the same problem shifted, so a sensible estimate should shift by c too. Such rules are called equivariant; the mean, the median and the midrange all are. An equivariant rule's risk is the same at every theta, because shifting theta just shifts the data. So the risk curve is a single number, the stopped clocks are excluded, and a best equivariant rule can exist: we just minimize that number.
Every equivariant rule is one of them, chosen to have finite risk, such as the median for five Cauchy observations, minus some function of the gaps between the observations. The gaps are ancillary: their law does not involve theta. Minimizing the risk means choosing that function as the conditional mean of the first rule given the gaps, with theta set to zero. Edwin Pitman worked out the answer in 1939: the integral of t times the likelihood, over the integral of the likelihood. That is the posterior mean under a flat, improper prior on theta. When these integrals and the required moments exist, the best equivariant estimator is a generalized Bayes rule, as chapter three said the good ones would be.
Pitman's estimator under four error laws, five observations each, against the mean and the median. For normal errors, it is the mean, and the median is about forty percent worse. For Laplace errors, the median beats the mean, and Pitman beats both. For uniform errors, Pitman is the midrange, with about a third of the median's mean squared error. For Cauchy errors, the mean has no finite risk at all; the median is reasonable, and the numerical Pitman approximation has about seventeen percent less estimated risk in this finite simulation. This is a Monte Carlo comparison, with whole-line adaptive integration, rather than an exact percentage for the population. In every case the best equivariant rule adapts itself to the shape of the errors.
The uniform case is worth seeing exactly. The sample mean's mean squared error is one over twelve n. The midrange, Pitman's estimator here, has one over two times n plus one times n plus two. The ratio of the two is n plus one times n plus two over six n, which grows without bound: nearly nine at fifty observations, because it converges at chapter eight's rate of one over n squared: the edges of the data carry almost all the information.
The same idea works for scale. For normal observations with unknown mean mu and variance sigma squared, use relative squared loss for estimating the variance and the full location-scale group. Shifting and rescaling the data must leave a variance estimate unchanged by shifts and multiply it by the squared scale factor. For normal data, the best location-scale-equivariant estimator of the variance divides the sum of squares by n plus one: chapter three's winner, now with a reason. And again it is generalized Bayes, under the right Haar measure d mu d sigma over sigma. For this relative loss the Bayes action is the ratio of posterior inverse-variance moments, not the posterior mean of the variance. If the mean is instead known to be zero, the pure-scale answer uses the uncentered sum of squares divided by n plus two.
The general setting: a group acts on the sample space and on the parameter, and the loss is unchanged by it. Under conditions, the best equivariant rule is the generalized Bayes rule for the right Haar measure of the group, the flat prior and one over sigma being two cases. Meyer Girshick and Savage proved in 1951 that Pitman's estimator is minimax. Admissibility results for general location families require their own moment and regularity assumptions. For the identity-covariance normal-mean problem, the exact threshold is one or two dimensions versus at least three. For normal errors in p dimensions, Pitman's estimator is just X: best equivariant, minimax, and, as the hook showed, inadmissible. Equivariance cannot see Stein's paradox, because the James–Stein estimator is not translation equivariant: it shrinks toward a particular point.
Numbers: Pitman ÷ median: 0.72, 0.90, 0.35, 0.83 (normal, Laplace, uniform, Cauchy)
10Stein's lemma, SURE, James-SteinPhD5 min
Stein's tool was a one-line identity. The standard normal density's derivative is minus x times the density. So for X normal with mean theta, the expectation of X minus theta times h of X is, after integrating by parts, the expectation of h prime of X, for any smooth h that does not grow too fast. Check it with h equal to sine and theta equal to point seven: four hundred thousand simulated draws give and , against the exact . In p dimensions the same identity holds with the inner product on the left and the divergence of g on the right. This is the lemma behind Part forty-three's Stein's method, in its original role.
For a weakly differentiable correction with integrable squared norm and divergence, write the estimator as X plus g of X, and expand its squared error. The cross term is exactly the left side of Stein's lemma, so the risk equals p, plus twice the expected divergence of g, plus the expected squared length of g. Drop the expectations, and the quantity inside depends on the data alone: Stein's unbiased risk estimate, SURE. Its mean is the risk at every theta. We can estimate how well an estimator is doing without knowing the truth, and compare fixed candidate estimators. Selecting a minimum over many SURE values can introduce selection optimism; the selected value is not automatically unbiased for the selected rule's risk.
Apply it to James–Stein, whose correction pulls x toward zero by p minus two over its squared length. The divergence of x over its squared length is p minus two over that squared length, so the divergence of g is minus p minus two squared over the squared length, and g's own squared length is p minus two squared over the squared length. The two combine: SURE is p minus p minus two squared over the squared length of X, which is below p almost surely, with an arbitrary definition at the probability-zero origin. Taking expectations, the risk is below p for every theta. The condition p at least three enters through the expectation of one over the squared length, which is finite only from three dimensions on. That is Stein's paradox, proved in four lines.
The risk in ten dimensions. The blue line is X, with risk ten. The green curve is James–Stein's exact risk, computed from the fact that the squared length of X is a Poisson mixture of central chi-squares, so the expectation of one over it is a single series. In gold, simulated, the positive-part version, which refuses to shrink past zero when the squared length of X is smaller than p minus two. It is better everywhere, so James–Stein itself is inadmissible; The positive part is also inadmissible in this Gaussian squared-error problem: complete-class results require admissible rules to have an analytic generalized Bayes form, which its kink violates.
How good is SURE as an estimate? Four hundred data sets in ten dimensions, all means equal to one. Across, SURE; up, the loss actually suffered. SURE uses only the length of X and can even be negative. It estimates expected risk rather than the realized loss: the cloud is wide and nearly vertical. But on average the two agree: mean SURE , mean loss , and the exact risk at this theta is . SURE is an unbiased estimate of risk, not a prediction of the loss, which is why it is used to compare estimators and tune them, as Part twenty-nine tuned its wavelet thresholds.
Back to Part twenty-five's eighteen hitters of 1970. Efron and Morris transformed each early-season average so that it is roughly normal with variance one. Shrinking toward the grand mean costs one degree of freedom, so the factor uses p minus three; it keeps only of each hitter's deviation. SURE, computed from the early-season data alone, gives an approximate Gaussian-model risk estimate of about , against eighteen for the raw averages. Against the rest of the season, the squared errors against the remaining-season averages were for James–Stein and for the raw averages. Those later averages are noisy validation targets, not the true batting probabilities. This retrospective SURE calculation uses only the early sample; its exact unbiasedness belongs to the Gaussian approximation, not the finite binomial batting data.
Numbers: lemma 0.4636 vs 0.4642 (exact 0.4639); hitters SURE 6.1, loss 5.0 vs 17.6
11Why three dimensionsPhD5 min
Why should the dimension three matter? Lawrence Brown's answer of 1971 starts from generalized Bayes rules. A prior convolved with normal noise gives m. With an improper prior, m need not integrate to one; we require a finite positive convolution and the necessary posterior moments. The posterior mean is x plus the gradient of log m: Tweedie's formula, which Robbins credited to Maurice Tweedie. The flat prior has constant marginal, so its generalized Bayes rule is x itself. And chapter ten's SURE, with g equal to the gradient of log m, shows that the risk is p minus an expectation that involves the Laplacian of m: the analysis of estimators has become potential theory.
Brown's theorem. Under Brown's recurrence and admissibility regularity conditions, the generalized Bayes rule is admissible precisely when the associated diffusion is recurrent. With standard Brownian noise its drift is one half the gradient of log m, not the full gradient: it keeps coming back to every ball. When the marginal is spherically symmetric, the condition becomes an integral test: the integral of one over r to the p minus one times m of r must diverge. For the flat prior, m is constant and the integral of r to the one minus p diverges exactly when p is at most two. So X is admissible exactly in the dimensions where Brownian motion is recurrent: one and two. Stein's paradox in three dimensions is Pólya's transience in three dimensions.
The integral test, drawn against the log of the upper limit R. In one dimension, R minus one: it diverges quickly. In two, the log of R: it diverges, but only logarithmically. In three, one minus one over R, which converges to one. Two dimensions is the borderline: X is admissible there, but only just, which is why James and Stein need p minus two, and why the paradox starts at three.
The same dichotomy for Brownian motion itself. Start it at distance two from the origin and ask whether it reaches the unit ball before wandering out to radius R. In one dimension, almost surely, as R grows. In two, also almost surely in the limit, though the probability creeps up like a ratio of logarithms. In three, it tends to one half: half the paths escape to infinity and never come back. Part forty-four saw the same thing for random walks: within ten thousand steps they had returned to the origin with probability point nine nine, point seven one and point three three in one, two and three dimensions.
Why should recurrence be the criterion? Recall chapter three's race. To beat X, a rival must improve somewhere and is pinned down by Bayes risks under wider and wider priors. The gap between X and the best Bayes rule closes as the priors widen. Whether a rival can slip through the gap is measured by a quantity from potential theory, the capacity of a ball: how much charge it takes to hold it at unit potential against infinity. It is zero in one and two dimensions, positive in three or more. Transience in three or more dimensions permits nonconstant superharmonic constructions that reduce risk. James–Stein needs no compensating risk increase at other parameter values; this capacity discussion is intuition, not a literal transfer of risk to infinity. The space is too big for X to be admissible.
The test sorts priors by their tails. The flat prior gives X, admissible only up to two dimensions. For p at least three and zero at most k below p, a prior falling like the norm of theta to the minus k gives a marginal with the same tail, and the integral diverges exactly when k is at least p minus two. The borderline case, k equal to p minus two, is the harmonic prior, whose generalized Bayes rule Stein showed in 1981 to be both admissible and minimax. And proper priors always pass, as chapter three proved directly. The heavier the prior's tails, the closer its rule is to X; just light enough, and the rule becomes admissible.
Numbers: ∫ r^{1−p}: R − 1, log R, 1 − 1/R; BM return 1, 1, ½
12Minimaxity and admissibility for normal meansPhD5 min
Minimaxity and admissibility in the normal-means problem: better than X, and beyond improvement. To prove X is minimax, take proper normal priors with variance tau squared. Their Bayes risks increase to p, while X has constant risk p. This lower bound then makes every estimator with risk at most p minimax too. Alexander Baranchik's family shrinks by r of s times p minus two over s, where s is the squared length of x. Chapter ten's SURE, worked out for this correction, is p minus two terms: one proportional to r times two minus r, and one to the derivative of r. For p at least three, locally absolutely continuous r and the required integrability, if r stays between zero and two and never decreases, SURE is at most p for every data set, and every such rule is minimax. r equal to one is James–Stein; capping the shrinkage at x itself gives the positive part. This family has risk no larger than X, and they compete among themselves.
Compare the factors by which three of them multiply x, in dimensions. James–Stein's factor goes negative when the squared length of x is below p minus two, flipping the estimate through the origin, which is absurd. The positive part clips it at zero, leaving a kink. In green, the posterior mean under a proper prior due to William Strawderman: smooth, and always strictly between zero and one. Brown showed that admissible estimators in this problem are smooth, generalized Bayes rules, so the positive part's kink is a sign of its inadmissibility.
Strawderman's prior is a scale mixture of normals: given lambda, theta is normal with variance one over lambda minus one, and lambda has a density proportional to lambda to the minus a on zero to one. Given lambda, X is normal with variance one over lambda, and the posterior mean shrinks x by the posterior mean of lambda. That is a ratio of two incomplete gamma integrals. For a below one the prior is proper, so the rule is admissible; and in 1971 Strawderman proved it minimax whenever p is at least five and a is at least three minus p over two. Here p is five and a is one half: an estimator that beats X everywhere and cannot itself be beaten everywhere. His construction needs at least five dimensions.
Their risks in five dimensions, simulated with common random numbers. X has risk five. James–Stein and its positive part are below it everywhere, the positive part most at the origin. A Baranchik rule with a continuous, nondecreasing, piecewise-smooth r sits close to the positive part. Strawderman's proper Bayes rule has risk at the origin, far below the others, and gives some of that back far away, though it stays under five. All are minimax; none is below all the others everywhere. Among minimax rules, the choice is a choice of where to spend the improvement, which is a prior belief in disguise.
In numbers, at five distances from the origin. At the origin the proper Bayes rule's risk is , against for the positive part and for James–Stein. At a squared distance of forty, every shrinker is back near five, Strawderman's closest of all: it spent its improvement near the origin. The gains are large only where the prior, explicit or implicit, puts its weight.
The theory extends in every direction. One can shrink toward any fixed point, or toward a fixed linear subspace, including the grand-mean subspace, by leaving its projection untouched and shrinking the orthogonal residual. The residual dimension must be at least three. Data-adaptive selection of the subspace needs additional analysis. Unequal variances and unknown noise levels were handled by James Berger and others. But the guarantee is always for the total loss, and a coordinate far from the rest can be badly over-shrunk. Efron and Morris's limited-translation rules of 1972 cap how far any one coordinate may be moved. And what shrinkage does to an interval, the Board shows next.
Numbers: p = 5 at θ = 0: 1.99 (JS), 1.39 (positive part), 0.90 (Strawderman)
13Empirical Bayes theoryPractice6 min
Empirical Bayes theory: learning the prior from many problems at once. Herbert Robbins's idea of 1956. Many units each have a Poisson count with its own rate, Under the working model, the rates are iid from a common unknown distribution g and counts are conditionally independent with equal exposure. If g were known, the Bayes rule for a unit with count x would be this ratio of integrals. But theta times theta to the x over x factorial is x plus one times theta to the x plus one over x plus one factorial, so the ratio is x plus one times the marginal probability of x plus one over that of x. Those marginal probabilities can be estimated by counting: the Bayes rule can be estimated without ever estimating the prior. Jerzy Neyman later called it a breakthrough in the theory of statistical decision making.
Efron and Hastie's example: automobile insurance policies, and how many claims each made in one year. If a policy's rate remains stable and the next year has equal exposure, Robbins's formula estimates its next-year mean count for a policy with x claims this year: for a policy with none, for one claim, for two. Far below the raw counts: the fitted mixture attributes part of the variation to count noise rather than persistent rate differences. But it rests on small counts in the tail: with five claims it says six, with six it says . Fitting a gamma prior, the negative binomial, smooths it into a straight line. And the nonparametric maximum likelihood prior gives a smooth, nondecreasing posterior-mean rule within the Poisson-mixture model. That model remains an assumption.
The same rules as curves. The grey diagonal is the raw count. Robbins's estimates in red follow a smooth path for small counts and then jump around where there are only a handful of policies. The gamma prior's rule is linear in x, the familiar credibility formula of actuaries. The NPMLE's rule bends: it shrinks hard for small counts and less for large ones, and it is increasing, as a Poisson posterior mean must be nondecreasing; a point-mass prior gives a constant rule. It also fits the counts better than the gamma prior, by about seven units of log-likelihood.
The nonparametric maximum likelihood estimate of the prior, due to Jack Kiefer and Jacob Wolfowitz in 1956, maximizes the marginal likelihood over all distributions. The marginal is linear in g, so the log-likelihood is concave and the problem is convex, over a specified mixture model. The unrestricted likelihood criterion has no smoothing parameter, but numerical grids, support domains and stopping tolerances still matter. Bruce Lindsay showed in 1983 that there exists a discrete maximizer with no more atoms than there are distinct observations. The kit offers fixed-grid EM, while this Poisson example uses support optimization with a global directional-score likelihood certificate. Grid EM is an approximation unless its support and optimization errors are controlled. Other approaches include the interior-point methods of Roger Koenker and Ivan Mizera.
Does learning the prior work as the number of problems grows? Take normal means that are zero ninety percent of the time and four otherwise, a sparse prior that no normal prior describes. James–Stein, which in effect fits a normal prior, has risk about point six per coordinate however many means there are. The oracle Bayes rule, which knows the true prior, does much better. The NPMLE plugged into Tweedie's formula, the general maximum likelihood empirical Bayes rule of Wenhua Jiang and Cun-Hui Zhang, starts at twice the oracle's risk with fifty means The displayed curves show raw per-coordinate squared-error risk, not regret; regret is the excess above the oracle risk. These four to twelve replications show a broad reduction, with Monte Carlo uncertainty, rather than a proof of a rate. Jiang and Zhang established asymptotic regret bounds for appropriately computed GMLEB estimators under their assumptions; that theorem is not automatically a guarantee for this finite-grid, finite-iteration approximation.
Bradley Efron's 2014 survey sorts empirical Bayes methods into two kinds. f-modeling estimates the marginal density of the data and plugs it into Robbins's or Tweedie's formula. g-modeling estimates the prior itself and then computes its Bayes rule, which gives coherent posterior estimates. Nondecreasing posterior means hold in these Poisson and normal mean models, and posterior means lie in the convex hull of the prior support; such shape statements are not universal for every decision problem. James–Stein has an empirical Bayes motivation through estimating a normal-prior variance; the raw rule with a negative factor is not the posterior mean under a fixed proper normal prior, as Efron and Morris showed in 1973. So the three threads of this part meet: Wald's frequentist risk as the criterion, Stein's shrinkage as the phenomenon, and Robbins's empirical Bayes as the method, all in Bayesian form.
Numbers: Robbins 0.168, 0.363, 0.527, …, 6.0; NPMLE raw risk 0.26 → 0.165; population oracle risk 0.14852
Recap, problems, and the road aheadAll tracks3 min
Part forty-five in fourteen lines. Stein's paradox. Wald's risk, admissibility, minimax and Bayes rules, and the risk set with its least favourable prior. Complete classes, and admissible rules as limits of Bayes rules. Exponential families as a convex function and its conjugate. Sufficiency, minimality and completeness; Rao–Blackwell and Lehmann–Scheffé, with the absurd minus one to the X. Basu's theorem and Cox's two instruments. The information bounds of Cramér and Rao, Bhattacharyya, and Chapman and Robbins. Pitman's equivariant estimator. Stein's lemma, SURE and James–Stein; Brown's link between admissibility and recurrence; Baranchik's and Strawderman's minimax rules; and Robbins's empirical Bayes, with a numerical NPMLE approximation and the separate asymptotic theory for vanishing regret.
A promise for the next part. This one set out what makes an estimator good. Tests and intervals have so far been judged by whether they keep their size and coverage, as the Board checks. Part forty-six asks when a test is optimal, from the Neyman–Pearson lemma to Lehmann's uniformly most powerful unbiased tests, and what a confidence interval can honestly promise.
Where it comes back. Part forty-six draws risk sets and least favourable priors for tests. Part forty-seven gives the local asymptotic minimax theorem of Hájek and Le Cam. Part fifty-three studies the frequentist risk of Bayes rules as the sample grows. Part fifty computes minimax rates with the methods of Le Cam, Assouad and Fano. And Part fifty-two takes empirical Bayes and shrinkage into high dimensions.
Six problems, with full solutions in the README. The binomial minimax rule; completeness of the uniform maximum and its UMVUE; the absurd unbiased estimator; Basu's theorem for the range; Pitman's estimator for a shifted exponential; and the SURE-optimal amount of shrinkage. Pause here if you want to try them.
The books this part follows: Lehmann and Casella's Theory of Point Estimation, Berger's Statistical Decision Theory, Ferguson, Keener, and Brown's monograph on exponential families, with Efron and Hastie; and the papers from Wald to Jiang and Zhang.
Forty-five parts of sixty-five. Best is a word that needs a definition: a risk, a class of rules, or a prior, and in three dimensions the obvious answer loses. Next, Part forty-six: the theory of testing and confidence.
Where it goes next. Risk sets and least favourable priors return for tests in Part 46; the local asymptotic minimax theorem replaces the Cramer-Rao bound in Part 47; minimax rates come in Part 50, shrinkage in high dimensions in Part 52, and the frequentist risk of Bayes rules in Part 53.
Key results
The part's results in one place, for revision.
Try it
Lab 45 · A risk set, its minimax rule, and Stein's paradox
Enumerate all sixteen rules for deciding whether a coin tossed three times is fair or biased, find the admissible edge, the Bayes rules and the minimax rule, and check the minimax theorem; then simulate the James-Stein estimator in ten dimensions against its exact risk.
python -m videos.stats.labs 45
needs numpy, scipy, matplotlib · download lab45.py ·
source on GitHubrules, corners of the admissible edge 16, 5
minimax risk (linear programme) 0.4042 at risk point (0.4042, 0.4042)
largest Bayes risk over all priors 0.4041 at P(fair) = 0.672
least favourable prior (LP dual) P(fair) = 0.672
|theta|^2 = 0: James-Stein risk simulated 2.000 exact 2.000 positive part 1.263 (X: 10)
|theta|^2 = 4: James-Stein risk simulated 4.377 exact 4.376 positive part 3.975 (X: 10)
|theta|^2 = 10: James-Stein risk simulated 6.201 exact 6.209 positive part 6.104 (X: 10)
|theta|^2 = 40: James-Stein risk simulated 8.619 exact 8.617 positive part 8.619 (X: 10)
The admissible rules are the threshold rules and their mixtures, the minimax rule equalizes the two risks at the largest Bayes risk, and in ten dimensions James-Stein's risk stays below 10 everywhere.
The code (83 lines; it asserts its own result)
"""Lab 45: draw a whole decision problem's risk set, find its minimax rule, and check James-Stein's exact risk."""
import numpy as np
from scipy import stats
from videos.coursekit import labs
from explainer.stats.kit import decision
TITLE = "A risk set, its minimax rule, and Stein's paradox"
GOAL = ("Enumerate all sixteen rules for deciding whether a coin tossed three times is fair or biased, find the "
"admissible edge, the Bayes rules and the minimax rule, and check the minimax theorem; then simulate the "
"James-Stein estimator in ten dimensions against its exact risk.")
TASKS = [
"Change the cost of missing a biased coin from 2 to 5. Which threshold rules does the minimax rule mix now, and what is the least favourable prior?",
"Toss the coin five times instead of three (six possible counts, so 2**6 = 64 rules). How many corners does the lower edge have?",
"Set p = 2 in the James-Stein simulation with the factor (1 - c / |x|**2) for a few c > 0. Can you find a c that beats X at every theta?",
]
def run(seed=0):
rng = np.random.default_rng(seed)
lab = labs.Lab()
# 1. The coin problem of chapter 2: states fair (0.5) and biased (0.8), X = heads in 3 tosses, actions fair/biased.
x = np.arange(4)
px = np.array([stats.binom.pmf(x, 3, 0.5), stats.binom.pmf(x, 3, 0.8)])
loss = np.array([[0.0, 1.0], [2.0, 0.0]]) # calling a fair coin biased costs 1; missing a biased coin costs 2
rp = decision.risk_points(px, loss)
R = rp["R"]
edge = decision.lower_boundary(R)
thresholds = np.array([[px[0, c:].sum(), 2 * px[1, :c].sum()] for c in range(5)])[::-1] # "biased if X >= c"
mm = decision.minimax(R)
priors = np.linspace(0, 1, 2001)
bayes = np.array([decision.bayes_rule(R, pi)["bayes_risk"] for pi in priors])
lab.row("rules, corners of the admissible edge", f"{len(R)}, {len(edge)}")
lab.row("minimax risk (linear programme)", f"{mm['value']:.4f} at risk point ({mm['point'][0]:.4f}, {mm['point'][1]:.4f})")
lab.row("largest Bayes risk over all priors", f"{bayes.max():.4f} at P(fair) = {priors[bayes.argmax()]:.3f}")
lab.row("least favourable prior (LP dual)", f"P(fair) = {mm['least_favourable'][0]:.3f}")
assert np.allclose(edge, thresholds[np.argsort(thresholds[:, 0])]), "the admissible corners are the threshold rules"
assert abs(mm["value"] - bayes.max()) < 1e-4, "the minimax theorem: min max risk = max Bayes risk"
assert abs(mm["point"][0] - mm["point"][1]) < 1e-8, "the minimax rule is an equalizer"
assert abs(mm["least_favourable"][0] - priors[bayes.argmax()]) < 2e-3
# 2. James-Stein in p = 10 dimensions: exact risk p - (p - 2)^2 E[1 / (p - 2 + 2K)], K ~ Poisson(|theta|^2 / 2).
p, reps = 10, 100_000
norms2 = np.array([0.0, 4.0, 10.0, 40.0])
exact = decision.js_risk(p, norms2)
mc, mc_pp = [], []
for n2 in norms2:
theta = np.zeros(p)
theta[0] = np.sqrt(n2)
X = theta + rng.standard_normal((reps, p))
s = np.sum(X ** 2, axis=1, keepdims=True)
mc.append(np.mean(np.sum(((1 - (p - 2) / s) * X - theta) ** 2, axis=1)))
mc_pp.append(np.mean(np.sum((np.maximum(1 - (p - 2) / s, 0) * X - theta) ** 2, axis=1)))
for n2, e, m, mp in zip(norms2, exact, mc, mc_pp):
lab.row(f"|theta|^2 = {n2:g}: James-Stein risk", f"simulated {m:.3f} exact {e:.3f} positive part {mp:.3f} (X: {p})")
assert np.all(np.abs(np.array(mc) - exact) < 0.1), "the Poisson-mixture formula"
assert np.all(decision.js_risk(p, np.linspace(0, 400, 81)) < p), "James-Stein dominates X"
assert abs(exact[0] - 2) < 1e-9 and mc_pp[0] < mc[0] - 0.2, "risk 2 at the origin; the positive part does better"
lab.note = ("The admissible rules are the threshold rules and their mixtures, the minimax rule equalizes the two "
"risks at the largest Bayes risk, and in ten dimensions James-Stein's risk stays below 10 everywhere.")
fig, ax = labs.figure(2, size=(11, 4.4))
ax[0].scatter(R[:, 0], R[:, 1], s=22, color=labs.BLUE, label="the 16 rules", zorder=3)
ax[0].plot(edge[:, 0], edge[:, 1], color=labs.GOLD, label="admissible edge (threshold rules)")
ax[0].plot([0, 1.2], [0, 1.2], color=labs.MUTED, ls=":", lw=1, label="equal risks")
ax[0].scatter(*mm["point"], s=70, color=labs.RED, zorder=4, label=f"minimax: {mm['value']:.3f}")
pi = mm["least_favourable"][0]
r1 = np.array([0, 1.0])
ax[0].plot(r1, (mm["value"] - pi * r1) / (1 - pi), color=labs.RED, lw=1, ls="--", label=f"least favourable prior {pi:.3f}")
ax[0].set(title="Fair or biased? The risk set", xlabel="risk if the coin is fair", ylabel="risk if it is biased",
xlim=(-0.03, 1.05), ylim=(-0.05, 3.1))
ax[0].legend()
g = np.linspace(0, 40, 201)
ax[1].plot(g, decision.js_risk(p, g), color=labs.GOLD, label="James-Stein, exact")
ax[1].axhline(p, color=labs.BLUE, label="X itself")
ax[1].scatter(norms2, mc, color=labs.GOLD, s=28, zorder=3, label="James-Stein, simulated")
ax[1].scatter(norms2, mc_pp, color=labs.GREEN, s=28, marker="s", zorder=3, label="positive part, simulated")
ax[1].set(title="Ten normal means: risk against |theta|^2", xlabel="|theta|^2", ylabel="expected squared error", ylim=(0, 11))
ax[1].legend(loc="lower right")
lab.fig = fig
return lab
Now change it
- Change the cost of missing a biased coin from 2 to 5. Which threshold rules does the minimax rule mix now, and what is the least favourable prior?
- Toss the coin five times instead of three (six possible counts, so 2**6 = 64 rules). How many corners does the lower edge have?
- Set p = 2 in the James-Stein simulation with the factor (1 - c / |x|**2) for a few c > 0. Can you find a c that beats X at every theta?
Problems, with solutions
Try each problem before opening its solution.
-
The binomial minimax rule. Show that \((X + \sqrt n/2)/(n + \sqrt n)\) has constant risk for \(X \sim \mathrm{Bin}(n, p)\), and deduce that it is minimax.
Solution
- With a = √n/2, the MSE of (X + a)/(n + 2a) is [np(1 − p) + a²(1 − 2p)²]/(n + 2a)².
- The numerator is np − np² + (n/4)(1 − 4p + 4p²) = n/4, the same for every p. So the risk is n/(4(n + √n)²) = 1/(4(1 + √n)²).
- The rule is the posterior mean under Beta(a, a), so it is Bayes with constant risk. By chapter 2's theorem, no rule has smaller maximum risk: its maximum equals its Bayes risk, which is the smallest possible average.
-
Completeness of the uniform maximum. Prove that \(\max X_i\) is complete for \(U(0, \theta)\), and find the UMVUE of \(\theta\).
Solution
- M = max X_i has density n t^{n−1}/θⁿ on (0, θ).
- If E_θ g(M) = 0 for all θ, then ∫₀^θ g(t) t^{n−1} dt = 0 for all θ. Differentiating gives g(θ)θ^{n−1} = 0 for almost every θ, so g = 0.
- E M = nθ/(n + 1), so (n + 1)M/n is unbiased and, by Lehmann–Scheffé, the UMVUE.
-
The absurd unbiased estimator. Show that \((-1)^X\) is the only unbiased estimator of \(e^{-2\lambda}\) from one Poisson count.
Solution
- Unbiasedness means Σ_x δ(x) e^{−λ} λ^x/x! = e^{−2λ}, that is Σ_x δ(x) λ^x/x! = e^{−λ} = Σ_x (−1)^x λ^x/x! for every λ > 0.
- Power series that agree on an interval have equal coefficients, so δ(x) = (−1)^x.
-
Basu for the range. Use Basu's theorem to show that \(\bar X\) and \(X_{(n)} - X_{(1)}\) are independent for \(N(\mu, 1)\) data.
Solution
- With σ = 1 known, X̄ is complete sufficient for μ (a full-rank exponential family).
- The range X_(n) − X_(1) is unchanged by shifting every observation, so its law does not involve μ: it is ancillary.
- By Basu's theorem the two are independent, for every μ.
-
Pitman for a shifted exponential. Find the Pitman estimator for \(f(x) = e^{-(x - \theta)}\), \(x > \theta\), and show it is \(\min x_i - 1/n\).
Solution
- ∏ f(x_i − t) = exp(−Σ x_i + nt) for t < m = min x_i, and 0 otherwise.
- So θ̂_P = ∫{−∞}^m t e^{nt} dt / ∫{−∞}^m e^{nt} dt = m − 1/n. It is unbiased, since E min X_i = θ + 1/n.
-
The SURE-optimal shrinkage. For \(\delta = (1 - c/\|X\|^2) X\), \(X \sim N_p(\theta, I)\), show that SURE is minimized at \(c = p - 2\).
Solution
- For p ≥ 3, X ∼ N_p(θ,I) and x ≠ 0, let g = −c x/‖x‖²: ‖g‖² = c²/‖x‖² and ∇·g = −c(p − 2)/‖x‖².
- So SURE = p + (c² − 2c(p − 2))/‖x‖². This is minimized at c = p − 2 for every x, giving p − (p − 2)²/‖x‖².
- The expected value of this minimized SURE is James–Stein's risk.
Notes and sources
Where it comes back
- Part 46: risk sets and least favourable priors for tests; Neyman–Pearson as a Bayes rule; Lehmann's UMPU tests.
- Part 47: the local asymptotic minimax theorem (Hájek, Le Cam) replaces the Cramér–Rao bound.
- Part 50: minimax rates, by the methods of Le Cam, Assouad and Fano.
- Part 52: shrinkage and empirical Bayes in high dimensions.
- Part 53: the frequentist risk of Bayes rules as the sample grows.
Glossary
- Decision theory.
- Loss; decision rule; risk function; admissible, inadmissible, dominated: the vocabulary.
- Minimax; Bayes risk; Bayes rule; least favourable prior; equalizer rule; randomized rule; risk set: the criteria.
- Complete class; generalized Bayes rule; Blyth's method; Haldane's prior: which rules to consider.
- Data reduction.
- Natural parameter; cumulant function A; mean-value parameter; Legendre conjugate A*; Bregman divergence; curved family: exponential families.
- Sufficient, minimal sufficient, complete, boundedly complete; factorization (Halmos–Savage); ancillary: data reduction.
- Rao–Blackwellization; UMVUE; Lehmann–Scheffé; Basu's theorem; conditionality principle; likelihood principle: using it.
- Bounds and symmetry.
- Fisher information matrix; Cramér–Rao bound; efficiency; orthogonal parameters; Bhattacharyya bound; Chapman–Robbins bound; superefficiency: information bounds.
- Location and scale family; equivariant rule; Pitman estimator; Haar measure: symmetry.
- Shrinkage and empirical Bayes.
- Stein's lemma; SURE; James–Stein; positive part; Baranchik's family; Strawderman's prior; harmonic prior; limited translation: shrinkage.
- Tweedie's formula; Brown's recurrence criterion; capacity: why three dimensions.
- Robbins's formula; f- and g-modeling; NPMLE (Kiefer–Wolfowitz); GMLEB; regret: empirical Bayes.
Sources
- Decision theory.
- A. Wald, Ann. Math. Stat. 10 (1939); Statistical Decision Functions (1950).
- J. von Neumann, Math. Ann. 100 (1928); J. von Neumann & O. Morgenstern (1944).
- C. Blyth, Ann. Math. Stat. 22 (1951); L. Le Cam, Ann. Math. Stat. 26 (1955).
- Sufficiency, completeness and ancillarity.
- R. A. Fisher, Phil. Trans. A 222 (1922); P. Halmos & L. Savage, Ann. Math. Stat. 20 (1949).
- E. Lehmann & H. Scheffé, Sankhyā 10 (1950), 15 (1955).
- C. R. Rao, Bull. Calcutta Math. Soc. 37 (1945); D. Blackwell, Ann. Math. Stat. 18 (1947).
- D. Basu, Sankhyā 15 (1955); D. Cox, Ann. Math. Stat. 29 (1958).
- A. Birnbaum, JASA 57 (1962); B. Efron & D. Hinkley, Biometrika 65 (1978).
- Exponential families and information.
- E. Pitman, Proc. Camb. Phil. Soc. 32 (1936); B. Koopman, Trans. AMS 39 (1936); G. Darmois, C. R. Acad. Sci. 200 (1935).
- O. Barndorff-Nielsen, Information and Exponential Families (1978); L. Brown, Fundamentals of Statistical Exponential Families (1986).
- A. Bhattacharyya, Sankhyā 8 (1946); D. Chapman & H. Robbins, Ann. Math. Stat. 22 (1951).
- Equivariance. E. Pitman, Biometrika 30 (1939); M. Girshick & L. Savage, Proc. Second Berkeley Symp. (1951); C. Stein, Ann. Math. Stat. 30 (1959); L. Brown, Ann. Math. Stat. 37 (1966).
- Shrinkage.
- C. Stein, Proc. Third Berkeley Symp. 1 (1956); W. James & C. Stein, Proc. Fourth Berkeley Symp. 1 (1961).
- C. Stein, Ann. Inst. Stat. Math. 16 (1964); Ann. Stat. 9 (1981); A. Baranchik, Ann. Math. Stat. 41 (1970).
- L. Brown, Ann. Math. Stat. 42 (1971); W. Strawderman, Ann. Math. Stat. 42 (1971).
- D. Lindley, discussion, JRSS B 24 (1962); B. Efron & C. Morris, JASA 67 (1972), 68 (1973), 70 (1975).
- Empirical Bayes.
- H. Robbins, Proc. Third Berkeley Symp. 1 (1956); J. Kiefer & J. Wolfowitz, Ann. Math. Stat. 27 (1956).
- B. Lindsay, Ann. Stat. 11 (1983); W. Jiang & C.-H. Zhang, Ann. Stat. 37 (2009).
- R. Koenker & I. Mizera, JASA 109 (2014); B. Efron, Stat. Sci. 29 (2014).
- B. Efron & T. Hastie, Computer Age Statistical Inference (2016).
- Books.
- E. Lehmann & G. Casella, Theory of Point Estimation (2nd ed. 1998); J. Berger, Statistical Decision Theory and Bayesian Analysis (2nd ed. 1985).
- T. Ferguson, Mathematical Statistics: A Decision Theoretic Approach (1967); R. Keener, Theoretical Statistics (2010).
About this partfrom its README
Part 45 of a sixty-five-part course in statistics, from a first course to a PhD (see the series plan and the syllabus), and the third part of Stage IV, the PhD core. The part opens with Charles Stein's result at the Third Berkeley Symposium (1954–55, published 1956): for three or more normal means, the sample means are inadmissible. It asks what "best" means for an estimator, and answers in three stages:
- Wald's decision theory gives the language: risk, admissibility, minimax and Bayes rules, risk sets and complete classes.
- Sufficiency, completeness and equivariance say when a best estimator exists within a natural class.
- Stein's paradox, explained by Brown (1971) through the recurrence of Brownian motion, shows where that search ends. Strawderman's proper Bayes minimax rules and Robbins's empirical Bayes show what to do instead.
It keeps two promises:
- Part 9 called the UMVUE best and proved the Cramér–Rao bound, but only among unbiased estimators. Chapters 1–8 set out what "best" means in general, prove Lehmann–Scheffé, and show where unbiasedness is absurd.
- Part 25 showed James–Stein winning on Efron and Morris's hitters, by simulation and a sketch. Chapters 10–13 give exact risks, the reason for three dimensions, and proper Bayes minimax rules.
Built in this part:
statkit.decision(explainer/stats/kit/decision.py), tested intests/test_stats_kit_decision.py:- Finite decision problems: every non-randomized rule and its risk point; the lower boundary of the convex risk set; Bayes rules for a prior; the minimax rule and least favourable prior by linear programming.
- Exact risks: binomial rules (X + a)/(n + a + b) and their Bayes risks; c·Σ(x − x̄)² for σ²; the absurd unbiased (−1)^X, the MLE e^{−2X} and 1(X even).
- Exponential families: A, A′, A″ and the Legendre conjugate A* for the Bernoulli, Poisson and normal families, with a numerical Legendre transform.
- Sufficiency and ancillarity: the tank estimators' exact SDs and the law of the maximum; Rao–Blackwell given the maximum; Cox's two instruments; the uniform location interval given the range.
- Information bounds: Cramér–Rao and second-order Bhattacharyya bounds for θ²; the Chapman–Robbins bound for U(0, θ).
- Equivariance: Pitman's location estimator by numerical integration.
- Normal means: James–Stein's exact risk as a Poisson mixture; SURE; Baranchik's family; Strawderman's posterior shrinkage by incomplete gamma functions; Brown's integrals and Brownian hitting probabilities.
- Empirical Bayes: Robbins's formula, the gamma-Poisson fit, and the Poisson NPMLE by EM.
- The risk-set explorer (
RiskSetinexplainer/stats/viz.py), the part's instrument. It draws the risk points of a two-state problem, the convex hull of randomized rules, the admissible lower edge, Bayes supporting lines and the equal-risk diagonal.
Data.
- From the Museum:
- Ruggles and Brodie's (1947) tank estimates;
- Efron and Morris's 1970 hitters;
- one year's claims on 9,461 automobile insurance policies (Efron & Hastie 2016, Table 6.1; new, as
museum.INSURANCE_CLAIMS).
- The rest is exact arithmetic or seeded simulation.
The Coverage Board gains six rows, all nominal 90% intervals:
| Method | Setting | Achieved | Verdict |
|---|---|---|---|
| Cox's instruments, unconditional interval | given the precise instrument (SD 1) | 100.0% | conservative |
| Cox's instruments, unconditional interval | given the rough instrument (SD 10) | 80.1% | broken |
| Cox's instruments, conditional interval | given either instrument | 89.9% | kept |
| uniform location, interval given the range | U(θ − ½, θ + ½), n = 5 | 89.7% | kept |
| James–Stein ± 1.645, the large mean | p = 10, θ = (0, …, 0, 5) | 65.8% | broken |
| James–Stein ± 1.645, a zero mean | p = 10, θ = (0, …, 0, 5) | 96.5% | conservative |
Chapter notes
| # | Chapter | Numbers |
|---|---|---|
| 0 | Stein's paradox, 1956 | James–Stein risk 2 at θ = 0 for every p ≥ 3, below p everywhere |
| 1 | Decision theory | Bin(16): max risk 0.0156 (X/n) vs 0.0100 (minimax); Bayes risks 0.0104 / 0.0093 / 0.0100 |
| 2 | Risk sets | 16 rules; minimax 0.404 on the diagonal; least favourable prior 0.672 |
| 3 | Complete class theorems | Beta(ε, ε) rules → X/n; σ²: 0.222 (unbiased), 0.190 (MLE), 0.182 (n + 1) |
| 4 | Exponential families | KL(0.3 ‖ 0.7) = Bregman gap = 0.3389 |
| 5 | Sufficiency in general | the uniform range, ancillary, mean (n − 1)/(n + 1) = 0.667 |
| 6 | Rao–Blackwell and Lehmann–Scheffé | tanks: SD 173 → 70 → 43; (−1)^X: MSE 1 − e^{−4λ} |
| 7 | Ancillarity and Basu | x̄, s² correlation −0.02 (exponential 0.70); Cox: 100% / 80%; uniform 42% → 100% by range |
| 8 | Information inequalities | s² efficiency 0.8–0.98; Chapman–Robbins / UMVUE 0.72 → 0.65 |
| 9 | Equivariance | Pitman ÷ median: 0.72, 0.90, 0.35, 0.83 (normal, Laplace, uniform, Cauchy) |
| 10 | Stein's lemma, SURE, James–Stein | lemma 0.4636 vs 0.4642 (exact 0.4639); hitters SURE 6.1, loss 5.0 vs 17.6 |
| 11 | Why three dimensions | ∫ r^{1−p}: R − 1, log R, 1 − 1/R; BM return 1, 1, ½ |
| 12 | Minimaxity and admissibility | p = 5 at θ = 0: 1.99 (JS), 1.39 (positive part), 0.90 (Strawderman) |
| 13 | Empirical Bayes theory | Robbins 0.168, 0.363, 0.527, …, 6.0; NPMLE raw risk 0.26 → 0.165; population oracle risk 0.14852 |
| 14 | Outro | — |
The rest of the part's numbers, chapter by chapter:
- Hook.
- X ~ N_p(θ, I) under squared error. X has risk p; James–Stein (1 − (p − 2)/‖X‖²)X has exact risk p − (p − 2)² E[1/(p − 2 + 2K)] with K ~ Poisson(‖θ‖²/2).
- The guarantee is for the total loss, even for unrelated coordinates.
- Chapter 1.
- Loss, rules, risk functions, admissibility.
- Bin(16) under squared error: X/n, Laplace's (X + 1)/(n + 2), and the flat rule (X + 2)/20 with constant risk 1/(4(1 + √n)²) = 0.01.
- The flat rule beats X/n only for 0.20 < p < 0.80 at n = 16, 0.29–0.71 at n = 100, and 0.38–0.62 at n = 1,000.
- No rule is uniformly best: the stopped clock δ ≡ θ₀ has zero risk at θ₀.
- Chapter 2.
- A coin is fair (p = .5) or biased (p = .8); X is the number of heads in 3 tosses. Calling a fair coin biased costs 1; missing a biased coin costs 2. That gives 2⁴ = 16 rules.
- The lower edge has corners at the threshold rules "biased if X ≥ c": (0, 2), (0.125, 0.976), (0.5, 0.208), (0.875, 0.016), (1, 0).
- The Bayes rules for π = 0.25, 0.5, 0.75 are c = 1, 2, 3.
- Minimax: R₁ = R₂ = 0.4042, mixing c = 3 (0.255) and c = 2 (0.745). The least favourable prior is 0.672 on fair.
- Chapter 3.
- A finite-Bayes-risk rule unique up to sets null under every model law is admissible. Prior-predictive uniqueness alone needs additional support/continuity conditions in general models.
- In the finite-state, finite-outcome, finite-action randomized problem, the compact convex risk polytope gives the minimax and complete-class conclusions. Finite Θ alone is not a substitute for the needed conditions in arbitrary decision problems.
- Complete-class limit and generalized Bayes representations require the relevant model, loss, compactness and regularity assumptions. Pointwise limits of Bayes rules alone need not be admissible.
- X/n is the limit of proper Beta(ε,ε) rules. Haldane's formal posterior mean applies only at interior counts; at X = 0 or n the improper posterior needs the limiting convention.
- Blyth's (1951) method shows X is admissible in one dimension.
- c·Σ(x − x̄)² with n = 10: MSE/σ⁴ is 0.222, 0.190 and 0.182 for c = 1/9, 1/10, 1/11. Stein (1964) showed that even the last is inadmissible.
- Chapter 4.
- A(η) is convex, with A′ = E T and A″ = Var T = I(η). The MLE matches means. Bernoulli: at η = 0.8, μ = 0.690.
- The conjugate A*(μ) is minus the entropy, with (A*)′ = (A′)⁻¹.
- The supremum of the parameter-dependent log-likelihood per observation is A*(T̄); retain the base-density constant for the full likelihood. A finite interior MLE requires T̄ in the image of the mean map. Identifying that image with the convex-support interior additionally requires the full minimal steep regular-family conditions.
- KL is the Bregman divergence of A*. The deviance is 2n·D_{A*}(T̄, μ̂₀).
- Poisson: X̄ attains the bound; log λ has no unbiased estimator.
- Pitman–Koopman–Darmois (1935–36) assumes regular smooth iid models/statistics and common support; arbitrary measurable encodings of the sample into one number are excluded.
- Chapter 5.
- Halmos–Savage factorization for a family dominated by a common sigma-finite measure, via a countable dominating mixture.
- Lehmann–Scheffé's test for minimal sufficiency. A catalogue: complete for the normal, Poisson, binomial and U(0, θ); not for U(θ, θ + 1), N(θ, θ²), Cauchy or Laplace.
- The uniform range has law Beta(n − 1, 2) for every θ.
- Full-rank exponential families are complete, by uniqueness of the Laplace transform.
- Chapter 6.
- Rao–Blackwell, via the variance decomposition and Jensen's inequality.
- Tanks (N = 300, k = 6): E[2X₁ − 1 | M] = M(k + 1)/k − 1. Exact SDs: 173.2 (one serial), 70.1 (moments), 42.9 (UMVUE); simulated 173.7 / 70.1 / 42.4.
- Ruggles and Brodie: 169 vs 1,000 vs 122 (June 1940); 244 vs 1,550 vs 271 (June 1941); 327 vs 1,550 vs 342 (August 1942).
- (−1)^X is the UMVUE of e^{−2λ}. 1(X even) dominates it, and the MLE e^{−2X} is better still (max MSE 0.30 on λ ≤ 3).
- Chapter 7.
- Basu (1955): with σ known, x̄ and s² are independent; the correlation over 4,000 samples (800 displayed) is −0.02, against 0.70 for exponential data.
- Cox (1958): the unconditional half-width is 12.82, covering 100% given SD 1 and 80% given SD 10. The conditional intervals are ±1.645 and ±16.4.
- Uniform location, n = 5: the midrange ± 0.184 covers 90% overall, but 42% for small ranges and 100% for large ones. The analytic unconditional half-width is (1 − 0.1^(1/n))/2 = 0.1845213, independently checked in simulation (90.0545% overall). Conditional on R, the fixed-parameter midrange error is uniform on [−(1−R)/2,(1−R)/2], giving exact 90% conditional coverage. This differs from calling the parameter random given the observed order statistics.
- Birnbaum (1962) uses particular formulations of mixture conditionality and sufficiency. Observed information can approximate conditional precision in regular models; it is not generally ancillary or uniformly preferable to expected information.
- Chapter 8.
- Multiparameter Cramér–Rao, by a Schur complement. Normal: s² efficiency (n − 1)/n.
- Bhattacharyya (1946) for θ²: 4θ²/n + 2/n², attained.
- Chapman–Robbins (1951) for U(0, θ): the ratio to the UMVUE falls from 0.72 (n = 2) to 0.65 (n = 100), tending to max s²/(e^s − 1) = 0.648.
- Hodges's superefficiency.
- Chapter 9.
- Location equivariance gives constant risk. Pitman (1939): the best equivariant rule, generalized Bayes for the flat prior.
- n = 5, MSE of mean / median / Pitman:
- normal 0.203 / 0.283 / 0.203;
- Laplace 0.398 / 0.347 / 0.314;
- uniform 0.0166 / 0.0352 / 0.0122;
- Cauchy ∞ / 1.15 / 0.96.
- The uniform midrange's exact MSE 1/(2(n + 1)(n + 2)) against the mean's 1/(12n).
- Normal location-scale model with unknown μ and σ: under relative squared variance loss, the best location-scale-equivariant rule is SSE/(n+1), generalized Bayes under right Haar dμ dσ/σ. Its action is E[σ^(−2)|x]/E[σ^(−4)|x], not E[σ²|x]. With known μ = 0, the pure-scale answer is Σx²/(n+2).
- Invariant-minimax and admissibility conclusions need their model conditions. For the identity-covariance normal-mean problem, X is minimax and admissible exactly for p ≤ 2. The proper normal priors N(0,τ²I) have Bayes risk pτ²/(1+τ²) → p, establishing the minimax lower bound.
- Chapter 10.
- Stein's lemma; SURE = p + 2∇·g + ‖g‖².
- For James–Stein, SURE = p − (p − 2)²/‖X‖².
- p = 10: exact risk curve and the simulated positive part.
- At θ = (1, …, 1): mean SURE 6.25, mean loss 6.40, exact risk 6.21.
- Efron–Morris (arcsine scale, shrinking to the mean with p − 3): factor 0.209, SURE 6.13; squared validation error 5.00 (JS) vs 17.57 (raw) against noisy remaining-season averages. SURE is an approximate Gaussian-model risk estimate using early data only, not an exact unbiased estimate of finite-binomial validation error or a documented prediction made in 1970.
- Chapter 11.
- Tweedie's formula, δ_π = x + ∇ log m.
- Under Brown's recurrence/admissibility regularity conditions, use the diffusion dY = ½∇ log m dt + dB. For the spherical examples, ∫^∞ dr/(r^{p−1} m(r)) = ∞.
- The flat prior is admissible iff p ≤ 2.
- Brownian motion from radius 2 reaches the unit ball with probability → 1, 1, ½ in 1, 2, 3 dimensions.
- Capacity.
- For p ≥ 3 and 0 ≤ k < p, priors ‖θ‖^(−k) give the stated radial criterion, admissible when k ≥ p−2. The restriction k < p keeps the prior locally integrable at zero. The harmonic-prior admissible/minimax statement uses p ≥ 3.
- Chapter 12.
-
Baranchik (1970): SURE = p − (p − 2)²r(2 − r)/s − 4(p − 2)r′. For p ≥ 3, locally absolutely continuous nondecreasing 0 ≤ r ≤ 2, and the required integrability, this makes the rule minimax. The plotted capped r is piecewise smooth, not smooth at its knot.
-
Strawderman (1971): a proper prior that is minimax for p ≥ 5.
-
Risks at ‖θ‖² = 0, 4, 10, 20, 40:
Rule 0 4 10 20 40 James–Stein 1.99 3.46 4.19 4.56 4.77 positive part 1.39 3.24 4.15 4.56 4.77 Baranchik 1.76 3.10 4.07 4.55 4.77 Strawderman 0.90 2.57 3.97 4.78 4.98 -
Lindley (1962); limited translation (Efron & Morris 1972).
-
- Chapter 13.
- Robbins (1956), E[θ | x] = (x + 1)f(x + 1)/f(x). On the insurance claims: 0.168, 0.363, 0.527, 1.333, 1.429, 6.000, 1.750.
- The gamma prior (shape 0.70, scale 0.31) gives a linear rule, log-likelihood −5,348.0.
- The NPMLE (Kiefer & Wolfowitz 1956; Lindsay 1983) gives a monotone rule, log-likelihood −5,340.703496. The continuous-support directional-score certificate bounds the remaining log-likelihood gap by 0.000505; the mixing measure need not be unique.
- Sparse normal means (10% at 4), risk per coordinate at n = 50, 200, 1,000, 5,000:
- James–Stein: 0.60, 0.57, 0.59, 0.59;
- GMLEB: 0.26, 0.14, 0.16, 0.165;
- oracle Monte Carlo risks: 0.13, 0.13, 0.15, 0.164. The population oracle risk is constant at 0.14852383, computed by independent quadrature. Excess risks of the grid estimator are 0.125996, 0.016576, 0.008635 and 0.000785, with 12, 12, 12 and 4 independent runs. The plot shows ±2 Monte Carlo SE bars. This finite-grid, finite-iteration approximation does not itself inherit all Jiang–Zhang asymptotic regret guarantees.
- f- and g-modeling (Efron 2014).
Companion material in this repository
The syllabus's plan for this partfrom SYLLABUS.md, the plan of record
- Hook: Stein (1956). Upgrade cards from Parts 9 and 25.
- Decision theory (Wald 1950). Risk; admissibility; minimax; Bayes rules.
- Risk sets. Convex hulls; Bayes rules as supporting hyperplanes; minimax via least favourable priors.
- Complete class theorems. Wald; the limits of Bayes rules.
- Exponential families as convex duality. A(η) and its Legendre conjugate; mean-value parameters; Fisher information as A″; Pitman–Koopman–Darmois.
- Sufficiency in general. Halmos–Savage (1949) factorization; minimal sufficiency; completeness and its counterexamples.
- Rao–Blackwell and Lehmann–Scheffé, proved; the tanks' UMVUE; the absurd UMVUE (−1)^X.
- Ancillarity and Basu (1955). Conditionality (Cox 1958).
- Information inequalities. Multiparameter Cramér–Rao; Bhattacharyya bounds; the Chapman–Robbins bound for non-regular models.
- Equivariance. Group families; the Pitman estimator as minimum-risk equivariant and as generalized Bayes.
- Stein's lemma, SURE, James–Stein, proved with exact risks.
- Why three dimensions. Brown (1971): admissibility ↔ recurrence (Part 44's Pólya).
- Minimaxity and admissibility in the normal-means problem. Baranchik; proper Bayes minimax estimators (Strawderman 1971).
- Empirical Bayes theory. Robbins; Tweedie; NPMLE (Kiefer–Wolfowitz 1956) and its regret (Jiang & Zhang 2009).
- Outro.
Built: a risk-set explorer. Books: Lehmann & Casella; Berger; Ferguson; Keener; Brown (1986).
Build the film
python -m videos.stats.stats45.compute # the part's numbers, into .cache/stats45
python tools/build.py stats45 # render and assemble the film
EXPLAINER_TTS=silent python tools/qa_scene.py stats45 Hook # one chapter, silent, with a contact sheet
Scenes: videos/stats/stats45. Setup: see the course page. Source of these notes: the README and the scenes' narration.
Build it
OMP_NUM_THREADS=1 python -m videos.stats.stats45.compute # once (under a minute)
python tools/build.py stats45 -q l # fast 480p preview
python tools/build.py stats45 # 1080p30 -> renders/stats45.mp4
python tools/qa_scene.py stats45 RiskSets
python tools/lecture_length.py stats45 --floor 50