Siilats Robots
Expectation-maximization lessons

Expectation-Maximization in Excel: Generate Two Gaussian Classes

Set up a two-class Gaussian example in Excel for the expectation-maximization lessons. The screen share chooses feature means for the red and blue groups, generates sample values, and makes the feature values depend on the assigned class.

Watch the original lessonExpectation-maximization workbook

Screen times follow the original lesson. Edited YouTube versions may run shorter.

At 0:00 in the original

Lay out each observation

Use one row per sample and reserve separate cells for the two feature coordinates and the latent class.

Screen recording at 0:00
Screen at 0:00
At 1:55 in the original

Choose class means

Put the two centers in a parameter block. A common coordinate scale makes their separation easier to interpret.

Screen recording at 1:55
Screen at 1:55
At 3:50 in the original

Generate samples

Generate noise around the center selected by the class indicator. Keep the true class for checking results after fitting.

Screen recording at 3:50
Screen at 3:50
At 9:35 in the original

Separate data from labels

Use the class only to generate the synthetic dataset. A mixture model is fitted to the coordinates without access to those labels.

Screen recording at 9:35
Screen at 9:35