Q.E.D. ➔ the shrinkage estimator is least squares plus an ℓ2 penalty 2cμ2 — ridge regression with only an intercept, penalty c in place of λ.
⚙️ Core Implementation
🔹 MSE curves in R
Plot for σ2=1, n=1
mu = seq(-5, 5, length.out = 200); n = 1; s2 = 1mse = function(c) (c^2 * mu^2 + n * s2) / (n + c)^2plot(mu, rep(s2/n, length(mu)), type = "l", ylim = c(0, 3), lwd = 2, xlab = expression(mu), ylab = "MSE") # ML: flat at sigma^2/nlines(mu, mse(0.1), col = "blue"); lines(mu, mse(1), col = "red"); lines(mu, mse(5), col = "darkgreen")legend("top", c("ML", "c=0.1", "c=1", "c=5"), col = c("black","blue","red","darkgreen"), lty = 1)
💡 Common Mistake:Plotting against the data ➔ MSE is a function of the unknown μ, averaged over all samples; the x-axis is μ, not y.
⚠️ Common Mistakes
💡 Dropping the square on the multiplier ➔ V[aYˉ]=a2σ2/n, giving (n+c)2nσ2, not n+cσ2.
💡 “Biased ⟹ worse” ➔ near μ=0 the biased estimator has lower MSE; bias is a cost, not a verdict.
💡 Calling it inconsistent because it is biased ➔ the bias vanishes as n→∞.
🧠 Active Recall
Why does μ^(c) beat Yˉ for some μ but lose badly for others, and how does c move the boundary?
Answer
Short answer: It always has less variance, but its bias grows with ∣μ∣; it wins while the variance saving exceeds b2, i.e. μ2<σ2nc2n+c — larger c saves more variance but narrows the window.
Why:b2 vs Var ➔ MSE=(n+c)2c2μ2+nσ2: the nσ2 term shrinks with c, the c2μ2 term grows with ∣μ∣.
What does this one-parameter example say about ridge regression?
Answer
Short answer: Ridge is the same move per coefficient — pull estimates towards zero to cut variance at the cost of bias, lowering MSE when the true coefficients are small relative to the noise.
Why:Same objective ➔ 21∑(yi−μ)2+2cμ2 is ridge’s RSS+λ∑jβj2 (up to a factor of 21) with a single parameter.