Search

Search papers and lessons

Maximum Likelihood from Incomplete Data via the EM Algorithm

A. P. Dempster, Nan M. Laird, Donald B. Rubin · 1977

Dempster, Laird and Rubin (1977) packaged alternate-and-refit into one general algorithm, proved each round raises the likelihood, and showed it across missing data and mixtures.

On this page

  • Colour = topic mix
  • Probability
  • Inference
  • Calculus
  • Discrete math
  • Information theory
  • Optimization
  • Sign in to see your progress

TL;DR

Many maximum-likelihood problems are hard only because some variables are missing, grouped, or hidden. Dempster, Laird and Rubin observed that the same two-step loop solves all of them: replace the missing part by its expected contribution under the current parameters (the E-step), then run an ordinary maximum-likelihood fit using those expectations (the M-step). They gave the general form, proved the likelihood never decreases, and showed the method across a wide range of statistical models.

Where you'll see it: the mixture fitting, hidden Markov model training and missing-value imputation that all trace back to this paper's framework.

The problem

By the 1970s, statisticians already had many special cases where a missing or grouped observation made maximum likelihood awkward. A count table with some cells merged into aggregates, a normal sample with some values lost, a censored survival study, and a mixture of two populations with unknown labels all had the same shape. The likelihood you care about is the one for the data you actually see, which means summing or integrating over the hidden part. That sum usually sits inside a logarithm, and setting the derivatives to zero gives equations with no closed-form solution.

Each special case had its own ad hoc iterative fix, with its own proof of convergence, if it had one. Before this paper nobody had a single recipe with a single guarantee. The authors wanted one algorithm, one theory, and one way to recognise when it applies.

Key idea

Split the hard problem into two easy ones and alternate.

  • E-step. Given the current parameters, compute the expected value of the quantities the complete-data likelihood needs. When the complete-data model is an exponential family, these are the sufficient statistics, so the E-step means averaging them over the hidden values.
  • M-step. Treat those expected values as if they were observed, and solve the usual maximum-likelihood equations.
flowchart LR
  A["current parameters θ_t"] --> B["E-step: expected sufficient statistics given y and θ_t"]
  B --> C["M-step: solve ML equations with those statistics"]
  C --> D["new parameters θ_t+1"]
  D --> A

The paper's point is that this loop is not a special trick. Whenever the complete data would have been easy to analyse, the incomplete-data problem can be handled by this loop, and the likelihood of the observed data climbs at every round. The name "expectation-maximization" is theirs.

The method

Let yy be the observed data, xx the complete data (which includes what is missing), and θ\theta the parameters. The model gives two densities: g(y∣θ)g(y \mid \theta) for what is observed and f(x∣θ)f(x \mid \theta) for the complete data. Observed data come from complete data through a many-to-one map y=y(x)y = y(x), so g(y∣θ)g(y \mid \theta) is the integral of f(x∣θ)f(x \mid \theta) over all complete data xx consistent with yy. The goal is to maximise L(θ)=log⁡g(y∣θ)L(\theta) = \log g(y \mid \theta).

Section 2 of the paper treats first the case where ff is a regular exponential family,

f(x∣θ)=b(x)exp⁡(θTt(x))/a(θ),f(x \mid \theta) = b(x)\exp\big(\theta^{\mathsf T} t(x)\big)/a(\theta),

with natural parameter θ\theta and sufficient statistic t(x)t(x). There the two steps become concrete. The E-step computes t(p)=E[t(x)∣y,θ(p)]t^{(p)} = \mathbb{E}\big[t(x) \mid y, \theta^{(p)}\big], and the M-step solves E[t(x)∣θ]=t(p)\mathbb{E}\big[t(x) \mid \theta\big] = t^{(p)} for θ\theta. The second equation is exactly the maximum-likelihood condition for complete data whose sufficient statistics equal t(p)t^{(p)}.

The paper then generalises. In the general case the E-step is defined through

Q(θ∣θ(p))=E[log⁡f(x∣θ)∣y,θ(p)],Q(\theta \mid \theta^{(p)}) = \mathbb{E}\big[\log f(x \mid \theta) \mid y, \theta^{(p)}\big],

and the M-step picks θ(p+1)\theta^{(p+1)} to maximise QQ. The paper also defines a generalised EM (GEM) algorithm, which only has to increase QQ rather than maximise it. GEM keeps the monotone-likelihood guarantee, which is useful when the full M-step is hard.

The derivative identity

Section 2 contains the formula that explains why the method works. Differentiating L(θ)L(\theta) under the exponential-family form gives

∂∂θL(θ)=E[t(x)∣y,θ]−E[t(x)∣θ].\frac{\partial}{\partial \theta} L(\theta) = \mathbb{E}\big[t(x) \mid y, \theta\big] - \mathbb{E}\big[t(x) \mid \theta\big].

The first term is the expectation given the observed data. The second is the expectation under the complete-data model. At a fixed point of the algorithm, the two are equal, so the derivative is zero. This is the stationarity condition that the paper's convergence theory uses.

Monotonicity

The key result is Theorem 1. For any GEM step,

L(θ(p+1))≥L(θ(p)),L\big(\theta^{(p+1)}\big) \ge L\big(\theta^{(p)}\big),

with equality only when the conditional distribution of the complete data given yy does not change. The proof uses the decomposition of LL into QQ minus a term HH that is the expected log of the conditional density. The paper shows that HH can only decrease from θ(p)\theta^{(p)} to any other value, so increasing QQ must increase LL. Later work restated this as the evidence lower bound and a KL divergence, which is how it is usually taught now (see Expectation-Maximization Algorithm).

Convergence

The paper's later theorems give sufficient conditions under which a sequence of EM iterates converges to a stationary point of LL, and describe the rate. Near the limit θ∗\theta^*, the error shrinks by an approximately constant factor each step,

θ(p+1)−θ∗≈DM(θ∗) (θ(p)−θ∗),\theta^{(p+1)} - \theta^* \approx DM(\theta^*)\,\big(\theta^{(p)} - \theta^*\big),

where DMDM is a matrix that depends on how much of the information is missing. The rate is linear, not quadratic, so EM can be slow when much data is missing. The paper stresses that the method is guaranteed to climb, but only towards a stationary point, so the starting value still matters.

Results

The paper does not report benchmark numbers in the modern sense. Its evidence is one worked example that is followed through every step, plus a catalogue of applications in Section 4.

The worked example (Section 1). Rao (1965) observed 197 animals sorted into four categories with counts y=(125,18,20,34)y = (125, 18, 20, 34). A genetic model gives the cell probabilities (12+θ4,1−θ4,1−θ4,θ4)\left(\tfrac{1}{2} + \tfrac{\theta}{4}, \tfrac{1-\theta}{4}, \tfrac{1-\theta}{4}, \tfrac{\theta}{4}\right). The paper splits the first cell into two sub-cells with counts x1x_1 and x2x_2, where x1+x2=125x_1 + x_2 = 125, which turns the problem into a five-cell multinomial with complete data xx. The EM steps are then

E-step: x2(p)=125 θ(p)2+θ(p),M-step: θ(p+1)=x2(p)+34x2(p)+72.\text{E-step: } x_2^{(p)} = \frac{125\,\theta^{(p)}}{2 + \theta^{(p)}}, \qquad \text{M-step: } \theta^{(p+1)} = \frac{x_2^{(p)} + 34}{x_2^{(p)} + 72}.

Starting from θ(0)=0.5\theta^{(0)} = 0.5, the iterates are as follows. Each row is one full cycle.

  1. θ(0)=0.5\theta^{(0)} = 0.5, giving x2=25.000x_2 = 25.000 and θ(1)=0.608247\theta^{(1)} = 0.608247.
  2. θ(1)=0.608247\theta^{(1)} = 0.608247, giving x2=29.150x_2 = 29.150 and θ(2)=0.624321\theta^{(2)} = 0.624321.
  3. θ(2)=0.624321\theta^{(2)} = 0.624321, giving x2=29.737x_2 = 29.737 and θ(3)=0.626489\theta^{(3)} = 0.626489.
  4. θ(3)=0.626489\theta^{(3)} = 0.626489, giving x2=29.816x_2 = 29.816 and θ(4)=0.626777\theta^{(4)} = 0.626777.
  5. θ(4)=0.626777\theta^{(4)} = 0.626777, giving x2=29.826x_2 = 29.826 and θ(5)=0.626816\theta^{(5)} = 0.626816.

The estimate settles at θ∗≈0.6268\theta^* \approx 0.6268 within a few steps. The ratio of successive deviations from θ∗\theta^* settles near 0.130.13, which the paper's rate theory predicts. The example is the paper's illustration of linear convergence.

The applications (Section 4). The authors show that the same framework covers:

  • Missing values in multinomial samples and in normal linear models (4.1). The E-step imputes sums of squares and cross-products, and the M-step is an ordinary least-squares or normal fit.
  • Censored and truncated data (4.2), where the unobserved part is the value beyond a cut-off.
  • Finite mixtures (4.3), where the hidden variable is the component label. This is the case that became the standard fitting method for Gaussian mixtures.
  • Variance components and hyperparameters in Bayesian models (4.4 and 4.5), where the hidden variables are random effects.
  • Factor analysis (4.7) and iteratively reweighted least squares for robust estimation, both of which fall out of the same E- and M-steps.

Each example is sketched rather than fully analysed, which is part of why the paper became a reference: a reader can take any of the models and check the two steps.

Why it mattered

Before 1977 the EM idea appeared again and again under different names, sometimes only inside one application. Hartley (1958) gave an early version for multinomial data with aggregated cells, and Baum and colleagues (1970) developed the forward-backward training of hidden Markov models, which is the same idea in another setting. The 1977 paper did three things the earlier work had not done together. It named the method, stated it at a level general enough to cover all of these cases, and proved the monotone-likelihood result for the whole class.

The name and the framework made EM a default tool. Mixture models, hidden Markov models, missing-data imputation, latent-variable models and many clustering methods all use the same loop, and most introductory texts teach EM through them. Its influence shows in how often the same two steps reappear across fields.

Reading guide

Read the paper in this order. Each item lists the lessons you need in hand.

  1. Section 1 and the 197-animal example. Needs Conditional Probability for splitting a cell into two sub-cells, and Maximum Likelihood Estimation for the M-step as an ordinary fit.
  2. Section 2, the exponential-family definitions. Needs Exponential Family for the natural parameter and sufficient statistics, and the derivative identity for why the E-step is an expectation.
  3. Section 2, the general definitions of Q. Needs Expectation-Maximization Algorithm for the expected complete-data log-likelihood as a function of the current parameters.
  4. Section 3, monotonicity (Theorem 1). Needs Kullback–Leibler Divergence for the non-negativity of the divergence term, and Variational Lower Bound (ELBO) for the lower-bound view that makes the proof easy to follow.
  5. Section 3, convergence and rates (the theorems after Theorem 1). Mostly calculus on the Hessian of QQ. Skip on a first read.
  6. Section 4.3, finite mixtures. Needs Mixture Model for the hidden label and the component densities, and Jensen's Inequality for why the logarithm of a sum is the source of the difficulty.
  7. Sections 4.1, 4.2 and 4.4 to 4.7. Each is a variant of the same two steps. Read one, then check the others against it.

Check yourself

QuestionIn the 197-animal example, the E-step gives x2(p)=125 θ(p)/(2+θ(p))x_2^{(p)} = 125\,\theta^{(p)} / (2 + \theta^{(p)}). What is x2x_2 when θ=0.5\theta = 0.5?Show answer

Substitute θ=0.5\theta = 0.5: the numerator is 125×0.5=62.5125 \times 0.5 = 62.5, and the denominator is 2+0.5=2.52 + 0.5 = 2.5. So x2=62.5/2.5=25x_2 = 62.5 / 2.5 = 25. This is the expected count in the sub-cell with probability θ/4\theta/4, out of the 125 observations in the merged cell.

QuestionUsing the same example, the M-step is θ(p+1)=(x2+34)/(x2+72)\theta^{(p+1)} = (x_2 + 34) / (x_2 + 72). Starting from x2=25x_2 = 25, what is θ(1)\theta^{(1)}?Show answer

The numerator is 25+34=5925 + 34 = 59. The denominator is 25+72=9725 + 72 = 97. So θ(1)=59/97≈0.6082\theta^{(1)} = 59 / 97 \approx 0.6082. The denominator is 18+20+34=7218 + 20 + 34 = 72 plus the expected x2x_2, which is the total of all cells that depend on θ\theta.

QuestionTheorem 1 says each GEM step does not decrease the observed-data likelihood. Why does the paper need the GEM generalisation at all, rather than insisting on the full M-step?Show answer

Sometimes solving max⁡θQ(θ∣θ(p))\max_\theta Q(\theta \mid \theta^{(p)}) exactly is hard, while merely increasing QQ is easy, for example by a single Newton step. The monotonicity proof only uses that QQ does not decrease, so any update that increases QQ still increases LL. This lets practitioners use cheaper inner loops without losing the guarantee.

QuestionWhy does the paper say EM converges only to a stationary point, and what would go wrong if the starting value were chosen badly?Show answer

The likelihood is non-decreasing, so it climbs until the step sizes become negligible. But a climbing sequence can stop at a local maximum or a saddle point, which is a stationary point that is not the global maximum. For a mixture model, a bad starting value can place two components on the same cluster, and EM will converge to that poor fit without any warning. The guarantee is about the value of the likelihood, not about reaching the best parameters.

QuestionA researcher says EM is always fast because each step improves the likelihood. Using the paper's example, explain what is wrong with this claim.Show answer

Improving the likelihood at every step is a guarantee of direction, not of speed. In the example the error shrinks by a constant factor near 0.13 per step, so each cycle buys a roughly fixed fraction of the remaining error. That is linear convergence. It is fast here because the missing information is small. When much of the data is missing, the factor is closer to 1 and EM needs many more cycles.

Sources

Read the full paper

A. P. Dempster, Nan M. Laird, Donald B. Rubin, 1977.