EM expectation step 2026-10-14
Hold the old statistical parameters fixed when taking the conditional expectation, while keeping the candidate statistical parameters variable:
For independent observations in a finite mixture model, is a hidden component label. Bayes' theorem gives its mixture responsibilities:
These posterior probabilities are the conditional expectations of the mixture allocation indicators; they turn hidden counts into fractional counts.[ref] They condition on a current fixed fit, rather than averaging over a posterior distribution of the statistical parameters. Taking the conditional expectation of the complete-data log-likelihood is essential: substituting a single guessed label, or merely substituting the conditional mean into a nonlinear complete-data expression, generally gives a different algorithm.
EM likelihood monotonicity Created 2026-10-05 Updated 2026-10-14
For , the Jensen inequality gives
Thus any expectation-maximization algorithm M-step that increases cannot decrease the observed-data likelihood function.[ref]
For a short proof, assume common support and finite expressions, and keep the E-step conditional distribution fixed. The concavity of the logarithm and Jensen's inequality give
This evidence lower bound equals . At , the ratio inside the expectation is the constant , so equality holds. During the M-step, the second term is constant; increasing raises a lower bound that touches the current log-likelihood. Hence
Increasing likelihood values alone do not establish convergence of the statistical parameters or attainment of a global maximum. In a differentiable finite mixture model, the gradient of equals the candidate-parameter gradient of evaluated at the current fit. Thus an interior fixed point of an exact M-step is a stationary point, which need not be a local maximum; the Identical-mean EM trap is an explicit counterexample. Small changes in log-likelihood can also occur before the means have settled, so inspecting both is useful.
EM maximization step 2026-10-14
Maximize over the permitted statistical parameters, with the E-step conditional distribution held fixed.[ref] A finite mixture model has
For normal distributions with known common variance and fixed positive mixture weights, only the means are fitted. Dropping terms independent of these candidate means gives
The derivative in is , and its second derivative is . Thus a positive weighted count gives a unique maximizing weighted mean. This is a maximization of the surrogate ; the observed-data log-likelihood need not be concave. Recompute the mixture responsibilities after updating the means. The broader EM for Gaussian mixtures with a common variance also estimates mixture weights and the shared variance.
Expectation-maximization algorithm Created 2026-10-03 Updated 2026-10-14
The expectation-maximization algorithm fits a latent-variable model by alternating a conditional expectation over the latent variables with a maximization over the statistical parameters. Its target is the observed-data likelihood function, although its updates use the simpler complete-data log-likelihood.[ref]
Write for the observations, for the latent variables, and for their joint probability density function or probability mass function. The observed-data log-likelihood is
where the integral becomes a sum for discrete . Directly maximizing a logarithm of this sum can be awkward. The E-step instead computes a conditional distribution at the current statistical parameters ; the M-step uses it to construct a new fit. The attractive idea is to retain uncertainty about the hidden labels while recovering simple weighted means and other complete-data updates. The Known-variance Gaussian mixture EM example shows the mechanism without estimating a variance or mixture weight.
Arthur Pentland Dempster, Nan M. Laird, and Donald B. Rubin gave the general framework its name in their 1977 paper, which also discusses earlier special-case algorithms.[ref]