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.
For fixed statistical parameters and , Bayes' theorem gives the mixture responsibility
It is the conditional expectation of the mixture allocation indicator. This posterior probability concerns the hidden label, with held fixed; it does not require a prior distribution over . For a continuous , use the density ratio to define this conditional distribution, rather than dividing probabilities of the zero-probability event .[ref]
For the Two-Gaussian mixture example, the component density ratio is , so the posterior probability ratio and the mixture responsibilities are
At the two unweighted component densities are equal, so the mixture responsibilities equal the mixture weights: , . At , the second component density is twice the first and its mixture responsibility is . Equal mixture responsibilities instead occur at : the more frequent second mixture component is favored even slightly to the left of the midpoint.
Figure 1.
Posterior responsibilities change with x while the stipulated mixture weights stay fixed
. Original analytic responsibilities for the same two-Gaussian mixture, with prior label probabilities shown as dotted horizontal lines. Both responsibilities remain strictly between zero and one at every finite x; the vertical marker denotes equal posterior probabilities, not disjoint component supports. Details.
The mixture weights describe membership before learning ; mixture responsibilities describe membership after learning . The law of total expectation gives under this statistical model, although varies across individual values. In fitting by the expectation-maximization algorithm, evaluate mixture responsibilities at the current statistical parameters and recompute them after an update.
Stipulate an original Gaussian mixture distribution with mixture weights , , component means , , and component variances both equal to one. These are chosen statistical parameters, with no observed sample or fitting. If is the standard normal distribution probability density function, then
In the figure, the two colored curves are weighted probability density functions, with areas and . Adding their heights at every gives the black curve. Neither colored curve stops at a dividing line.
Figure 1.
Stipulated two-Gaussian mixture: weighted component densities and their sum
. Original analytic curves for component means and , component variances one, and mixture weights and . No observed points, histogram, or fitted parameters are used. Details.
The law of total expectation and law of total variance give the total mean and variance:
All of the extra variance comes from variation between component means. Equivalently, the second moment is , so the variance is .
A mixture distribution is different from a deterministic linear combination of random variables. If independent and are drawn and , then has a normal distribution with the same mean but variance , rather than . Every draw of uses both random variables. A draw from the mixture distribution instead uses , where the mixture allocation indicators are independent of and select exactly one of them. The expression for adds densities, not simultaneous random outcomes.