Quant Memo
Advanced

The Wishart Distribution

The probability distribution of a sample covariance matrix itself — not a number, but a whole matrix, treated as a random object with its own spread and bias.

Prerequisites: The Multivariate Normal Distribution, The Chi-Squared Distribution

Every risk model starts by estimating a covariance matrix from a finite history of returns. That estimate is noisy — a different window of the same market would hand you a different matrix. The chi-squared distribution answers "how noisy is a variance estimate?" for one asset. The Wishart distribution answers the same question for an entire covariance matrix at once, off-diagonal correlations included.

The analogy: a bag of noisy rulers, all correlated

Imagine measuring the lengths and widths of many bricks from the same batch, then asking not "how uncertain is the average length?" but "how uncertain is the whole length-width relationship?" A single chi-squared variable tracks the wobble in one ruler. The Wishart distribution tracks the wobble in the entire measuring apparatus — every length, every width, and every length-width correlation — as one correlated random object.

Building it from what you already know

Take nn independent draws x1,,xnx_1, \dots, x_n, each a pp-dimensional vector from a multivariate normal with mean zero and true covariance Σ\Sigma (sigma, the population covariance matrix). Stack their outer products:

W=i=1nxixi.W = \sum_{i=1}^{n} x_i x_i^\top .

In words: for each draw, multiply the vector by its own transpose to get a p×pp \times p matrix, then add up nn of these matrices. The random matrix WW follows a Wishart distribution, written WWp(Σ,n)W \sim \mathcal{W}_p(\Sigma, n), where pp is the dimension, nn the degrees of freedom, and Σ\Sigma the scale matrix it fluctuates around. When p=1p = 1 this collapses to σ2\sigma^2 times a chi-squared variable with nn degrees of freedom — the familiar case scaled up to matrices.

The sample covariance matrix used everywhere in risk management is just W/nW / n: a Wishart-distributed object, rescaled. Its expected value is Σ\Sigma, so the estimator is unbiased on average, but any single draw of W/nW/n wobbles around Σ\Sigma — more so with fewer data points nn or more assets pp.

Matrix explorer
dashed = before · solid = after
det 1.25trace 2.50λ 1.81, 0.69area scales by 1.25×

Drag the matrix entries above to see how a covariance matrix stretches a circle of returns into an ellipse — its axes are the eigenvectors, its lengths the eigenvalues. A Wishart-distributed sample covariance is a random version of that same ellipse: rerun the estimation on a new window of data and the ellipse tilts and stretches slightly differently each time, even though every window came from the same underlying Σ\Sigma.

Worked example 1: two assets, ten observations

Suppose two assets are truly uncorrelated, each with variance 1, so Σ\Sigma is the 2x2 identity matrix, and you estimate the covariance matrix from n=10n = 10 daily returns. The diagonal entries of WW are each chi-squared with 10 degrees of freedom, which has mean 10 and standard deviation 204.47\sqrt{20} \approx 4.47. Dividing by n=10n = 10 to get the sample variance, the standard deviation of that estimate is 4.47/100.4474.47 / 10 \approx 0.447 — nearly half the true value of 1. A "variance of 1" estimated from ten days routinely reads anywhere from about 0.6 to 1.4 just from sampling noise, with no real change in the market at all.

Worked example 2: why more assets makes it worse

Now estimate a p=50p = 50 asset covariance matrix from n=60n = 60 daily returns — a common real-world ratio. The matrix has p(p+1)/2=1,275p(p+1)/2 = 1{,}275 distinct entries to pin down from only 60 data points. The Marchenko-Pastur result for this regime (see Random Matrix Theory in Finance) says that when p/np/n is close to 1, the smallest eigenvalues of the sample covariance matrix are pushed toward zero and the largest are inflated, purely from estimation noise, even though Σ\Sigma itself might have no such spread. A portfolio optimizer handed this matrix will chase the artificially small eigenvalues — betting heavily on combinations of assets that look risk-free only because the matrix hasn't seen enough data to know better.

true Sigma (dashed) vs. three Wishart-distributed sample estimates
Three different windows of data from the exact same true covariance Sigma produce three visibly different sample-covariance ellipses — that spread in shape, not just in one number, is what the Wishart distribution quantifies.

What this means in practice

  • Shrinkage estimators (Ledoit-Wolf and similar) exist precisely because the raw Wishart-distributed sample covariance is too noisy off the diagonal to invert safely — they pull it toward a more stable target.
  • Portfolio optimization is only as good as the covariance matrix behind it; an under-sampled Wishart draw produces confidently wrong optimal weights.
  • Likelihood-ratio tests on covariance matrices (equal-covariance tests, factor-model fit tests) use the Wishart distribution's known density directly.

A sample covariance matrix is not "the" covariance matrix — it is one random draw from a Wishart distribution centered on the truth. The fewer observations per parameter, the wider that distribution, and the more a portfolio built on it is fitting noise.

The common mistake is treating pp small relative to nn as automatically "enough data." What matters is the ratio p/np/n: 60 observations is plenty for 3 assets but dangerously thin for 50. When pp approaches nn, the largest and smallest eigenvalues of the sample matrix are systematically distorted, not just noisy — a bias that shrinkage or a factor structure has to correct, since more raw data alone only fixes the noise, not the shape of the distortion.

Related concepts

Practice in interviews

Further reading

  • Muirhead, Aspects of Multivariate Statistical Theory (ch. 3)
  • Anderson, An Introduction to Multivariate Statistical Analysis (ch. 7)
ShareTwitterLinkedIn