A covariance matrix is a square matrix that summarizes how a set of variables vary individually (their variances) and how they move together (their covariances).
Definition
For a random vector \(X = (X_1,\dots,X_n)^\top\), the covariance matrix is:
\[ \Sigma = \operatorname{Cov}(X) \]
with entries:
\[ \Sigma_{ij} = \operatorname{Cov}(X_i, X_j) = E\big[(X_i - E[X_i])(X_j - E[X_j])\big] \]
The diagonal elements \(\Sigma_{ii}\) are variances; off-diagonal elements \(\Sigma_{ij}\) (for \(i\neq j\)) are covariances.
Estimating A Covariance Matrix (From Data)
With data \(x_{t}\) for \(t=1,\dots,T\), a common sample estimator is:
\[ \hat\Sigma_{ij} = \frac{1}{T-1}\sum_{t=1}^T (x_{i,t}-\bar x_i)(x_{j,t}-\bar x_j) \]
Estimation details matter in practice (missing data, outliers, nonstationary time series, and small samples can all distort \(\hat\Sigma\)).
Key Properties
- Symmetry: \(\Sigma_{ij} = \Sigma_{ji}\), so the matrix is symmetric.
- Positive semidefinite: for any weight vector \(w\), \(w^\top\Sigma w \ge 0\). (This corresponds to a variance being nonnegative.)
Why Economists Use It
Two high-value applications:
-
Portfolio risk (finance-adjacent, but widely used): \[ \operatorname{Var}(R_p) = w^\top \Sigma w \] where \(\Sigma\) is the covariance matrix of asset returns and \(w\) are portfolio weights.
-
Econometrics: many standard errors are built from variance-covariance matrices (for example, the variance-covariance matrix of regression coefficient estimates).
Covariance Matrix vs. Correlation Matrix
Covariances are in the original units (so magnitudes depend on scaling). Correlations normalize by standard deviations to lie between -1 and 1.
Related Terms
- Covariance
- Variance
- Standard Deviation
- Correlation Coefficient
- Variance–Covariance Matrix
- Portfolio Theory
- Diversification