Maximum Likelihood Estimation
Suppose you observe ten independent light bulbs and record their failure times. You believe the lifetimes follow an exponential distribution. However, you do not know its rate parameter. What single number best explains the data you actually saw? Maximum likelihood estimation answers this by turning the question around. Instead of asking "what is the true parameter?", it asks a different question. It asks "for which parameter value was the data I observed most probable?" This inversion — from probability of data given parameter, to plausibility of parameter given data — is one of the most consequential ideas in statistics. The method matters because it is simultaneously simple to state, mechanical to apply, and remarkably powerful in its consequences. Maximum likelihood estimators (MLEs) are typically consistent, asymptotically normal, and asymptotically efficient under mild regularity conditions. This means that for large samples they behave about as well as any estimator possibly can. This efficiency is not an accident. It is tied to a deep quantity called the Fisher information, which measures how sharply the likelihood is peaked around the truth. The big picture is this: a statistical model assigns a probability (or density) to each possible dataset. This assignment is a function of an unknown parameter. Fixing the observed data and letting the parameter vary turns this into the likelihood function. Maximum likelihood estimation is the search for the parameter value that makes this function as large as possible. Because likelihoods are products of many terms, one almost always works with the log-likelihood. Its derivative — the score — provides the calculus machinery for finding maxima. This article builds the method from its formal definition. It develops the score-function calculus that makes computation tractable. It proves existence and a first-order characterization of the maximizer under standard smoothness conditions. It also works through two genuinely different examples. One is continuous (exponential), and one has its maximum at a boundary rather than a stationary point (uniform). It closes by flagging exactly where the theorem's hypotheses are needed. It previews the asymptotic theory — consistency, efficiency, and the Cramér–Rao bound — that maximum likelihood estimation sets up.
- The likelihood function is the joint density/pmf of the data, viewed as a function of the parameter with the data fixed.
- The maximum likelihood estimator (MLE) is the value of maximizing , equivalently maximizing the log-likelihood .
- The score function is the derivative of the log-likelihood; setting gives the likelihood equation, whose root is a candidate MLE.
- For smooth, identifiable, regular models, the MLE solves the likelihood equation and is characterized by a second-derivative (concavity) check.
- Not every MLE is a stationary point — boundary maxima (e.g. uniform distribution) require direct inspection of rather than calculus alone.
- Key idea: maximize the plausibility of the parameter given what you actually observed, by finding where the log-likelihood is steepest-then-flat, i.e. where its derivative vanishes and curves downward.
Where this lives today
Maximum likelihood estimation is the backbone of parametric statistical modeling across essentially every quantitative discipline. In biostatistics and epidemiology, MLE fits survival models (exponential, Weibull, Cox proportional hazards) to time-to-event data exactly as in the light-bulb example above. In machine learning, training a logistic regression classifier or a Gaussian mixture model (via the EM algorithm) is literally maximum likelihood estimation, and the cross-entropy loss minimized in neural network classifiers is the negative log-likelihood of a categorical model. In genetics, phylogenetic tree reconstruction from DNA sequence data is typically done by maximizing the likelihood of the tree topology and branch lengths under a nucleotide substitution model. In econometrics, MLE underlies probit and logit demand models, ARCH/GARCH volatility models, and structural macro models. In physics and engineering, MLE (often disguised as "least squares" under Gaussian noise, itself a special case) calibrates instruments and estimates decay rates, signal parameters, and channel characteristics in communications. In cryptography and coding theory, maximum-likelihood decoding chooses the transmitted codeword maximizing the probability of the observed noisy channel output, directly generalizing the estimation principle to a decision-theoretic setting. This universality is precisely why the theory built around MLE — its consistency, asymptotic normality, and connection to The Cramer-Rao Lower Bound via Properties of MLEs — is such foundational machinery for the Likelihood Ratio Tests used throughout modern hypothesis testing.
Ask the tutor: How does the Fisher information determine the asymptotic variance of the MLE, and how does that connect to the Cramér–Rao lower bound?
Let be a random sample from a distribution with density or probability mass function , where is an unknown parameter (or parameter vector) belonging to the parameter space . Given observed data , the likelihood function is
the joint density (or pmf) of the sample, viewed as a function of with the data held fixed. The log-likelihood is , defined wherever . A maximum likelihood estimate is a value satisfying
Replacing the fixed data by the random sample turns into a random variable (a statistic), the maximum likelihood estimator (MLE). When is an open subset of and is differentiable, the score function is (or when ), and the likelihood equation is .
Intuition
Think of as a landscape whose height at each point tells you how consistent that parameter value is with the data you actually recorded. Different candidate parameters make the observed sample more or less "typical" — a parameter far from the truth would make the observed sample a bizarre, low-probability fluke, while a well-chosen parameter makes the observed sample look ordinary. Maximum likelihood estimation simply climbs to the top of this landscape. Because is a product of terms, each between and (for densities bounded appropriately, or pmf values), it tends to be an extremely small number that underflows numerically and is unpleasant to differentiate via the product rule. Taking logarithms converts the product into a sum without changing where the maximum occurs, since is strictly increasing. This is why one almost always maximizes instead of directly — same maximizer, vastly friendlier calculus. The score measures the local slope of the log-likelihood. Where the score is positive, increasing increases plausibility; where it is negative, decreasing helps. A stationary point is a candidate summit — but one must check it is a maximum (via a second-derivative or global argument), and one must also check the true maximum is not hiding at a boundary of , where the score need not vanish at all.
Let be i.i.d. with density or pmf for in an open interval . Suppose: 1. (Support condition) The set does not depend on . 2. (Smoothness) For every in this common support, is twice continuously differentiable on . 3. (Interior maximum) The log-likelihood attains its supremum over at some point lying in the interior of (which holds automatically since is open), and is continuously differentiable in a neighborhood of . Then satisfies the likelihood equation
Conversely, if is a stationary point of (i.e. ) and for all (global concavity), then is a global maximizer of , hence a maximum likelihood estimate.
We prove both directions; the technique is elementary single-variable calculus (Fermat's stationary-point condition and the concavity criterion), applied to the log-likelihood.
Direction 1 (necessity of the likelihood equation). By hypothesis, is differentiable on an open neighborhood of , and maximizes over . Since is open, is an interior point of , so there exists with . Consider the one-variable function for . Since maximizes over all of , in particular for all such , i.e. has a local (indeed global, restricted to this interval) maximum at . By Fermat's theorem on stationary points (if a differentiable function of one real variable has a local extremum at an interior point of its domain, its derivative vanishes there), we conclude . But by the chain rule, so . Hence , which is exactly the likelihood equation
using linearity of differentiation applied to the finite sum defining (justified since each term is differentiable by hypothesis 2, and a finite sum of differentiable functions is differentiable with derivative the sum of derivatives). This proves the forward direction. Note hypothesis 1 (constant support) is what guarantees is actually differentiable in near the true data-generating value in the first place — without it, could be identically zero for a whole side of values, creating a non-smooth boundary effect (see the accompanying counterexample).
Direction 2 (sufficiency of stationarity plus global concavity). Suppose and for every . Concavity of on the interval follows from the standard second-derivative test for concavity: if a twice-differentiable function on an interval has nonpositive second derivative throughout, it is concave (this is proved by applying the mean value theorem twice — for any in and , write and compare to the chord via Taylor's theorem with Lagrange remainder,
for some between and between ; since everywhere, both remainder terms are , and a weighted combination of the two displayed equations with weights recovers exactly the concavity inequality after rearrangement). For a concave differentiable function on an interval, a stationary point is a global maximizer: indeed, for any , concavity gives
(this is the standard "concave functions lie below their tangent lines" inequality, itself a direct consequence of the mean value theorem applied between and together with forcing to be non-increasing). Substituting yields for all . Hence globally maximizes over , and since is a strictly increasing bijection from to , also globally maximizes . Thus is a maximum likelihood estimate.
∎Worked examples
Example 1: Exponential lifetimes (rate parameter, interior maximum). Suppose are i.i.d. with density for , , modeling the ten light-bulb lifetimes from the overview. Take asymmetric observed data (in hours): , so and . The likelihood is
The log-likelihood is
The support of is for every , satisfying the support condition; is smooth in on , satisfying the smoothness condition; and is open. The score is
Setting gives per hour. Check the second derivative: for all , so is (strictly) concave everywhere on . By the theorem's converse direction, the unique stationary point is the global maximizer. In general, with sample mean , the same computation gives ; here and indeed . The MLE of the rate is the reciprocal of the sample mean lifetime — matching the intuitive method-of-moments estimator, though the two need not always coincide in other models.
Example 2: Uniform (boundary maximum, calculus does not apply). Suppose are i.i.d. with density
This model violates hypothesis 1 of the theorem: the support depends on . So we cannot expect the likelihood equation to locate the maximum, and indeed it will not. Take asymmetric data , so and . The joint density is
For , (the data point is impossible under that ). For , , which is strictly decreasing in — there is no interior stationary point since anywhere on . The maximum of over therefore occurs at the smallest admissible value, the left endpoint :
This example shows explicitly why hypothesis 1 (constant support) is essential to the theorem: here the maximizer is found by direct inspection of the shape of (increasing on trivially — it is zero there — then strictly decreasing on ), not by solving a likelihood equation, since is not even differentiable at the maximizing point .
The uniform example above is precisely the counterexample to the theorem's necessity direction when hypothesis 1 fails. Formally: let , open, and let . The support depends on , so hypothesis 1 fails. The MLE is , as shown above. Yet at , the log-likelihood for (and for ) is not differentiable at : its one-sided derivative from the right is , and there is no meaningful left derivative since there. So the likelihood equation fails to hold at the true MLE — the conclusion of the theorem's forward direction is false once hypothesis 1 is dropped. This is the archetypal warning that calculus-based ("solve ") maximum likelihood only works when the support of the model does not shift with ; whenever the parameter defines a boundary of the sample space (uniform, and more generally any or truncated/support-varying family), one must maximize by direct case analysis instead.
Scope, edge cases & common traps
| Situation | What happens | What to do |
|---|---|---|
| Smooth model, constant support, unique stationary point, globally concave | Likelihood equation gives the unique MLE | Solve , confirm via or a direct check |
| Support depends on (e.g. Uniform) | MLE often at a boundary/order statistic; score may not vanish there | Inspect directly as a function of ; do not blindly differentiate |
| Multiple stationary points / non-concave | Some stationary points are local maxima, minima, or saddle points | Compare values at all stationary points and at boundary/limits |
| Non-identifiable model (distinct give identical distributions) | MLE is not unique, or not even well-defined as a point | Reparametrize to restore identifiability before maximizing |
| Discrete parameter space | Derivative-based method inapplicable; likelihood equation meaningless | Compare across the (finite or countable) candidate values directly |
The mathematician behind it
Origins · 1 minSir Ronald Aylmer Fisher and how this was discovered
Fisher formalized maximum likelihood estimation in the 1910s–1920s, coined the term "likelihood" to deliberately distinguish it from "probability," and proved its large-sample optimality properties that made it the dominant estimation paradigm in classical statistics. He also founded much of modern experimental design and analysis of variance, and introduced the concept of Fisher information that quantifies the precision achievable by an estimator — a concept that reappears in The Cramer-Rao Lower Bound.
What exactly is the difference between "likelihood" and "probability"?
Probability and likelihood use the same mathematical formula, , but hold different things fixed. Probability fixes the parameter and treats as variable, answering "how likely is this outcome, given this parameter?" Likelihood fixes the observed data and treats as variable, answering "how consistent is this parameter with the data I saw?" Consequently is not a probability distribution over : it need not integrate to over , and comparing to only tells you which parameter value makes the observed data relatively more plausible, not the probability that either value is "true."
Does the MLE always exist and is it always unique?
Neither is guaranteed in general. Existence can fail if the supremum of over is not attained (e.g. approached only as tends to a boundary point excluded from , or as ). Uniqueness can fail if has multiple local maxima of equal height, or if the model is not identifiable (distinct parameters yield the same distribution). In well-behaved "regular" exponential-family models with an open parameter space, existence and uniqueness typically hold, but they must be checked, not assumed, exactly as illustrated by the difference between the concave exponential example and the boundary-maximum uniform example.
Why is the second-derivative check (concavity) needed, and is it always required?
A vanishing derivative alone only signals a stationary point — it could be a local max, local min, or saddle/inflection point. The theorem's converse direction uses global concavity ( everywhere) specifically to upgrade "stationary" to "global maximizer" in one clean step. If is not globally concave, a milder local second-derivative test () only certifies a local maximum, and one must separately verify no other stationary point or boundary behavior gives a higher likelihood value.
How does maximum likelihood relate to the method of moments?
Both are general recipes for constructing point estimators from data, but they use different information. Method of moments matches sample moments (mean, variance, etc.) to their theoretical counterparts and solves for . Maximum likelihood instead uses the entire specified distributional form via the likelihood function. The two coincide in some models (e.g. the exponential rate example above gives both ways) but differ in general; MLE typically has better asymptotic efficiency properties, discussed further under Properties of MLEs.
What is the "score function" used for, beyond just finding the MLE?
The score is central to the entire asymptotic theory of likelihood-based inference, not just point estimation. Its variance, , defines the Fisher information , which governs the asymptotic variance of the MLE and appears directly in The Cramer-Rao Lower Bound. The score also underlies score tests (Rao's test) and the theory of efficient estimation, making it one of the pivotal objects connecting estimation and hypothesis testing.
Can maximum likelihood estimation be extended to multiple parameters?
Yes — when is a vector, the same idea applies: maximize over . The score becomes the gradient vector , the likelihood equations become the system , and the concavity check is replaced by requiring the Hessian matrix of second partial derivatives to be negative semi-definite. The underlying logic — stationarity plus a curvature condition implies a global maximum — carries over essentially unchanged, though solving the resulting system typically requires numerical methods like Newton–Raphson or Fisher scoring.
Why does the exponential example's MLE match the intuitive "reciprocal of the average lifetime" formula?
For the Exponential() model, , so the true rate is the reciprocal of the true mean lifetime. The MLE calculation above derived purely from maximizing the likelihood, and it happens to coincide with "plug the sample mean into the population formula and invert" — this is a feature of the exponential family's simple structure, not a general law; in other models the MLE and such naive plug-in estimators can differ substantially.