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

ℓ(θ)=log⁡L(θ)=∑i=1nlog⁡f(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=arg⁡max⁡θL(θ)=arg⁡max⁡θℓ(θ)\hat{\theta}_{MLE} = \arg\max_\theta L(\theta) = \arg\max_\theta \ell(\theta)

Example: Bernoulli

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

L(p)=∏i=1npxi(1−p)1−xi=p∑xi(1−p)n−∑xiL(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)log⁡p+(n−∑xi)log⁡(1−p)\ell(p) = (\sum x_i)\log p + (n - \sum x_i)\log(1-p)

Differentiate and set to 0:

∑xip−n−∑xi1−p=0\frac{\sum x_i}{p} - \frac{n - \sum x_i}{1-p} = 0

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

Example: Normal Mean (Known Variance)

Xi∼N(μ,σ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: θ^MLE→Pθ\hat{\theta}_{MLE} \xrightarrow{P} \theta
  2. Asymptotically normal: n(θ^MLE−θ)→dN(0,I−1)\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}