For a mixture of Bernoulli distributions on binary vectors , with , how do you derive the E-step and M-step updates of EM?
Probabilistic models, EM algorithm
Level L3 Intermediate. Length Long. Nature Mat Mathematical.
What's being asked
Whether you can carry the EM recipe through for a discrete mixture: responsibilities, then maximise the expected log-likelihood with a Lagrange multiplier.
Key idea
E-step: . M-step: and , where .
Steps
- Introduce a hidden component label . The expected complete-data log-likelihood is .
- E-step: .
- M-step for : set . This gives , so , the responsibility-weighted mean.
- M-step for : maximise . Then . Summing over gives , so .
- In practice, compute in log space (log-sum-exp), because the product over dimensions underflows. Clip away from 0 and 1 to avoid .
Common mistakes
- Initialising all equally. All components then stay identical (a symmetric saddle point).
- Forgetting that the update needs a Lagrange multiplier for the constraint .
- Computing responsibilities from the product of probabilities directly, which underflows for large .
How long your answer should be
A page. About 6 minutes.
Last checked on 4 December 2026.
Read this
Previous in Probabilistic models: For the linear-Gaussian model with , and with , how do you derive the Kalman filter predict and update equations from the conditioning rule for Gaussians?
Next in Probabilistic models: For Bayesian linear regression with prior and likelihood , how do you derive the posterior by completing the square, and how does its mean relate to ridge regression?