All Chapters

The Missing Chapter

Stein's Paradox

Why a baseball player's batting average can improve your estimate of Tokyo's rainfall

An extension of Jordan Ellenberg's "How Not to Be Wrong"

Chapter 35

The Most Embarrassing Theorem in Statistics

In 1956, Charles Stein proved something that made statisticians deeply uncomfortable. Not the pleasant discomfort of a challenging new idea — the queasy discomfort of realizing you've been doing something wrong your entire career, and the correct answer sounds like a joke.

Here's the setup. Suppose you want to estimate three or more unrelated quantities. Maybe you want to know Roberto Clemente's true batting ability, the average rainfall in Tokyo in April, and the price of wheat futures next quarter. You go out and collect data on each one. You get a measurement — a sample average, say — for each. What's the best estimate to use?

The "obvious" answer: use each measurement as your estimate. You observed a .346 batting average? Estimate .346. You measured 125mm of rain? Estimate 125mm. This is the maximum likelihood estimator. It's unbiased. It's the thing every intro stats course tells you to do. And Stein proved it is inadmissible.

Inadmissible doesn't mean "not great" or "could be improved in special cases." It means there exists another estimator that does at least as well in every possible situation and strictly better in some. The obvious estimator isn't just non-optimal — it's dominated. Playing chess against it, you'd never lose and sometimes win. It should never be used.1

And here's the part that made people angry: the better estimator works by combining the estimates. It takes Roberto Clemente's batting average and adjusts it using the Tokyo rainfall data. It takes the wheat price and nudges it based on how Clemente was hitting. Every estimate gets pulled — "shrunk" — toward the average of all the estimates, regardless of whether the quantities have any relationship whatsoever.

Stein himself reportedly called his result "an embarrassment to mathematical statistics." Bradley Efron, who would go on to do more with the idea than anyone, said it was "the most surprising result in theoretical statistics in the second half of the twentieth century."2

· · ·

The James-Stein Estimator

Let's make this concrete. You have p ≥ 3 quantities to estimate. For each one, you've observed a value yi. The "obvious" estimator says: estimate θi = yi. Just use what you measured.

The James-Stein estimator says: not so fast. First, compute the grand mean ȳ of all your observations. Then shrink each observation toward that mean:

The James-Stein Estimator
θ̂iJS = ȳ + c · (yi ȳ)
where c = 1 − (p − 2) / Σ(yi − ȳ)² and c is clipped to be ≥ 0
c
The shrinkage factor — always between 0 and 1. When observations are spread out, c ≈ 1 (little shrinkage). When they're clustered, c → 0 (heavy shrinkage).
p
The number of quantities being estimated (must be ≥ 3).
ȳ
The grand mean — the target everything shrinks toward.

The shrinkage factor c is the key. When your observations are wildly spread apart, c is close to 1 and you barely shrink at all — the data is strong enough to speak for itself. When they're bunched together, c drops toward 0 and you shrink heavily toward the mean. The estimator is self-calibrating.

grand mean Raw estimates Shrunk estimates
Every estimate gets pulled toward the grand mean. Extreme values get pulled more.
· · ·

But Wait — Why Does This Work?

The intuition isn't actually that mysterious, once you let go of the idea that unrelated things should be estimated independently.

Think of it this way. You observe that Roberto Clemente is hitting .400 through his first 45 at-bats. Is his true ability really .400? Almost certainly not. A .400 season hasn't happened since Ted Williams in 1941. What's far more likely is that Clemente is a great hitter — maybe truly a .330 guy — who got lucky early in the season. The .400 observation overshoots reality.

Meanwhile, some rookie is hitting .150. Is he really that bad? Probably not. Even weak hitters in the major leagues typically manage .220 or so. He's probably a below-average hitter having a bad stretch. The .150 undershoots reality.

The Core Insight

Extreme observations are more likely to be extreme because of noise than because reality is extreme. By pulling everything toward the center, you're correcting for the fact that your most dramatic measurements are the most likely to be wrong.

This is regression to the mean, but on steroids. Galton noticed that tall parents have slightly-less-tall children. Stein noticed that if you're estimating multiple things, you can quantify exactly how much to regress, and the answer is: more than zero, always, as long as you have three or more estimates.3

But the really wild part is that it doesn't matter if the quantities are related. You can throw batting averages, rainfall, and wheat futures into the same pot, shrink them all toward their collective mean, and get better estimates of each one. The math doesn't care about the semantics. It only cares about the geometry of high-dimensional space.4

The Geometry of Why

Here's the geometric picture. Each set of estimates is a point in p-dimensional space. The true values are another point. You're trying to get your point as close to the true point as possible (minimizing total squared error). In 1 or 2 dimensions, the observed values are already the closest you can get without additional info. But in 3+ dimensions, something strange happens: the space is so vast that the raw observations almost always overshoot — they land farther from the truth than they need to.

In 3+ dimensions, shrinking toward the origin helps Grand mean Truth (θ) Raw (y) Shrunk In high dimensions, raw estimates systematically overshoot
Pulling the raw estimate toward the mean moves it closer to the truth — not always for every component, but on average across all of them.

Shrinking toward the grand mean is like pulling your estimate inward, toward the center of the cloud. On any single dimension, you might overshoot or undershoot. But on average across all dimensions, you'll be closer to the truth. The magic number is 3 because that's where the geometry of spheres starts working in your favor — in 3+ dimensions, random points on a sphere are concentrated in ways that make shrinkage pay off.5

· · ·
Chapter 35.1

The Baseball Paper That Changed Everything

The result might have stayed an abstract curiosity if not for Bradley Efron and Carl Morris. In 1977, they published a paper in Scientific American that made the James-Stein estimator famous — by applying it to baseball.6

They took 18 Major League players' batting averages after their first 45 at-bats in the 1970 season. Then they used those early-season averages to predict each player's final batting average. The raw estimates — just using the first 45 at-bats — had a total squared error of .077. The James-Stein estimates, which shrunk each player's average toward the group mean, had a total squared error of .022. The "absurd" estimator was three and a half times more accurate.

"The James-Stein estimator is not a minor improvement. It is dramatically, embarrassingly better."

Roberto Clemente was hitting .400 after 45 at-bats. The James-Stein estimator pulled him down to about .290. His final average? .352. The raw estimate was off by .048; the James-Stein estimate was off by .062. Wait — James-Stein was worse for Clemente?

Yes! And that's fine. The estimator doesn't promise to be better for every single player. It promises to have lower total squared error across all players. It sacrifices a little accuracy on the extremes to gain a lot of accuracy in the middle. The guys hitting near .265 (the group average) were already well-estimated; the guys at the extremes got pulled in; and the net effect was a massive improvement overall.

Try it yourself:

James-Stein Demo
Generate random "true" batting averages for players, simulate noisy observations, then compare the raw estimates to the James-Stein shrunk estimates. Click "New Season" to re-randomize.
#True θRaw yJ-S θ̂Raw err²J-S err²
· · ·
Chapter 35.2

The Dimension Threshold

Why three? Why not two? The answer is precise and somewhat cruel: in one or two dimensions, the James-Stein estimator doesn't help at all. The shrinkage factor (p − 2)/||y − ȳ||² is zero or negative when p ≤ 2, so the estimator reduces to the raw observations. The magic only kicks in at p = 3.

And the more dimensions you add, the better shrinkage works. With 3 estimates, the improvement is modest. With 10, it's substantial. With 100, it's enormous. High-dimensional estimation is a setting where your intuition from 1D and 2D completely fails you.

The interactive below lets you see this for yourself. As you increase the dimension count, watch the gap between raw MSE and James-Stein MSE widen:

Shrinkage Benefit by Dimension
Drag the slider to change the number of dimensions (quantities being estimated). Each point is the average MSE over 500 simulations. Below 3, no benefit; at 3+, James-Stein dominates.
Raw MSE
James-Stein MSE
% Improvement
· · ·
Chapter 35.3

Shrinkage Is Everywhere

If Stein's paradox were just a party trick about baseball and rain, it would be a footnote. Instead, it turned out to be one of the most important ideas in modern statistics and machine learning.

Ridge regression is James-Stein. When you fit a linear model and add an L2 penalty — λ||β||² — to the loss function, you're doing exactly what James-Stein does: shrinking your coefficient estimates toward zero. Every data scientist who's ever used regularization is a disciple of Charles Stein, whether they know it or not.7

The connections run deep:

Empirical Bayes. The James-Stein estimator can be derived as an empirical Bayes estimator — one where you use the data itself to estimate the prior distribution. The grand mean acts as your "best guess" prior, and the amount of shrinkage is calibrated by how spread out the data is. Herbert Robbins developed this perspective, and it's now the backbone of everything from genomics to insurance pricing.

Regularization in machine learning. L1 (lasso), L2 (ridge), elastic net, dropout in neural networks — they're all shrinkage. The deep learning revolution runs on techniques that would make a 1950s statistician say "but you're biasing your estimates!" Yes. On purpose. Because a little bias buys you a lot of variance reduction, and variance is what kills you in high dimensions.

Regression to the mean — the deep version. Everyone knows Galton's observation: extreme performers tend to be less extreme next time. But Stein's paradox tells you how much to expect regression, and it tells you that you should account for it even when estimating things that have nothing to do with performance. It's not a psychological observation. It's a mathematical law of high-dimensional space.

Stein's Legacy Stein 1956 Empirical Bayes Ridge / Regularization Deep Learning Robbins, genomics, insurance pricing Lasso, elastic net, Bayesian shrinkage Dropout, weight decay, batch norm
One theorem from 1956 underlies much of modern statistics and machine learning.
· · ·

The Moral

There's a deep lesson here about the relationship between bias and accuracy. We're trained to think that unbiased estimators are good and biased ones are bad. Stein's paradox says: that's a one-dimensional intuition applied to a multi-dimensional world.

An unbiased estimator is right on average, in the sense that its expected value equals the truth. But being right on average isn't the same as being close to the truth on any given occasion. A biased estimator — one that systematically pulls toward the center — can be closer to the truth more often, because it avoids the wild overshoots that unbiased estimators are prone to.

"It is sometimes better to be approximately right than exactly wrong."

This is, in some sense, the mathematical formalization of intellectual humility. The world is complicated and your measurements are noisy. The most extreme thing you've ever observed is probably not as extreme as it looks. The most dramatic pattern in your data is probably partly mirage. And the right response isn't to ignore your data — it's to believe your data, but a little less than you otherwise would.

Every estimate shrunk. Every belief softened. Every outlier pulled gently toward the boring middle. That's not timidity — it's optimality. Charles Stein proved it.8

Notes & References

  1. Stein, C. (1956). "Inadmissibility of the usual estimator for the mean of a multivariate normal distribution." Proceedings of the Third Berkeley Symposium on Mathematical Statistics and Probability, 1, 197–206. The original paper that started it all.
  2. Efron, B. (2003). "Robbins, Empirical Bayes and Microarrays." Annals of Statistics, 31(2), 366–378. Efron's retrospective on the intellectual lineage from Stein through Robbins to modern high-dimensional statistics.
  3. James, W. & Stein, C. (1961). "Estimation with quadratic loss." Proceedings of the Fourth Berkeley Symposium, 1, 361–379. This paper gave the explicit positive-part James-Stein estimator used in practice.
  4. The result requires a common known variance (or a spherically symmetric distribution). In practice, you estimate the variance from data, and the result still holds approximately. See Efron & Morris (1973) for the technical details.
  5. The geometry connects to the "concentration of measure" phenomenon. In high dimensions, most of the volume of a sphere sits near its surface, meaning random perturbations tend to push points outward. Shrinkage corrects for this outward bias.
  6. Efron, B. & Morris, C. (1977). "Stein's Paradox in Statistics." Scientific American, 236(5), 119–127. The paper that made James-Stein famous outside of mathematical statistics.
  7. Hoerl, A.E. & Kennard, R.W. (1970). "Ridge Regression: Biased Estimation for Nonorthogonal Problems." Technometrics, 12(1), 55–67. Ridge regression was developed independently but is mathematically equivalent to James-Stein shrinkage in the orthogonal case.
  8. For an accessible modern treatment, see Efron, B. & Hastie, T. (2016). Computer Age Statistical Inference, Cambridge University Press, Chapter 7. Also: Stigler, S.M. (1990). The History of Statistics, for historical context on estimation theory.