Skip to content
Part IA Easter Term

Maximum Likelihood Estimation

Intuition

Choose the parameter value that makes the observed data most probable.

Likelihood Function

For data X1,,XnX_1, \ldots, X_n and parameter θ\theta:

L(θ)=i=1nf(Xi;θ)L(\theta) = \prod_{i=1}^n f(X_i; \theta)

where f(x;θ)f(x; \theta) is the PMF or PDF.

Log-Likelihood

(θ)=logL(θ)=i=1nlogf(Xi;θ)\ell(\theta) = \log L(\theta) = \sum_{i=1}^n \log f(X_i; \theta)

Easier to work with: products become sums.

MLE Definition

θ^MLE=argmaxθL(θ)=argmaxθ(θ)\hat{\theta}_{MLE} = \arg\max_\theta L(\theta) = \arg\max_\theta \ell(\theta)

Example: Bernoulli

XiBern(p)X_i \sim \text{Bern}(p). Data: x1,,xnx_1, \ldots, x_n.

L(p)=i=1npxi(1p)1xi=pxi(1p)nxiL(p) = \prod_{i=1}^n p^{x_i}(1-p)^{1-x_i} = p^{\sum x_i}(1-p)^{n-\sum x_i}

(p)=(xi)logp+(nxi)log(1p)\ell(p) = (\sum x_i)\log p + (n - \sum x_i)\log(1-p)

Differentiate and set to 0:

xipnxi1p=0\frac{\sum x_i}{p} - \frac{n - \sum x_i}{1-p} = 0

p^=1ni=1nxi=Xˉ\hat{p} = \frac{1}{n}\sum_{i=1}^n x_i = \bar{X}

Example: Normal Mean (Known Variance)

XiN(μ,σ2)X_i \sim N(\mu, \sigma^2) with σ\sigma known.

(μ)=n2log(2πσ2)12σ2(xiμ)2\ell(\mu) = -\frac{n}{2}\log(2\pi\sigma^2) - \frac{1}{2\sigma^2}\sum(x_i - \mu)^2

Maximise by minimising (xiμ)2\sum(x_i - \mu)^2:

μ^=Xˉ\hat{\mu} = \bar{X}

Properties of MLE

  1. Consistent: θ^MLEPθ\hat{\theta}_{MLE} \xrightarrow{P} \theta
  2. Asymptotically normal: n(θ^MLEθ)dN(0,I1)\sqrt{n}(\hat{\theta}_{MLE} - \theta) \xrightarrow{d} N(0, I^{-1})
  3. Asymptotically efficient: Achieves minimum variance among all estimators
  4. Invariant: If θ^\hat{\theta} is MLE of θ\theta, then g(θ^)g(\hat{\theta}) is MLE of g(θ)g(\theta)

Summary

StepAction
1Write likelihood L(θ)L(\theta)
2Take log (optional but easier)
3Differentiate, set to 0
4Solve for θ^\hat{\theta}