KatInterview

Decompose MSE into Bias² and Variance for a Shrinkage Estimator

Statistics & ExperimentsModel answer
HardModel answerStatistics & Experimentsstatisticsbias-variance tradeoffMSE

Last updated

Derive the bias-variance decomposition analytically, then apply it to a ridge-like shrinkage estimator and reason about the optimal shrinkage level.

Bias-Variance Decomposition for a Shrinkage Estimator

Context

You are interviewing for a role on a core data science team that builds measurement and experimentation infrastructure. The interviewer wants to test your depth in statistical estimation theory.

Problem Setup

Suppose you observe a single sample mean:

$$\hat{\mu} = \bar{X} = \frac{1}{n}\sum_{i=1}^n X_i, \quad X_i \stackrel{iid}{\sim} (\mu, \sigma^2)$$

A colleague proposes replacing the standard sample mean with a shrinkage estimator that pulls the estimate toward zero:

$$\tilde{\mu}_\alpha = \alpha \bar{X}, \quad \alpha \in [0, 1]$$

What is expected

  1. Derive the general bias-variance decomposition of MSE: show algebraically that
    MSE = Bias² + Variance.

  2. Compute the Bias², Variance, and MSE of $\tilde{\mu}_\alpha$ as functions of $\alpha$, $\mu$, $\sigma^2$, and $n$.

  3. Find the value of $\alpha^*$ that minimizes MSE. Interpret the result intuitively.

  4. Discuss the practical implications: when does shrinkage help, when does it hurt, and what is the key pitfall when using $\alpha^*$ in practice?

Show all steps in your derivation. Numbers and concrete examples are encouraged to build intuition.

Hints

Hint 1

Start the MSE derivation by adding and subtracting E[θ̂] inside the squared-error expectation, then expand and use independence of bias and centered variance terms.

Hint 2

For the shrinkage estimator, E[α·X̄] = α·μ, so the bias is not zero unless α = 1. Write out both terms explicitly before differentiating.

Hint 3

When you minimize over α, you will get an expression that depends on μ² and σ²/n. Ask yourself: can you actually use this formula in practice, and what goes wrong if μ is unknown?