Covariance Estimation and Sample Complexity
How many samples are needed to estimate a covariance matrix in operator norm, and what the answer says about the curse of dimensionality.
The question
Let be i.i.d. mean-zero random vectors in with covariance , and let
is unbiased: . The question is how large is, in operator norm, as a function of and .
Operator norm is the right choice because it is what downstream uses need: it controls the error in every quadratic form uniformly over , hence the error in every projection, every eigenvalue (by Weyl's inequality), and every linear predictor.
Suppose are i.i.d., mean zero, with covariance , and that is sub-Gaussian with for all (which holds for Gaussian data with absolute). Then there is an absolute constant such that for every , with probability at least ,
For , if then with probability at least ,
i.e. when .
Key idea
. The sample complexity of covariance estimation is linear in the dimension, not exponential. This is worth emphasising because "curse of dimensionality" is often used as though every high-dimensional problem were exponentially hard. Estimating covariance parameters to fixed relative accuracy in operator norm takes samples — each sample carries numbers, so this is the information-theoretic minimum up to constants.
Heuristic — a reasoning shortcut that predicts the right answer in the regimes discussed here. It is not a proof and can fail outside them.
The phrase covers at least two different phenomena with very different severity, and keeping them apart resolves most confusion:
- Parametric estimation in high dimension. Covariance, linear regression, and any model with effective parameters need samples. Linear in , and manageable.
- Nonparametric estimation in high dimension. Estimating an arbitrary Lipschitz function on to accuracy needs samples. Exponential in , and hopeless beyond small .
-nearest neighbours, kernel smoothing and histogram methods are in the second class, which is why they degrade so sharply — see the nearest neighbours page.
Shrinkage
The theorem above says is accurate when . When it is not, is poorly conditioned (the Marchenko–Pastur spread) and can be improved by biasing it towards a well-conditioned target.
Consider with and . If , then
and there exists strictly reducing the expected squared Frobenius error whenever .
Problems
Sample complexity of covariance estimationNumerical · Intermediate · 30 min Optimal linear shrinkageProof · Advanced · 1 hour Weyl's inequality and eigenvalue perturbationProof · Advanced · 30 min Measure the covariance estimation rateCoding · Intermediate · 1 hourReferences
- BookMartin J. Wainwright (2019). High-Dimensional Statistics: A Non-Asymptotic ViewpointChapter 6 gives covariance estimation in the generality used here, with matching lower bounds.
- PaperRoman Vershynin (2012). How close is the sample covariance matrix to the actual covariance matrix?
- PaperOlivier Ledoit and Michael Wolf (2004). A well-conditioned estimator for large-dimensional covariance matricesThe origin of the linear-shrinkage estimator discussed below.
These works are cited as sources to read, not reproduced. All exposition, examples and problems on this site are written independently; where an argument is standard, the citation points to a canonical treatment.
Results stated on this page
- TheoremOperator-norm rate for sample covariance estimationproof includedFor sub-Gaussian data the sample covariance satisfies an operator-norm error of order sqrt(p/n) + p/n.
- CorollarySample complexity of covariance estimationproof includedAchieving relative operator-norm error epsilon requires order p/epsilon^2 samples.
- PropositionLinear shrinkage strictly improves the sample covarianceproof includedFor any aspect ratio there is a shrinkage intensity whose expected squared error is strictly below that of the unshrunk estimator.
- HeuristicThe curse of dimensionality, stated as an exponentThe number of samples needed grows linearly in the dimension for covariance estimation and exponentially for nonparametric estimation, and conflating the two causes most confusion about the phrase.