For observations , the sample mean and empirical covariance matrix describe average location and joint variation:Each summand is an outer product, so is positive semidefinite. If the observations are independent and identically distributed random variables with covariance matrix , then . For , replacing the divisor by gives an unbiased estimator.
For the three observations , the sample mean is . The sum of centered outer products isso the -divisor sample covariance matrix is , and the version is . Stating the divisor avoids ambiguity when comparing formulas. The rank of a centered sample covariance matrix also explains why too few observations force singularity in high dimension.
The uncentered empirical second-moment matrix averages the outer products of the observations. Its expected value is . It is an unbiased estimator of the covariance matrix when the population expected value is known to be zero. It differs from a sample covariance matrix centered at the sample mean.
For observations with , the sample mean is . It is a statistic summarizing location: values give . For an IID sample with mean and finite variance , linearity of expectation gives , while variance additivity for independent random variables gives . Dependence changes the variance through cross-covariances. A sample mean is sensitive to extreme observations, and a population such as the Cauchy distribution need not have the finite mean needed for ordinary averaging guarantees.
For independent samples of sizes from populations with means and finite variances , the difference of their sample means has expected value and variance . This uses independence between and within the samples. With dependent samples, a covariance term is required instead.
Partition a sample into two disjoint groups with fixed positive sizes , and let . The overall sample mean is the weighted meanSubtracting gives the displayed identity. The subgroup and overall sample means share observations, so they are not independent. If the two disjoint groups are sampled independently, thenThus treating the subgroup and the combined sample as two independent samples uses the wrong standard error. Equality of the subgroup and overall population means is equivalent to equality of subgroup and complement means when both groups have positive weight, but the sampling distribution must respect the shared observations.
For independent and identically distributed observations with finite positive variance, the central limit theorem, consistency of the sample variance and Slutsky's theorem give . Under an independent normal distribution sample it instead has the exact finite-sample Student t-distribution with degrees of freedom, as described by the studentized normal sample mean. The asymptotic statement does not require normal individual observations.
For observations , the sample covariance matrix is , or the same sum divided by under the unbiased convention.
If and , then . In particular full column rank of raw does not ensure a nonsingular centered sample covariance matrix. When is singular, its Gaussian precision profile likelihood has no finite maximizer: increase precision along a nonzero null vector.
For paired scalar observations , their sample covariance is , or the same sum divided by under the unbiased convention. It is an off-diagonal entry of the sample covariance matrix of the paired vectors.
For a nonzero positive semidefinite covariance matrix , its covariance effective rank iswhere the operator norm is induced by Euclidean norm and the are the nonnegative eigenvalues. Each nonzero eigenvalue contributes at most one to this ratio, soA scalar multiple of has covariance effective rank , while a matrix with and a unit vector has covariance effective rank one. For , the ratio is , although the ordinary matrix rank is three.
Thus the quantity measures total variance relative to the largest directional variance, rather than merely counting nonzero directions. Multiplying by a positive scalar leaves the ratio unchanged. Its role in the Gaussian sample-covariance operator-norm bound makes it a useful measure of the dimension that matters for covariance estimation. The zero matrix requires a separate convention because the displayed ratio is .
Let be independent centered Gaussian random vectors with common nonzero covariance matrix , and put . There is a universal constant such that for , with probability at least ,where is the effective rank of a covariance matrix.
The bound combines an expected operator norm error with Gaussian concentration inequality. In Euclidean space, the Gaussian effective-dimension parameter in the primary result is comparable to this trace ratio; replacing maxima by sums gives the displayed version.[ref]
Concentration Inequalities and Moment Bounds for Sample Covariance Operators by Vladimir Koltchinskii and Karim Lounici. Definition 1 and discussion of trace effective rank; Corollary 2, equation 2.8
For , the covariance effective rank is , and relative error is controlled by . covariance concentrated in fewer directions can have much smaller covariance effective rank. The estimator here is the uncentered empirical second moment for a known zero mean; an unknown mean and empirical centering require the corresponding formulation. The bound remains meaningful when is singular but nonzero, since it does not invert .
Articles by others on the same topic
Sample mean and covariance are statistical measures that help describe the properties of a dataset. ### Sample Mean The **sample mean** is a measure of central tendency that represents the average of a set of observations. It is calculated by summing all the values in the sample and then dividing by the number of observations in that sample.