EM Algorithm

em-algorithmlatent-variablemixture-modellatent-classmissing-datamaximum-likelihoodexponential-familyitem-response-theory

Definition

The EM (Expectation-Maximization) algorithm is an iterative method for maximum likelihood estimation when data are incomplete or can be treated as incomplete by augmenting the observed data with latent variables. Each iteration alternates between an E-step (compute expected sufficient statistics of the complete data given the observed data and current parameter estimates) and an M-step (maximize the completed-data log-likelihood given those expectations). Formalized in general by Dempster, Laird, and Rubin (1977), anticipated for latent class models by Goodman (1974) and for general exponential families by Sundberg (1974, 1976).

Key Ideas

How It Works

Latent Class Model

Complete data: augment the observed I×J×K×LI\times J\times K\times L table with a latent class dimension, creating XijklvX_{ijklv} for v=1,,mv=1,\ldots,m. The multinomial of XijklvX_{ijklv} is an exponential family with canonical parameters θivA=lnπivAlnπIvA\theta_{iv}^A = \ln\pi_{iv}^A - \ln\pi_{Iv}^A, etc.

E-step: Compute posterior class membership for each observed cell: πijklv=πivAπjvBπkvCπlvDφvvπivAπjvBπkvCπlvDφv\pi^*_{ijklv} = \frac{\pi_{iv}^A\pi_{jv}^B\pi_{kv}^C\pi_{lv}^D\varphi_v}{\sum_{v'}\pi_{iv'}^A\pi_{jv'}^B\pi_{kv'}^C\pi_{lv'}^D\varphi_{v'}} Expected marginals: pivA(n)=jklxijklπijklvp_{iv}^{A(n)} = \sum_{jkl} x_{ijkl}\pi^*_{ijklv}, fv(n)=ijklxijklπijklvf_v^{(n)} = \sum_{ijkl} x_{ijkl}\pi^*_{ijklv}.

M-step: πivApivA(n)/ipivA(n)\pi_{iv}^A \leftarrow p_{iv}^{A(n)} / \sum_i p_{iv}^{A(n)}, φvfv(n)/n\varphi_v \leftarrow f_v^{(n)}/n.

Item Response Theory (Pure Rasch Model)

Complete data: (yi,θi)(y_i, \theta_i) for each person ii, where θi\theta_i is latent ability. Sufficient statistics t1=iθit_1 = \sum_i\theta_i, t2=iθi2t_2 = \sum_i\theta_i^2.

E-step: t1(n)=iE[θiyi]t_1^{(n)} = \sum_i E[\theta_i|y_i], t2(n)=iE[θi2yi]t_2^{(n)} = \sum_i E[\theta_i^2|y_i] via one-dimensional numerical integration.

M-step: μ^θ=t1(n)/n\hat{\mu}_\theta = t_1^{(n)}/n, σ^θ2=t2(n)/nμ^θ2\hat{\sigma}_\theta^2 = t_2^{(n)}/n - \hat{\mu}_\theta^2.

Mixture of Normals

Complete data: (xi,zi)(x_i, z_i) where zi{1,,K}z_i \in \{1,\ldots,K\} is component membership. E-step: rik=pkϕ(xiμk,σk2)/kpkϕ(xiμk,σk2)r_{ik} = p_k\phi(x_i|\mu_k,\sigma_k^2)/\sum_{k'}p_{k'}\phi(x_i|\mu_{k'},\sigma_{k'}^2). M-step: update pk,μk,σk2p_k, \mu_k, \sigma_k^2 from weighted sample moments.

Why It Matters

The EM algorithm transformed inference for latent variable models: ML equations that Lazarsfeld (1950) deemed intractable were shown by Goodman (1974) to have a simple iterative solution. The framework unifies latent class, mixture model, item response, and hidden Markov model estimation under a single computational paradigm. Its monotone convergence property and avoidance of matrix inversion make it a default estimator for high-dimensional mixture problems in statistics and machine learning.

Open Questions

Related