Maximum likelihood & method of moments
The previous chapter judged estimators; this one manufactures them. Maximum likelihood is the master recipe: write down the probability of the data as a function of the parameter, and pick the parameter that makes what you saw least surprising. It is invariant, asymptotically normal, and asymptotically efficient — it attains the Cramér–Rao floor in the limit. But it has famous failure modes (the uniform, mixtures), and its humbler cousin, the method of moments, is often the right first move. Mastery means knowing the derivations, the one non-regular case, and the asymptotics.
A density answers “given the parameter, how probable is this data?” The likelihood fixes the observed data and reads the same formula as a function of : . It is not a probability distribution over (that requires a prior — Bayesian inference); it is a relative-plausibility ranking. The MLE is its argmax — in practice the argmax of the log-likelihood , because sums beat products and the log changes nothing about the maximiser.
The recipe, and five canonical MLEs#
The regular-case recipe: write , set the score , solve, and check the second derivative is negative. The five derivations below cover almost every case you will meet.
Bernoulli(). With heads, ; gives . Sixty-two heads in 100 tosses: .
Poisson(). , so gives — the sample mean of counts.
Exponential(). , so . Five order-arrival gaps seconds: , per second.
For ,
gives regardless of . Substituting and setting gives
The MLE divides by , so : biased low by (the proof that is in estimators & sampling). MLE does not promise unbiasedness — it promises asymptotic optimality, and the bias vanishes at rate .

Uniform — the non-regular case. The likelihood is not smooth in :
No derivative is ever zero — is strictly decreasing — so the maximum sits on the boundary of the allowed region: . Setting derivatives to zero here is the classic trap; the support depends on the parameter, the regularity conditions fail, and (as shown in the previous chapter) the estimator converges at rate rather than , with converging to an exponential — not a normal — distribution.
Invariance — the free lunch#
Theorem (invariance). If is the MLE of , then for any function , is the MLE of .
If is one-to-one, the likelihood of is ; since is maximised at , is maximised exactly at . For general , define the induced (profile) likelihood . For every , , and the value attains that ceiling because belongs to its preimage. Hence maximises . Use it: the MLE of an exponential tail probability is just from the worked data above — no new optimisation. Note the contrast with unbiasedness, which is destroyed by nonlinear (Jensen); invariance is the property unbiasedness wishes it had.
Asymptotics — why MLE wins in the limit#
Under regularity (smooth density, support free of , information finite and positive), the MLE from an iid sample satisfies
so the MLE is consistent, asymptotically normal, and asymptotically efficient: its limiting variance is the Cramér–Rao floor derived in estimators & sampling.
The MLE solves . Taylor-expand the score around the truth :
The numerator is a scaled sum of iid score terms with mean 0 and variance , so by the CLT it converges to . The denominator is an average of iid terms with mean , so by the LLN it converges to . Slutsky’s theorem combines them: . Consistency itself needs a separate uniform-convergence argument (the average log-likelihood converges to its expectation, which is maximised at by Jensen applied to — the Kullback–Leibler inequality).
Observed vs expected information. In practice is unknown; two plug-ins compete. The expected information evaluates the formula ; the observed information uses the actual curvature of your sample, . Both are consistent; Efron and Hinkley’s classic argument favours the observed one — it conditions on how much information this sample happened to carry. Standard errors are then . Worked number: for the exponential, , so with : — five observations pin down almost nothing, which is exactly what the width says.
Method of moments#
The method of moments (MoM) predates likelihood: equate as many sample moments to model moments as there are parameters, and solve. It requires no optimisation, works when the likelihood is ugly, and by the LLN plus the continuous-mapping theorem is consistent whenever the moment map is invertible and continuous.
- Gamma(shape , rate ): mean , variance . Matching and gives , . Data with : , . The gamma MLE has no closed form (it involves the digamma function) — MoM hands you the answer, or the starting point for the numeric MLE.
- Student- degrees of freedom: a standardised has variance for . Matching the sample variance gives : daily returns standardised to variance imply — the fat-tail regime where the fourth moment is already infinite (see the distribution zoo).
| Maximum likelihood | Method of moments | |
|---|---|---|
| Efficiency | Asymptotically efficient (attains CR bound) | Generally inefficient |
| Requirements | Full density, regularity, optimisation | Just moments and the LLN |
| Robustness to misspecification | Can be badly wrong if the density is wrong | Only needs the moment structure to be right |
| Typical role | Final estimate + standard errors | Closed forms, starting values, quick checks |
When likelihood breaks#
The regularity conditions are not decoration; each failure mode is a classic follow-up question.
- Parameter-dependent support (Uniform): no score equation, boundary maximum, rate, non-normal limit — everything above.
- Unbounded likelihood(Gaussian mixtures): put one component’s mean on a data point and let its — the likelihood diverges to infinity at a useless “solution.” Honest fixes: constrain the variance ratio, penalise, or go Bayesian. In practice EM finds a good local maximum and everyone quietly ignores the global degeneracy.
- Nuisance parameters: maximise the ones you do not care about away — the profile likelihood behaves like a likelihood for in regular problems and is how the invariance proof above generalises.
GARCH volatility models, jump-diffusions, and regime-switching models are all fit by maximising a likelihood — usually a quasi-likelihood: a Gaussian maximised over returns that are not Gaussian. QMLE still delivers consistent parameter estimates for the conditional-variance dynamics (the moment structure is right even when the density is wrong — the MoM lesson in disguise), but the standard errors must be corrected. The practical workflow mirrors this chapter: MoM or sample statistics for starting values, numerical maximisation of , observed information for error bars, and suspicion at any likelihood surface as flat as five data points make it. See the applied fit in ARIMA & GARCH and the jump models in jumps & stochastic vol.
Simulation — asymptotic normality, and the non-regular exception#
Two headline claims, verified: the exponential MLE is asymptotically , and the uniform MLE is biased by exactly with its correction.
import numpy as np
rng = np.random.default_rng(11)
reps, n = 100_000, 50
# Regular case: exponential(lambda = 2), MLE = 1/xbar
lam = 2.0
lam_hat = 1.0 / rng.exponential(1 / lam, size=(reps, n)).mean(axis=1)
print(f"E[lam_hat] = {lam_hat.mean():.4f} (true 2; small-sample bias lam/(n-1) = {lam/(n-1):.4f})")
print(f"sd[lam_hat] = {lam_hat.std():.4f} vs asymptotic lam/sqrt(n) = {lam/np.sqrt(n):.4f}")
# Non-regular case: Uniform(0, 1), MLE = max, bias -theta/(n+1)
mx = rng.uniform(0, 1, size=(reps, n)).max(axis=1)
print(f"E[max] = {mx.mean():.4f} vs n/(n+1) = {n/(n+1):.4f}")
print(f"E[(n+1)/n * max] = {((n + 1) / n * mx).mean():.4f} (bias-corrected)")Note the regular case’s residual bias : since , exactly — MLEs are typically biased at order , and it does not matter asymptotically.
Practice problems#
For Uniform, compare the MLE with the MoM estimator, and rank them.
Solution. The mean is , so MoM gives : unbiased with variance . The MLE has (bias ) and ; the corrected is unbiased with variance . Ranking: corrected MLE crushes MoM — for , roughly a 30-fold smaller standard error. Also note can be smaller than an observed data point — an estimate the data already contradicts, which is the memorable knock against it.
Lifetimes are Exponential(). You observe exact failure times , and units still alive at time (right-censored). Find the MLE.
Solution. A failure contributes density ; a censored unit contributes survival probability . So , and
Numeric: 3 defaults at years and 2 names surviving 5 years: per year. The estimator is the occurrence/exposure rate — the form actuaries, credit-risk desks, and reliability engineers all use, and a neat example of the likelihood handling partial information that MoM cannot digest.
Returns are drawn from an equal mixture of and (a crude two-regime model). Estimate by moments. Why not first moments?
Solution. By symmetry for every — the first moment is blind. Go to the second: conditioning on the component, . So match :
The truncation at zero is the tell that the parameter sits near a boundary where regular asymptotics warp. The mixture MLE has no closed form (and the unbounded-likelihood pathology if variances are also free) — this is the standard example of MoM succeeding where naive likelihood maximisation is treacherous.
The normal MLE divides by and is biased. Why does anyone prefer it to ?
Solution. Three reasons, in ascending depth. (1) MSE: for all — the bias buys more variance than it costs (and beats both; see estimators & sampling). (2) Invariance: is the MLE of , while no divisor makes both and unbiased simultaneously (Jensen), so chasing unbiasedness is chasing a moving target. (3) Asymptotics: the difference is , inside the sampling noise — the choice is invisible exactly when the estimate is trustworthy.
For the density on with , find the MLE and its asymptotic variance.
Solution. , so gives . The trick worth saying aloud: , so this is the exponential MLE in disguise, and immediately , giving asymptotic variance — transformation first, computation second.
Next: estimators in hand, decide between hypotheses — type I and II errors, p-values and their misreadings, power, and the confidence-interval duality. Hypothesis tests & confidence intervals.
