Estimation Theory
An estimator is a rule that turns data into a guess at a parameter. Decision theory asked what “good” means; this page asks what is achievable. Two questions organise it. How good can any unbiased estimator be?; answered by the Cramér–Rao bound, proved from Cauchy–Schwarz. And how good is the estimator everyone uses?; answered for maximum likelihood by consistency and asymptotic normality, with the proof sketched through the same local-asymptotic machinery the Bernstein–von Mises theorem used.
The page closes with the EM algorithm, the workhorse of latent-variable models, with its monotonicity property proved; the guarantee that makes it safe to run and the reason it can stall.
Intuition
Section titled “Intuition”Estimation is target shooting. Bias is how far the shots’ centre sits from the bullseye; variance is how tightly they cluster. An unbiased estimator with huge variance loses to a slightly biased one with tiny variance; which is why regularised estimators (ridge, shrinkage, priors) beat “unbiased” ones, and why the bias–variance decomposition is not a slogan but the definition of mean squared error rearranged.
The Cramér–Rao bound then says the target has a floor: no unbiased estimator can be tighter than a quantity set by the model’s Fisher information. If your estimator attains the floor, stop optimising. If it does not, either the model hasn’t enough information or the estimator is improvable.
1. Bias, variance, and the decomposition
Section titled “1. Bias, variance, and the decomposition”Definition. For an estimator of , the bias is , and the mean squared error is .
Theorem (bias–variance decomposition).
Proof. Write where has mean zero. Then
the cross term vanishing because .
Two lines, and the page dwells on what they say: MSE splits into an irreducible-variance part and a squared-bias part, and the two can be traded. The James–Stein result from the previous page is exactly a trade; a large bias reduction bought with a small variance increase; and the decomposition is what makes that trade measurable.
2. The Cramér–Rao bound
Section titled “2. The Cramér–Rao bound”Definition. The Fisher information for a scalar parameter is
and for i.i.d. observations, additivity of the score’s expectation gives .
Theorem (Cramér–Rao). Let be unbiased for and the model regular enough to differentiate under the integral. Then
Proof. Define the score , whose expectation is zero: , moving the derivative under the integral by hypothesis. Since ,
the middle step dropping a term proportional to . Now apply Cauchy–Schwarz to the random variables and :
The proof is Cauchy–Schwarz applied to the score, and every hypothesis is doing work. Differentiating under the integral is a real hypothesis; it fails when the support depends on (a uniform on has score with a delta function at the boundary, and the bound is false there). Equality holds iff is proportional to , which characterises the efficiency-attaining estimators.
Definition. is efficient if .
Worked example. For : , so and . The MLE is unbiased with variance ; it attains the bound, and is therefore efficient: no unbiased estimator of can have smaller variance. That is a closed door, not a preference.
3. Maximum likelihood
Section titled “3. Maximum likelihood”Definition. The maximum likelihood estimator (MLE) maximises over ; equivalently the log-likelihood .
Why maximise the likelihood rather than, say, minimise some other discrepancy? Two rigorous answers arrive on this page and one later: under mild conditions the MLE is consistent and asymptotically normal with variance ; it asymptotically attains the Cramér–Rao bound; and it is a Bayes rule under zero–one loss on in the limit. The deeper answer; that the likelihood is the natural discrepancy between laws (Kullback–Leibler); belongs to the information-theoretic part of the course.
Theorem (consistency and asymptotic normality). Under regularity (identifiability, interior, smoothness of , and domination permitting exchange of derivatives and integrals), the MLE satisfies
Proof sketch, structured like the Bernstein–von Mises proof. Consistency: converges uniformly on compacts to , which is maximised uniquely at by identifiability and Gibbs’ inequality with equality iff ; a standard argument then traps in any neighbourhood of with probability tending to one. Asymptotic normality: Taylor-expand the score , giving
where by the CLT and by the law of large numbers. Slutsky’s theorem; the page-1 tool; assembles the limit: .
The sketch is honest about being a sketch: the trapping argument and the uniformity of the Taylor remainder are real work, carried out in van der Vaart ch. 5. What the page provides is the shape; CLT for the score, LLN for the curvature, Slutsky to combine; which is the shape of every asymptotic normality proof in statistics.
4. The EM algorithm
Section titled “4. The EM algorithm”Latent-variable models; mixtures, missing data, hidden Markov models; have likelihoods whose log-of-sum resists maximisation. EM iterates around the problem.
Definition. Let be any distribution over the latent . Then
Proof. by adding and subtracting and using ; rearranging gives the display.
Since KL with equality iff is the true posterior, is a lower bound on the log-likelihood, tight exactly when is the posterior.
Theorem (EM monotonicity). Each EM iteration; E-step: ; M-step: ; does not decrease the log-likelihood:
Proof. The E-step makes the bound tight at the current parameter: . The M-step then gives since maximises it. Chaining:
Three lines, and the guarantee is monotone ascent; which is why EM is safe to run; but not convergence to the global maximum: the sequence converges to a stationary point of the likelihood, which for mixtures can be far from the truth, and which is why EM initialisation is a real modelling decision rather than an implementation detail.
Worked example (Gaussian mixture, M-step). With fixed, the M-step for the component- mean maximises , a weighted least-squares problem whose solution is the responsibility-weighted mean
The E-step computes responsibilities ; the M-step re-fits each component to the soft-assigned points. “Soft -means” and EM are the same algorithm, with the responsibilities’ temperature separating them.
5. The code: efficiency and EM on real data
Section titled “5. The code: efficiency and EM on real data”Python; Cramér–Rao and the MLE’s variance, on a Poisson.
import numpy as npfrom scipy import optimize, stats
rng = np.random.default_rng(2026)n, lam = 128, 3.0x = rng.poisson(lam, size=(20_000, n))
mle = x.mean(axis=1) # sufficient statistic: the sumvar_emp = mle.var()var_crb = lam / n # I_n = n / lam => CRB = lam / nprint(f"empirical Var(MLE) = {var_emp:.6f} Cramer-Rao bound = {var_crb:.6f}")# Expected: the two agree to sampling error -- the Poisson MLE is efficient.
# A deliberately inefficient unbiased estimator: use only the first 32 obs.mle32 = x[:, :32].mean(axis=1)print(f"Var(n=32 estimator) = {mle32.var():.6f} = 4x the bound at n=128")R; fitting a two-component mixture by EM, and watching the likelihood climb.
set.seed(2026)n <- 600z <- rbinom(n, 1, 0.4)x <- ifelse(z == 1, rnorm(n, -2, 0.7), rnorm(n, 2, 1.1))
# EM for a two-component Gaussian mixture, from scratch.mu <- c(-3, 3); s2 <- c(1, 1); pi_ <- c(0.5, 0.5)ll <- numeric(60)for (t in 1:60) { d <- cbind(dnorm(x, mu[1], sqrt(s2[1])) * pi_[1], dnorm(x, mu[2], sqrt(s2[2])) * pi_[2]) q <- d / rowSums(d) # E-step: responsibilities ll[t] <- sum(log(rowSums(d))) # the log-likelihood pi_[1] <- mean(q[, 1]); pi_[2] <- 1 - pi_[1] # M-step (closed forms) mu[1] <- sum(q[, 1] * x) / sum(q[, 1]) mu[2] <- sum(q[, 2] * x) / sum(q[, 2]) s2[1] <- sum(q[, 1] * (x - mu[1])^2) / sum(q[, 1]) s2[2] <- sum(q[, 2] * (x - mu[2])^2) / sum(q[, 2])}plot(ll[1:20], type = "b", pch = 16, xlab = "EM iteration", ylab = "log-likelihood")print(round(c(mu = mu, sigma2 = s2, pi = pi_), 3))Expected: the log-likelihood rises monotonically; never dips; exactly as the theorem guarantees, and the recovered parameters approach , , . The plot is the monotonicity proof, executed.
Common Pitfalls
Section titled “Common Pitfalls”- Treating unbiasedness as the goal. The Cramér–Rao bound is for unbiased estimators; biased ones can be better in MSE, and the James–Stein result says they are, in dimension three and up.
- Using the bound where the support depends on . Uniform- problems break the differentiability-under-the-integral step, and the bound simply does not apply.
- Reading asymptotic normality as finite-sample normality. The theorem is about as ; for mixture models even the limit can fail, which is why EM’s answer needs a validity check, not just a run.
- Expecting EM to find the truth. It finds a stationary point, monotonicly. With a bad initialisation the mixture page’s example will happily converge to a likelihood mode that splits one true component in half.
- Believing the E-step computes “the” latent values. It computes a distribution ; the responsibilities are soft, and treating them as hard labels turns EM into -means with its own convergence story.
Cross-References
Section titled “Cross-References”- Statistical Decision Theory; the risk framework judging these estimators, and admissibility.
- Measure-Theoretic Probability; the CLT and Slutsky used in the asymptotics.
- Posterior Asymptotics and the Bernstein–von Mises Theorem; the same LAN machinery, in the Bayesian setting.
- Hodge Theory; the other consumer of elliptic regularity; the pattern “kernel of an operator” recurs.
- Variational Inference; the ELBO bound of §4, made the objective.