Proof (James-Stein estimator)

Lemma (Stein's lemma, normal random variable) open_in_new

Let $X \sim{}$$N(μ, σ^2)$ and $g: \R\to \R$ be a bounded differentiable function.

If $\expect|g'(X)|<\infty$, then $$ \begin{align*} \expect[(X - μ) \, g(X)] = σ^2 \expect[g'(X)]. \end{align*} $$

Proof

The operator $\mathcal{A}: g \mapsto (x-μ)g - g'$ is known as a Stein operator.

Expand $$ \begin{align*} R(δ^\text{JS}, θ) ={}& \expect_θ\left[\left\|X - θ - \frac{p-2}{\|X\|^2}X\right\|^2\right] \\ ={}& \expect_θ[\|X - θ\|^2] + (p-2)^2 \expect_θ\left[\frac{1}{\|X\|^2}\right] - 2(p-2) \expect_θ\left[\frac{X^T(X - θ)}{\|X\|^2}\right]. \end{align*} $$

The first term is $p$, since $\|X - θ\|^2\sim χ_p^2$.

We focus on the third term. (Here $X_j$ denotes the $j$-th component of the vector $X$.) $$ \begin{align*} \expect_θ\left[\frac{X^T(X - θ)}{\|X\|^2}\right] ={}& \sum_{j=1}^{p} \expect_θ\left[(X_j - θ_j)\cdot \frac{X_j}{\|X\|^2}\right] \\ ={}& \sum_{j=1}^{p} \expect_θ\left[\pdd{X_j} \frac{X_j}{\|X\|^2}\right] \tag{*}\\ ={}& \sum_{j=1}^{p} \expect_θ\left[\frac{\|X\|^2 - 2X_j^2}{\|X\|^4}\right] \\ ={}& \expect_θ\left[\frac{p\|X\|^2 - 2\|X\|^2}{\|X\|^4}\right] \\ ={}& (p-2)\expect_θ\left[\frac{1}{\|X\|^2}\right] \end{align*} $$ so it suffices to justify $(*)$.

Write $$ \begin{align*} g_j(x) := \frac{x}{X_1^2 + \ldots + X_{j-1}^2 + x^2 + X_{j+1}^2 + \ldots + X_p^2} \end{align*} $$ a random function depending on $X_{(-j)} := (X_1, \ldots, X_{j-1}, X_{j+1}, \ldots, X_p)$. Note unless $X_{(-j)} = 0$ (which has probability 0), $g_j$ is a bounded differentiable function, and $$ \begin{align*} g_j'(x) = \frac{(\sum_{i\neq j} X_i^2 + x^2) - 2x^2}{(\sum_{i\neq j} X_i^2 + x^2)^2} \end{align*} $$ is also a bounded function, so Stein's lemma applies. By the law of total expectation, $$ \begin{align*} \expect_θ\left[(X_j - θ_j) g_j(X_j)\right] ={}& \expect_θ[\expect_θ[(X_j - θ_j) g(X_j) \mid X_{(-j)}]] \\ ={}& \expect_θ[\expect_θ[g_j'(X_j)]\mid X_{(-j)}] \\ ={}& \expect_θ[g_j'(X_j)] \end{align*} $$ and so $(*)$ is valid.