How to Calculate Covariance Sigma

Covariance sigma stands for the set of variances and covariances for the data points of two sets. Statisticians write covariance sigmas as matrices that have variances as the diagonal entries and covariances as the off-diagonal entries. Calculating the covariance sigma seems difficult at first, because the amount of covariances and variances may be unwieldy to calculate one-by-one. Fortunately, you can calculate the covariance sigma in a few easy steps by using matrix analysis methods.

Instructions

    • 1

      Write the data of the two groups for which you wish to find the covariance sigma in the form of column vectors. A column vector lists the data in a single column; thus the number of rows is the number of data points for each group -- the number of data points must be the same for the two groups.

    • 2

      Find the mean for each group. Add the data points of one group and divide by the number of data points. Do the same for the other group.

    • 3

      Subtract the means of each group from the data of that group. In the column vector, subtract the mean belonging to the vector's group from each entry of the vector. Do this for both column vectors.

    • 4

      Transpose one of the column vectors. This means turning the column vector into a row vector, so it is now a single row with many columns.

    • 5

      Multiply the column vector by the transposed vector. The column vector must be the first item in the multiplication to yield a matrix; otherwise you will yield a single value.

    • 6

      Divide every entry in the matrix by the number of data points for one group. The result is the covariance sigma.

Learnify Hub © www.0685.com All Rights Reserved