Covariance Matrix Formula
Covariance Matrix is a measure of how much two random variables gets change together. It is actually used for computing the covariance in between every column of data matrix.
The Covariance Matrix is also known as dispersion matrix and variance-covariance matrix. The covariance between two jointly distributed real-valued random variables X and Y with finite second moments is defined as.
Covariance Matrix Formula Solved Examples
Question: Calculation of Covariance Matrix from Data Matrix:
Suppose the data matrix
1 | 2 | -2 | -4 |
2 | 8 | -1 | 2 |
3 | 6 | 0 | 0 |
4 | 4 | 1 | -2 |
5 | 10 | 2 | 4 |
Now the matrix of deviations from the mean is:
Therefore the covariance matrix of the observation is
The diagonal elements of this matrix are the variances of the variables, and the off-diagonal elements are the covariances between the variables.
Comments