This lesson explains how to use matrix methods to generate a variance-covariance matrix from a matrix of raw data.

Variance

Variance is a proportion of the fluctuation or spread in a lot of information. Scientifically, it is the normal squared deviation from the mean score. We utilize the accompanying equation to figure change.

Var(X) = Σ ( Xi – X )2 / N = Σ xi2 / N

where

N is the number of scores in a set of scores

X is the mean of the N scores.

Xi is the ith raw score in the set of scores

xi is the ith deviation score in the set of scores

Var(X) is the variance of all the scores in the set

Covariance

Covariance is a proportion of the degree to which comparing components from two arrangements of requested information move a similar way. We utilize the accompanying equation to process covariance.

Cov(X, Y) = Σ ( Xi – X ) ( Yi – Y ) / N = Σ xiyi / N

where

N is the number of scores in each set of data

X is the mean of the N scores in the first data set

Xi is the ithe raw score in the first set of scores

xi is the ith deviation score in the first set of scores

Y is the mean of the N scores in the second data set

Yi is the ithe raw score in the second set of scores

yi is the ith deviation score in the second set of scores

Cov(X, Y) is the covariance of corresponding scores in the two sets of data

Variance-Covariance Matrix

Variance and covariance are regularly shown together in a difference covariance lattice, (otherwise known as, a covariance grid). The changes show up along the corner to corner and covariances show up in the off-slanting components, as demonstrated as follows

V = | Σ x_{1}^{2} / N Σ x_{1} x_{2} / N . . . Σ x_{1} x_{c} / NΣ x_{2} x_{1} / N Σ x_{2}^{2} / N . . . Σ x_{2} x_{c} / N. . . . . . . . . . . .Σ x_{c} x_{1} / N Σ x_{c} x_{2} / N . . . Σ x_{c}^{2} / N |

where

V is a c x c variance-covariance matrix

N is the number of scores in each of the c data sets

xi is a deviation score from the ith data set

Σ xi2 / N is the variance of elements from the ith data set

Σ xi xj / N is the covariance for elements from the ith and jth data sets

How to Create a Variance-Covariance Matrix

Assume X is a n x k lattice holding requested arrangements of crude information. For instance, framework X may show the scores on k tests for n understudies, as appeared in Issue 1.

Beginning with the crude information of grid X, you can make a difference covariance lattice to show the change inside every segment and the covariance between segments. Here’s the secret.

Transform the raw scores from matrix X into deviation scores for matrix x.

x = X – 11’X ( 1 / n )

where

1 is an n x 1 column vector of ones

x is an n x k matrix of deviation scores: x11, x12, . . . , xnk

X is an n x k matrix of raw scores: X11, X12, . . . , Xnk

Process x’x, the k x k deviation wholes of squares and cross items grid for x.

At that point, partition each term in the deviation wholes of squares and cross item grid by n to make the difference covariance network. That is,

V = x’x ( 1/n )

where

V is a k x k fluctuation covariance grid

x’x is the deviation totals of squares and cross item grid

n is the quantity of scores in every section of the first grid X

In the next section, read Problem 1 for an example showing how to turn raw data into a variance-covariance matrix.