How we change what others think, feel, believe and do

# Covariance

Explanations > Social ResearchStatistical principles > Covariance

## Description

Deviation of a variable in a sample is its value minus the sample mean (x-bar).

dev(x) = x - x-bar

Covariance is a measure of how much the deviations of a pair of variables match.

cov(x,y) = SUM( (x - x-bar)*(y - y-bar) )

A higher number for covariance indicates strong matching. A negative number indicates weak matching.

## Example

In the first table below, x and y go up and down together. In the second table, they are a lot less similar.

 x y x-xbar y-y-bar (x-xbar)* (y-ybar) 2 1 -2.57 -3.86 9.92 5 6 0.43 1.14 0.49 4 3 -0.57 -1.86 1.06 3 1 -1.57 -3.86 6.06 5 8 0.43 3.14 1.35 6 9 1.43 4.14 5.92 7 6 2.43 1.14 2.78 Mean of above (xbar, ybar): Covariance (sum of above): 4.57 4.86 27.57

 x y x-xbar y-y-bar (x-xbar)* (y-ybar) 2 8 -2.57 3.57 -9.18 5 2 0.43 -2.43 -1.04 4 7 -0.57 2.57 -1.47 3 8 -1.57 3.57 -5.61 5 1 0.43 -3.43 -1.47 6 2 1.43 -2.43 -3.47 7 3 2.43 -1.43 -3.47 Mean of above (xbar, ybar) Covariance (sum of above): 4.57 4.43 -25.71

## Discussion

There is no limit to covariance, which makes it difficult to assess given a single calculation. It has more value when several sets of similar figures have their covariances calculated. In this case, the set with the highest figure has the greatest matching.

SPSS: Analyze, Correlate, Bivariate; Options: Cross-product deviations and covariations.