PhysSandbox
Classical MechanicsWaves & SoundElectricity & MagnetismOptics & LightGravity & OrbitsLabs
🌙Astronomy & The Sky🌡️Thermodynamics🌍Biophysics, Fluids & Geoscience📐Math Visualization🔧Engineering🧪Chemistry

Related simulators

Continue with similar topics in this category — or all 85 in Math Visualization.

View category →
NewUniversity / research

PCA / SVD Geometry

Launch Simulator

Covariance ellipse and SVD view of dimensionality reduction: principal components, explained variance, and rank-1 reconstruction error.

NewUniversity / research

Kalman Filter 2D Tracking

Launch Simulator

4-state constant-velocity tracker: noisy (x,y) measurements, process acceleration noise Q, measurement variance R, and a live ≈2σ covariance ellipse.

NewSchool

K-Means Clustering (Lloyd)

Launch Simulator

Click to add points, choose k, randomize centroids, then step Lloyd iterations (assign to nearest centroid, update means). Optional Gaussian-mixture demo; watch within-cluster SSE decrease.

NewUniversity / research

Runge–Kutta Stability Regions

Launch Simulator

Absolute-stability regions in the z = hλ plane for explicit Euler, RK2, and RK4; move λ and h, compare |R(z)|, and see why stiff modes constrain explicit time steps.

NewUniversity / research

LMS / NLMS Adaptive Noise Cancellation

Launch Simulator

Primary p = s + v with v a fixed unknown FIR of Gaussian reference x[n]. Watch an L-tap FIR adapt by LMS or NLMS so error e = p − wᵀx → s; running MSE and ‖w − h‖.

NewSchool

Random Walk

Launch Simulator

1D or 2D steps; trail and running mean ⟨r²⟩ vs diffusion intuition.

PhysSandbox

Interactive physics, chemistry, and engineering simulators for students, teachers, and curious minds.

Physics

  • Classical Mechanics
  • Waves & Sound
  • Electricity & Magnetism

Science

  • Optics & Light
  • Gravity & Orbits
  • Astronomy & The Sky

More

  • Thermodynamics
  • Biophysics, Fluids & Geoscience
  • Math Visualization
  • Engineering
  • Chemistry

© 2026 PhysSandbox. Free interactive science simulators.

PrivacyTermsContact
Home/Math Visualization/Gaussian Mixture EM Algorithm

Gaussian Mixture EM Algorithm

Expectation-maximization for a two-component Gaussian mixture: responsibilities, E/M steps, likelihood, and covariance ellipses.

EM settings

8
2.2

Measured values

Log likelihood-144.53
Weight 10.500
Weight 20.500

EM alternates soft assignment and parameter refits; likelihood should not decrease in the exact algorithm.

Live graphs

About this model

The EM algorithm fits latent-variable models by alternating soft assignment and parameter re-estimation. For a Gaussian mixture, the E-step computes responsibilities for each component and the M-step updates weights, means, and covariance scale. The simulator shows responsibilities as point colors, component ellipses, and log-likelihood improvement.

Who it's for: Statistics, machine learning, pattern recognition, clustering, probabilistic modeling, and data science courses.

Key terms

  • EM algorithm
  • Gaussian mixture model
  • Responsibility
  • Likelihood
  • Latent variable
  • Covariance ellipse

How it works

Gaussian mixture EM algorithm with responsibilities, covariance ellipses, and likelihood improvement.

Key equations

E-step: γ_ik ∝ π_k N(x_i | μ_k, Σ_k)
M-step: update π_k, μ_k, Σ_k from responsibility-weighted averages

Frequently asked questions

Is EM guaranteed to find the global optimum?
No. EM monotonically improves likelihood for exact steps, but the likelihood surface can have local optima, so initialization matters.
What are responsibilities?
A responsibility is the posterior probability that a component generated a point under the current mixture parameters.