Gaussian Mixture Models
A Gaussian mixture describes data as several bell curves blended together, each with its own centre, width and share of the population. Instead of a hard label it gives every point a probability of belonging to each group.
Prerequisites: The Normal Distribution, Maximum Likelihood Estimation (MLE)
Plot a histogram of a stock's daily returns and you rarely get one clean bell. You get a tall narrow spike around zero with long straggling tails, a shape no single normal curve can match: fit the width to the spike and the tails are impossible, fit the width to the tails and the spike is far too short.
The reason is usually that you are not looking at one population. You are looking at two mixed together. Most days the market is calm and returns are tiny; a minority of days it is stressed and returns are large in either direction. Each regime on its own is roughly bell-shaped. Pooled, they make a shape that no bell can copy.
A Gaussian mixture model takes that story literally. It says the data comes from separate normal distributions, and each observation was drawn from one of them, you just do not get told which.
The model
In words: the chance of seeing a value is a weighted average of bell curves. Component has centre , width , and a mixing weight which is the fraction of the population it accounts for. The weights are all positive and sum to one, so they behave exactly like probabilities of picking that component.
Notice what the mixture bought you: a distribution that is simultaneously more peaked and more fat-tailed than a normal, built entirely out of normals. That is why mixtures are the standard cheap way to model returns without abandoning Gaussian machinery.
A mixture is not an average of curves you then blur together. Each data point comes from exactly one component; you simply do not observe which. Everything a GMM does follows from that one hidden label.
Responsibilities: the soft label
Since the label is hidden, the model reports a probability instead. For point , the responsibility of component is
In words: how much of the total probability of seeing this point came from component . It is Bayes' rule with the mixing weights as the prior. The responsibilities for one point always add to one.
Worked example: which regime was that day?
Fit a two-component mixture to daily returns in percent and suppose it lands on:
- calm: , ,
- stressed: , ,
Today the market fell , so . Evaluate each bell at that point using .
Calm component. The gap is , which is standard deviations. So the exponent is and . The leading constant is , giving a density of . Weighted: .
Stressed component. The gap is , which is only standard deviations. The exponent is , , and the constant is , giving . Weighted: .
Add them for the mixture density, , then divide:
A day is 94% stressed, 6% calm. Run the same arithmetic on a quiet day and the numbers flip: the calm component contributes , the stressed one , and the day comes out 94% calm. The model never says "regime 2" outright; it hands you a number you can act on proportionally.
Fitting, and choosing K
You cannot maximise the likelihood in closed form, because the sum inside the logarithm does not simplify. The standard fix is the The Expectation-Maximization Algorithm: guess parameters, compute responsibilities, then re-estimate each component's mean and variance using those responsibilities as weights, and repeat. Each pass provably does not decrease the likelihood.
is yours to choose. Adding components always improves the fit on the data you fitted, so use a penalised criterion such as BIC, or out-of-sample likelihood, rather than eyeballing the histogram.
Where quants use it
Two-state mixtures are the workhorse of Regime Detection — a calm component and a crisis component, with the responsibility acting as a continuously updated "probability we are in a stress regime" that can scale position size. Mixtures also give a tractable fat-tailed return distribution for Value at Risk (VaR) work, and in multiple dimensions each component carries its own covariance matrix, so a GMM can find clusters that are elongated and tilted rather than round.
A GMM is not k-means with error bars. K-means assigns each point to exactly one cluster and assumes clusters are spherical and equally sized; a GMM gives soft probabilities and lets each component have its own width and shape. Fixing all covariances to be equal and spherical, then taking the highest responsibility as a hard label, is k-means — which is why k-means quietly fails on stretched or unevenly sized clusters.
Related concepts
Practice in interviews
Further reading
- Bishop, Pattern Recognition and Machine Learning, ch. 9
- Hastie, Tibshirani & Friedman, The Elements of Statistical Learning, ch. 6.8