How this calculation works
Fit one multivariate Gaussian distribution directly to partially observed rows by expectation maximization. Missing entries are retained as conditional expectations during fitting, while conditional covariance contributes to the estimated second moments instead of being discarded.
E[X_M|x_O]=μ_M+Σ_MOΣ_OO⁻¹(x_O−μ_O); E[XXᵀ|x_O]=E[X|x_O]E[X|x_O]ᵀ+Cov(X|x_O).A worked example
The 24 example rows occur in positive-negative pairs, with 12 entries marked missing symmetrically. Both fitted means remain near zero. The output uses all observed subvectors in the likelihood and reports Gaussian ML covariance; it does not treat conditional-mean imputations as fully observed independent measurements.
Good to know
20–200 rows,2–5 features; ? or null denotes missing. No all-missing rows; every variable pair must have≥5joint observations. Gaussian observed-likelihood EM≤2000 iterations,positive-definite covariance and monotonic-likelihood checks; no regularization or automatic deletion. Conditional means are not stochastic imputations; no standard errors, multiple imputation or MAR test.
Reference: Dempster Laird Rubin EM paper (opens in a new tab) ↗
Use missing markers without changing row alignment
A row represents one observation vector whose feature positions must stay fixed. Use a question mark for a missing coordinate rather than leaving an empty field, shifting later columns or entering zero as a substitute.
A zero is a genuine observed numeric value and therefore changes the likelihood if substituted for a missing entry. The page rejects completely missing rows because they supply no observed information, and it requires several jointly observed values for every feature pair.
Compare this with the Gaussian mixture model calculator from one dimensional samples. A complete-data Gaussian mixture does not estimate a missing-data likelihood or conditional imputations.
The likelihood uses each observed subvector
For a row with only some coordinates observed, the appropriate Gaussian likelihood is the marginal density of those observed coordinates. Its mean and covariance are the corresponding subvector and principal covariance block of the shared model.
The implementation sums these observed-subvector log densities. It does not evaluate a complete-data density at a filled-in row and call that the observed likelihood. The distinction matters when missingness patterns differ and when comparing an independent likelihood implementation.
The E-step needs both a mean and a covariance
Conditioning a Gaussian on observed entries supplies a mean for the missing coordinates and a covariance for their remaining uncertainty. The expected outer product includes that conditional covariance as well as the outer product of the conditional mean.
Dropping the covariance term would generally underestimate variability by pretending each missing value had been measured exactly at its prediction. The EM update instead accumulates expected first and second moments, then forms the common ML mean and covariance.
Symmetry makes the default means independently checkable
The example pairs each complete underlying vector with its negative and uses the same missing pattern for both members. That symmetry forces a zero mean at a resolved symmetric likelihood optimum, providing a useful check on conditional reconstruction.
The covariance still depends on which coordinates were observed together and on the observed-likelihood optimization. It should be checked through the likelihood and covariance entries rather than assumed equal to the covariance of an arbitrary mean-filled table.
Convergence checks concern the observed objective
Each full EM iteration should not decrease the observed-data likelihood apart from numerical roundoff. The page checks that behavior and requires small parameter changes together with a small likelihood change before declaring convergence.
It also rejects a covariance that becomes singular or too ill-conditioned. There is no hidden diagonal ridge added to force an answer. A returned interior fit is a numerical model estimate, not a certificate that every missing-data pattern contains sufficient scientific information.
Conditional-mean completion is not multiple imputation
The completed rows in the output replace missing coordinates by their fitted conditional means. Those values summarize an expectation under the chosen Gaussian model; they are not new observations and do not express all uncertainty about a missing quantity.
Using them in a later ordinary complete-data analysis can understate uncertainty if the conditional covariance and model estimation are ignored. This page does not generate random multiple imputations, pool inferential estimates or attach standard errors to imputed entries.
Missingness assumptions cannot be diagnosed by EM alone
The observed-likelihood approach needs a defensible model and an ignorable observation mechanism, typically discussed through missing-at-random conditions with appropriate parameter assumptions. The numeric algorithm cannot prove those design conditions from the partially observed table.
Non-Gaussian shapes, systematic unobserved selection or dependent subjects may require a different analysis. Use the fitted likelihood and conditional completion for transparent exploration, while preserving missingness indicators and documenting why the statistical assumptions are plausible for the applied problem.
A few questions, answered
Why must I use ? rather than zero?
Zero is treated as an observed value; ? marks an entry whose likelihood is marginalized.
Is covariance computed from the completed means alone?
No. The E-step also includes conditional covariance in the expected second moments.
Are imputed entries new measurements?
No. They are conditional means under the fitted Gaussian model and retain uncertainty.
Does EM prove data are missing at random?
No. Ignorability and missingness assumptions require a design-based justification outside the optimization.