Variance of Composite Variables

A common operation on data matrices is the summation of two or more variables. An example is summing the responses for each question on a test to obtain the total test score.

Variance of Sums and Differences

 To compute the variance of a sum of variables X + Y

the above binomial is expanded, as

 

The variance of a sum of two variables is defined as the sum of the variances of the variables being summed, plus two times their covariance

Consider the example, presented below. Using the above formula for the variance of the sum and recalling that the covariance between X and Y for the current example equals 4.00, the variance of the sum of the X and Y variables is computed as 9 + 4 + 2(4) = 21.

 

 

 

This result can be computationally verified by subtracting the mean (10) from the variable X + Y to form a vector of deviation scores x + y = [-3 -5 +1 +7]. Summing the squared values of this vector of deviation scores and dividing this sum by the n as 84/4, confirms that the variance of the X + Y variable indeed equals 21.

To compute the variance of the difference of variables X and Y,

 

 

the above binomial can be expanded to an expression

 

 

The variance of a difference between two variables is defined as the sum of the variances of their constituent variables minus twice their covariance, i.e.,

 

 

Consider another example that is presented in Table 9.5. Using the above formula for the variance of a difference and recalling that the covariance between X and Y for the current example equals 4, the variance of the difference of the X and Y variables is computed as 9 + 4 - 2(4) = 5.

 

 

 

This result can be computationally verified by subtracting the mean (-2) from the variable X - Y to form a vector of deviation scores x - y = [1 -1 -3 +3]. Summing the squared values of this vector of deviation scores and dividing this sum by the n as 20/4, confirms that the variance of the X - Y variable indeed equals 5.

Variance of Weighted Variables

A related topic is what happens to a variance of a variable if we add a constant to all of its values.

 

While the mean increases by the value of the added constant, the variance remains unchanged. The same is true if a constant is subtracted from a variable.

 

The mean decreases, but the variance remains constant.

 

What happens to a variance of a variable if we multiply all of its values by a constant?

 

While the mean is multiplied by the constant, the variance is multiplied by the square of the constant.

 

The following table illustrates what happens if a variable is divided by a constant.

 

 

 

The mean is divided by the constant, and the variance is diminished by the square of the constant.

Summary

Covariance, defined as

 

is often used in the course of algebraic derivations of the relationships such as the variance of a sum and the variance of a difference

 

Variance of a Sum

Variance of a Difference

 

 

 

 

 

 

Covariance plays a role in determining variance of weighted or composite variables.