From k-means to a mixture
The topic Clustering ended with k-means and its two blind spots. Every point goes to exactly one cluster, and nothing says how sure that assignment is. And the objective counts plain distances, so k-means behaves as if every cluster were a round ball of the same width. This topic turns clustering into a probability model and fits it by maximum likelihood.
A Gaussian mixture describes the data by a two-step story. First pick a component with probabilities . Then draw from that component's Gaussian:
Here is the number of components, the clusters of the previous topic. The weights satisfy and . Each component has its own mean and covariance , and collects all the parameters. The second argument of is a covariance, a variance in one dimension.
The component is a latent variable: the model uses it, the data never show it. So the density of alone sums the joint over , by the law of total probability:
Each component is a multivariate Gaussian with elliptical contours set by (the topic The multivariate Gaussian in Probability Theory). So a cluster may be tilted, elongated, small or wide, and each has its own weight.
Example. In one dimension take , and standard deviations and . At the component densities are and , so