Density Estimation and �Gaussian Mixture Models
Lecture 5
Introducing Maximum Likelihood Estimation, and Gaussian Mixture Models
EECS 189/289, Fall 2025 @ UC Berkeley
Joseph E. Gonzalez and Narges Norouzi
EECS 189/289, Fall 2025 @ UC Berkeley
Joseph E. Gonzalez and Narges Norouzi
Join at slido.com�#1924089
The Slido app must be installed on every computer you’re presenting from
Do not edit�How to change the design
1924089
In The Last Lecture We…
Listening!
Should these points be red or blue�or both?
1924089
Roadmap
Questions
1924089
Expectation and Variance
Questions
1924089
Expectations
1924089
Functions of Random Variables
1924089
Linearity of Expectation
1924089
Variance
1924089
Covariance
1924089
Probability Density Functions
1924089
Density Estimation
Questions
1924089
Density Estimation
1924089
Estimating the Parameters of a Distribution
1924089
The Likelihood Function
Independent
Identically
1924089
The Log Likelihood Function
1924089
Maximum Likelihood Estimation
1924089
Modeling: Bernoulli Distribution
1924089
The MLE for IID Bernoulli Samples (Part 1)
1924089
The MLE for IID Bernoulli Samples (Part 2)
Left as an exercise �(for your favorite AI).
1924089
The MLE for IID Bernoulli Samples (Part 3)
1924089
How can we mathematically formulate the problem of next-token prediction as a Maximum Likelihood Estimation (MLE) problem?
The Slido app must be installed on every computer you’re presenting from
Do not edit�How to change the design
1924089
The MLE for ChatGPT
1924089
Normal (Gaussian) Distribution
1924089
The MLE for IID Gaussian Samples (Part 1)
1924089
The MLE for IID Gaussian Samples (Part 2)
1924089
The MLE for IID Gaussian Samples (Part 2)
1924089
Recap of the MLE for IID Gaussian Samples
Sufficient Statistics
1924089
Bias
Questions
1924089
Bias of an Estimate
1924089
Bias of the MLE for the Gaussian Distribution
Unbiased
Variance Identity
1924089
Bias of the MLE for the Gaussian Distribution
Biased
Unbiased
Sample Mean Variance
Variance Identity
1924089
How do we derive the formula for an unbiased estimator of the Gaussian variance?
The Slido app must be installed on every computer you’re presenting from
Do not edit�How to change the design
1924089
Multivariate Normal
Questions
1924089
Multivariate Gaussian Distribution
1924089
Demo
Gaussians
1924089
Gaussian Mixture Models
Questions
1924089
Gaussian Mixture Model (GMM)
1924089
Gaussian Mixture Model (GMM)
1924089
Demo
Gaussian Mixture Model
1924089
The GMM is a Latent Variable Model
1924089
The GMM is a Generative Model
1924089
Demo
Sampling from a GMM
1924089
Latent Variable Posteriors
Should these points be red or blue�or both?
1924089
Estimating the GMM Parameters
1924089
Quick Recap
If we knew the model parameters, we could easily compute the cluster assignments.
If we knew the cluster assignments, we could easily estimate the model parameters.
How can we solve this cyclic dependency?
Model Parameters
Cluster Assignments
1924089
The EM Algorithm
Easy to optimize joint probability
Current distribution �over the latent Z
Updates distribution over Z.
1924089
The EM Algorithm: E-step
N
K
1924089
Lagrangian for the �normalization constraint
1924089
1924089
1924089
The EM Algorithm for GMMs
1924089
Demo
Implement GMMs
1924089
Density Estimation and �Gaussian Mixture Models
Lecture 5
Credit: Joseph E. Gonzalez and Narges Norouzi
Reference Book Chapters: