MIT 18.650 — Lecture 10

Consistency of the MLE

§ Kullback-Leibler (KL) Divergence

Maximizing the likelihood turns out to be closely related to minimizing the “distance” between Pθ∗\mathbb{P}_{\theta^*} and Pθ\mathbb{P}_{\theta}. Here's how we formalize that notion of “distance”.

Definition. Given distributions P1\mathbb{P}_1 and P2\mathbb{P}_2 with PDFs f1(x)f_1(x) and f2(x)f_2(x), their Kullback-Leibler (KL) divergence is:

DKL(P1∥P2):=Ef1[log⁡(f1(X)f2(X))]=∫Rf1(x)log⁡(f1(x)f2(x)) dx=(∫Rf1(x)log⁡f1(x) dx)−(∫Rf1(x)log⁡f2(x) dx).\begin{align*}D_{\mathrm{KL}}(\mathbb{P}_1 \parallel \mathbb{P}_2) := \mathbb{E}_{f_1}\left[ \log\left(\frac{f_1(X)}{f_2(X)}\right)\right] & = \int_{\mathcal{R}} f_1(x) \log \left(\frac{f_1(x)}{f_2(x)}\right) \, \mathrm{d}x \\ & = \left( \int_{\mathcal{R}} f_1(x) \log f_1(x) \, \mathrm{d}x \right) - \left( \int_{\mathcal{R}} f_1(x) \log f_2(x) \, \mathrm{d}x \right).\end{align*}

Here, R\mathcal{R} is the entire support of P1\mathbb{P}_1, which is also the entire support of P2\mathbb{P}_2. Also, as usual, the Ef1\mathbb{E}_{f_1} notation indicates that the random variable XX is to be sampled using the PDF f1f_1.

Note that DKLD_{\mathrm{KL}} is not a metric; it is not symmetric, nor does it satisfy the triangle inequality. But Jensen's inequality implies it is at least nonnegative, with DKL(P1∥P2)=0D_{\mathrm{KL}}(\mathbb{P}_1 \parallel \mathbb{P}_2) = 0 if and only if P1=P2\mathbb{P}_1 = \mathbb{P}_2.

Remark. Jensen's inequality states that for any concave function φ\varphi and any random variable ZZ, we have E[φ(Z)]≤φ(E[Z])\mathbb{E}[\varphi(Z)] \leq \varphi(\mathbb{E}[Z]). Equality is precisely when ZZ is almost-surely constant, assuming φ\varphi is strictly concave.

Importantly, this implies the following.

Theorem. (KL Divergence Minimization) The map θ↦DKL(Pθ∗∥Pθ)\theta \mapsto D_{\mathrm{KL}}(\mathbb{P}_{\theta^*} \parallel \mathbb{P}_{\theta}) is minimized when θ=θ∗\theta = \theta^*. Also, the population log likelihood ℓ(θ):=Eθ∗[log⁡fθ(X)]\ell(\theta) := \mathbb{E}_{\theta^*}[\log f_{\theta}(X)] is maximized at θ=θ∗\theta = \theta^*.

Proof: The first sentence is true by Jensen's; the point is that log⁡\log is strictly concave, so:

DKL(Pθ∗∥Pθ)=−Eθ∗[log⁡(fθ(X)fθ∗(X))]≥−log⁡(Eθ∗[fθ(X)fθ∗(X)])=−log⁡(1)=0.D_{\mathrm{KL}}(\mathbb{P}_{\theta^*} \parallel \mathbb{P}_{\theta}) = -\mathbb{E}_{\theta^*} \left[ \log \left(\frac{f_{\theta}(X)}{f_{\theta^*}(X)}\right) \right] \geq -\log \left( \mathbb{E}_{\theta^*} \left[ \frac{f_{\theta}(X)}{f_{\theta^*}(X)} \right] \right) = -\log(1) = 0.

Equality occurs precisely when fθ(X)fθ∗(X)\frac{f_{\theta}(X)}{f_{\theta^*}(X)} (with X∼Pθ∗X \sim \mathbb{P}_{\theta^*}) is almost-surely constant, or when fθ≅fθ∗f_{\theta} \cong f_{\theta^*}, as desired.

The second sentence follows because minimizing DKL(Pθ∗∥Pθ)D_{\mathrm{KL}}(\mathbb{P}_{\theta^*} \parallel \mathbb{P}_{\theta}) is equivalent to maximizing ∫Rfθ∗(x)log⁡fθ(x) dx\int_{\mathcal{R}} f_{\theta^*}(x) \log f_{\theta}(x) \, \mathrm{d}x; see the far-RHS of the definition of DKLD_{\mathrm{KL}}. But ∫Rfθ∗(x)log⁡fθ(x) dx=ℓ(θ)\int_{\mathcal{R}} f_{\theta^*}(x) \log f_{\theta}(x) \, \mathrm{d}x = \ell(\theta) identically.   ■\blacksquare

§ MLE Consistency

The upshot of introducing KL Divergence is the second sentence of the “KL Divergence Minimization” theorem. We will leverage this fact to prove that the MLE is a consistent estimator.

Theorem. (MLE Consistency) Under mild regularity conditions (identifiability in particular), the MLE is consistent; that is, if θ^n\hat{\theta}_n is the MLE of the parameter θ\theta, then θ^n→Pθ∗\hat{\theta}_n \convprob \theta^*.

Proof: Recall the following.

These three points together imply θ^n→Pθ∗\hat{\theta}_n \convprob \theta^*. Roughly speaking, the third bullet point says 1nℓn→Pℓ\frac{1}{n}\ell_n \convprob \ell, so the maximizer of ℓn\ell_n should also converge in probability to the maximizer of ℓ\ell. (Yes, this needs to be justified—handwaving a little here.)   ■\blacksquare