Consider an approximate conditional likelihood in which a paired total leads to a structural zero with probability , and otherwise a binomial distribution with success probability . For an observed zero, the posterior cure weight is ; for a positive count it is zero. Differentiating the log-likelihood gives the displayed equations at an interior maximum-likelihood estimator, with the weights evaluated at that estimator. Recomputing the weights and then updating the parameters is an expectation-maximization algorithm. Boundary fits must also be considered. These equations describe a conditional mixture: if cure is instead specified before two Poisson distributions are conditioned on their total, its conditional probability generally depends on the total and on the baseline nuisance rate. A zero observed in a short interval is not by itself proof of permanent biological cure.
Let eventual outcome have probability , with . An observed outcome at time contributes to the likelihood, while right censoring at contributes . The expectation-maximization algorithm imputes both the censored outcome and its latent log event time. Its E-step uses the displayed conditional weights and the first two moments of a truncated normal distribution above . With and Inverse Mills ratio , these moments are and . Observed outcomes use deterministic class weights and moments . The M-step updates each class probability to its average weight, its mean to the weighted first moment, and its variance to the weighted second moment minus the squared new mean. Outcome-specific cumulative probabilities are cumulative incidence functions, not the conditional distributions themselves.
The expectation-maximization algorithm introduces for a structural zero. Its E-step gives at positive counts and at zero. The M-step maximizes a logistic log-likelihood with fractional responses and a Poisson log-likelihood with weights . With only a binary predictor, write for group size, and ; the explicit updates are and . Log and logit group contrasts recover the regression coefficients, with boundary values interpreted through limits.
EM for a missing observation in a Gaussian AR1 process Created 2026-10-05 Updated 2026-10-06
In the expectation-maximization algorithm for a stationary autoregressive process of order one, a single missing interior value has a normal distribution conditional on its neighbors. The E-step uses both its conditional mean and its conditional second moment, not just mean imputation. The M-step maximizes the expected stationary complete-data log-likelihood, including the initial-observation density and the conditional-variance contribution to the two adjacent innovation squares.
For independent normal coordinates, an unobserved first coordinate has conditional law equal to its current marginal normal distribution, even when the second coordinate of that observation is known. Thus its E-step first moment is and second moment is . With three observed first coordinates and one missing value, the mean update is and the variance update is . The conditional variance term is essential: filling in only the conditional mean is not the expectation-maximization algorithm.
For a multinomial distribution with two unobserved cells merged into one observed count, the conditional allocation is a binomial distribution with probabilities proportional to the two cell probabilities. The expectation-maximization algorithm replaces the missing counts by their conditional expectations in the parameter-dependent part of the complete-data log-likelihood. The expectation of a log-factorial normalization generally differs from its value at the expected count, but this difference is independent of the candidate parameter and does not affect the maximization step.
EM for zero-inflated negative binomial regression Created 2026-10-05 Updated 2026-10-14
For known size and , the expectation-maximization algorithm gives structural-zero responsibility for positive counts and for zero counts. This is Bayes' theorem. Maximizing the expected complete-data log-likelihood gives and a weighted negative binomial regression with weights . The objective separates into a Bernoulli mixing term and a weighted count term, which proves the update.
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 transition-count update on a tree Created 2026-10-06 Updated 2026-10-14
For a common unconstrained Markov kernel on the edges of a rooted tree, let be the conditional expectation of the number of transitions , given observed leaves and the old Markov kernel. The expectation-maximization algorithm maximizes over row probability distributions, giving . A row with zero total count is unrestricted by this objective. Belief propagation computes the counts exactly on a tree.
EM update for a single-factor Gaussian model Created 2026-10-05 Updated 2026-10-14
In factor analysis with one factor and fixed noise variance , let be the current loading vector, , and . The expectation-maximization algorithm update is
The conditional factor means are and their variances are ; maximizing the expected complete-data log-likelihood gives the formula.
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]
Felsenstein pruning algorithm Created 2026-10-06 Updated 2026-10-20
The Felsenstein pruning algorithm computes a site likelihood function by sum-product belief propagation from leaves to root. For a finite-state Markov kernel , the subtree likelihood function obeys , with observed-state indicators at leaves. Summing against the root probability distribution gives the site likelihood function. An outward pass gives edge posterior probabilities and expected transition counts for the expectation-maximization algorithm.
Choose six illustrative values , fixed mixture weights , known standard deviation , and initial means . These are constructed data for a Gaussian mixture distribution, not measurements. With the standard normal distribution probability density function, the fitted log-likelihood is
At the initial means, the component density ratio is . The first E-step therefore gives
Figure 1.
The first E-step retains two soft label probabilities at each chosen data point
. Initial means are minus one and one, mixture weights are one half, and the known standard deviation is one. Stacked bars show the two conditional label probabilities; every row sums to one. Small but nonzero probabilities remain visible in the numerical labels. Details.
The paired values and have complementary mixture responsibilities, so exactly. The first M-step gives
The hyperbolic tangent expression follows by pairing the contributions at and . Assigning every negative value wholly to the first mixture component and every positive value wholly to the second would instead give means . Those hard assignments discard the overlap: the expectation-maximization algorithm is not the same update as K-means clustering.
The observed-data log-likelihood rises from initially to after one update and after two. Further updates approach means , with log-likelihood approximately . These values describe this initialization; EM likelihood monotonicity supplies no certificate of a global maximum.
Figure 2.
Likelihood ascent and mean updates for the chosen data, compared with an identical-means initialization
. Iteration zero is the initial fit; each subsequent point follows one E-step and one M-step. Starting at minus one and one increases the likelihood. Starting both means at zero leaves them at zero with a lower constant likelihood. All runs keep variance one and weights one half. Details.
For stable numerical evaluation, put and . The log-sum-exp function gives
Subtracting keeps at least one exponential equal to one, avoiding the all-zero sum that direct evaluation of tiny component densities can produce.
Mixture responsibility Created 2026-10-06 Updated 2026-10-14
A mixture responsibility is the posterior probability of a component label given an observation and current parameters: . Each observation's responsibilities sum to one. The expectation-maximization algorithm uses these soft assignments rather than fixed hard cluster labels.
For observed data and latent variables , let be the complete-data log-likelihood. From a current parameter , the expectation-maximization algorithm computes
and then chooses maximizing this function in its first argument. Thus the E-step averages the missing information conditional on the current model and observed data; the M-step treats those expectations as fixed while maximizing.
For a short proof of likelihood function monotonicity, let . Then
The Jensen inequality for the logarithm gives . The M-step makes the right side nonnegative. Thus observed likelihood function cannot decrease. This proves the usual EM likelihood monotonicity, while allowing convergence to local stationary points rather than guaranteeing a global maximum.
For observed data and missing data , let be the complete-data model. Starting at , the expectation-maximization algorithm alternates
The E-step computes the conditional expectation of the complete-data log-likelihood, using the current parameter for the missing-data conditional distribution. The M-step maximizes that expected log-likelihood over a new parameter. Maximizing the likelihood of imputed mean data is equivalent only when the complete-data log-likelihood has the necessary linear dependence on the missing sufficient statistics.
For the monotonicity argument, let . Jensen inequality gives
Therefore an M-step increasing cannot decrease the observed-data likelihood. Standard support and integrability conditions are understood. EM need not find a global maximum for a general model; its behavior depends on the objective and starting point.
Work with the stipulated approximate conditional likelihood. Let and , and put
Terms independent of the parameters, including the positive-count binomial coefficients, can be omitted. The log-likelihood is
For an interior maximum-likelihood estimator, set its two score functions to zero. Differentiating with respect to gives
Differentiating with respect to gives
Here there are seven zero-count patients and five positive-count patients, with and . Thus the positive-count contribution to the second equation is .
An interpretable way to solve the equations uses a posterior cure weight for each observed patient:
For a zero count, is the posterior probability of belonging to the non-cured component under this approximate conditional model. The two score functions can then be rewritten as
Therefore the conditional cure-weight equations for paired Poisson counts are
They can be solved by an expectation-maximization algorithm: calculate the weights at the current parameters, update to their mean and to the weighted event fraction, and iterate. A solution of the equations must be checked as a maximum; the equations alone do not guarantee a global maximum. In particular the boundary gives the no-cure estimate and should be compared. Boundaries , or have zero likelihood for these positive counts with positive pre-treatment counts. Numerical maximization gives an interior fit about , with larger log-likelihood than the no-cure boundary, consistent with the PDF's rounded estimates.
The word “approximate” is important. If cure is specified before conditioning in the original Poisson distributions, the conditional cure probability given would actually be
which still depends on . This follows because a cured total has mean and a non-cured total has mean . The likelihood supplied in the question instead treats as the mixture probability after conditioning; the score and weight equations above maximize exactly that stipulated approximation, without claiming nuisance-rate elimination for the full cure model.
Take the missing strong-swimmer times , , as the latent variables. Their partners' times are . The complete-data log-likelihood is
For the E-step of the expectation-maximization algorithm, use the conditional split of two exponential times. At the old rates, with ,
This is a truncated exponential distribution, whose conditional expectation is
The displayed mean follows by integrating against the conditional density; the missing weak-swimmer mean is . As , the conditional density becomes uniform on and .
Write and . The E-step objective is
Setting its partial derivatives to zero gives the unconstrained M-step
These are eight divided by the completed expected totals for the corresponding swimmers; imputing only observed pair totals without the conditional split would not perform the E-step.
The stated ordering must also be enforced. The ordered-rate exponential M-step accepts these updates when , so . Otherwise its maximum on the closed constraint lies at
Under a strictly open constraint , a boundary optimum is only a supremum; a finite interior maximizer is not assured for every possible sample. One should report that situation rather than swap the labeled swimmer groups. Starting from positive ordered rates, iterate the E-step and constrained M-step until the parameter changes and observed log-likelihood improvement are small. EM likelihood monotonicity applies to every exact constrained M-step. No numerical swimming times are supplied, so the data-dependent updates, rather than fabricated numerical estimates, are the answer.
Let denote the observed data, the unobserved data and the model parameters. The expectation-maximization algorithm works with the complete-data log-likelihood . Given , its E-step computes
where the conditional expectation uses the old parameter, while remains the argument to maximize. Its M-step chooses maximizing this function over the parameter space. EM likelihood monotonicity ensures that an M-step increasing cannot decrease the observed-data log-likelihood. It does not guarantee a global maximum, so convergence and any parameter constraints must still be checked.
Both data augmentation and the expectation-maximization algorithm introduce latent variables that make the complete-data model easier to handle. The observed-data likelihood is obtained by summing or integrating over the missing data, and both methods use the conditional law of given the observations and current parameters.
In data augmentation for Bayesian inference, one alternates random draws
These are Gibbs sampler updates on the joint posterior distribution; marginal parameter draws explore the whole posterior, including uncertainty, provided the chain converges appropriately. The parameter conditional incorporates its prior.
The expectation-maximization algorithm is instead a deterministic optimization procedure. Its E step forms
and its M step maximizes this function over . Exact steps do not decrease the observed-data likelihood function. Their aim is a likelihood stationary point, often a local maximum, rather than draws from a parameter distribution. Adding a log prior to the maximization gives a posterior-mode version, which still does not sample the posterior.
Data augmentation samples conditional missing data and parameters; EM averages the complete-data log likelihood and optimizes parameters. The E step is an expectation of the log likelihood, not the log of an averaged likelihood, and generally is not equivalent to merely replacing each missing value by its conditional mean. A Monte Carlo E-step approximation is a further variant of EM, not automatically the same procedure as a data augmentation chain.