Siilats Robots
Multivariate Gaussian lessons

Multivariate Gaussian in Excel: Covariance, MMULT and Conditional Distributions

Build a multivariate normal example in Excel using a covariance matrix. The screen share works through the matrix multiplications and determinant in the density formula, then visualizes the result and introduces marginal and conditional distributions.

Watch on Siilats RobotsMultivariate Gaussian workbook

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

At 0:00 in the original

Set up the covariance matrix

Place the feature means beside the data and enter the variances on the diagonal. The off-diagonal entries capture how the features move together.

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

Build the matrix product

Subtract the mean vector from the input, then use MMULT to compute the quadratic form with the inverse covariance. This weights departures by how unusual they are in each direction.

Screen recording at 1:00
Screen at 1:00
At 3:00 in the original

Apply the determinant

The determinant scales the density so it integrates to one. A nearly singular matrix is a sign to inspect redundant features or add regularization.

Screen recording at 3:00
Screen at 3:00
At 6:00 in the original

Read the worksheet chart

Change the covariance and compare the direction and width of the contours. A nonzero off-diagonal term rotates the ellipses.

Screen recording at 6:00
Screen at 6:00
At 9:00 in the original

Distinguish conditional and marginal views

A marginal distribution integrates over the other variable. A conditional distribution holds that variable fixed and rescales the resulting slice.

Screen recording at 9:00
Screen at 9:00