The setup
There are $p$ unknown numbers $\theta_1, \dots, \theta_p$. For each one you get a single noisy measurement $x_i \sim \mathcal N(\theta_i, 1)$, all independent. You are scored on total squared error, $\sum_i (\hat\theta_i - \theta_i)^2$. The obvious estimate is $\hat\theta_i = x_i$. It is unbiased, it is the maximum-likelihood estimate, and its expected total error is exactly $p$.
The James–Stein estimator
James and Stein (1961) proposed shrinking every coordinate by the same factor:
$$\hat{\boldsymbol\theta}^{JS} = \left(1 - \frac{p - 2}{\|\mathbf x\|^2}\right)\mathbf x.$$For $p \ge 3$ its expected total error is strictly smaller than $p$ for every possible $\boldsymbol\theta$. The obvious estimator is inadmissible: something else beats it everywhere, not just on average over some prior. The right-hand chart shows the blue risk curve under the orange line at every distance.
Why should that be possible?
The observations are, on average, too long: $E\|\mathbf x\|^2 = \|\boldsymbol\theta\|^2 + p$. Noise adds length in every direction at once, so pulling the whole vector back toward the origin removes more noise than signal. The data themselves say how much to pull: if $\|\mathbf x\|^2$ is barely more than $p$, the true values are probably small, so shrink a lot; if it is huge, barely shrink at all.
An empirical-Bayes reading makes it feel less magical. If the $\theta_i$ looked as if they came from $\mathcal N(0, \tau^2)$, the best estimate would be $\big(1 - \tfrac{1}{1+\tau^2}\big)x_i$. James–Stein estimates that factor from the data, borrowing strength across coordinates.
The fine print, which is the fun part
- The target is arbitrary. Shrinking toward 0, toward 17 or toward the grand mean all work. Gains are large when the truth is near the target and vanish (but never go negative) when it is far. Shrinking toward the grand mean needs $p \ge 4$.
- It wins on the total, not on each coordinate. One unusual $\theta_i$ can be estimated worse; the others pay for it. If you only care about one quantity, keep its own estimate.
- Why 3? It is the same dimension threshold that makes a random walk transient. Stein’s and Brown’s proofs connect the two.
- It is everywhere now. Ridge regression, hierarchical models, “partial pooling” and Efron and Morris’ 1975 baseball study, which predicted players’ season averages from their first 45 at-bats better than each player’s own record could, are all shrinkage.
Try it: , then switch the target to the grand mean.