To define the covariance mathematically, we can write
From this equation it is apparent that the covariance is similar in form to the variance.
If we changed all the Ys in the equation to Xs, we would have ; if we changed the Xs to
Ys, we would have.
For the data on Stress and lnSymptoms we would expect that high stress scores will be
paired with high symptom scores. Thus, for a stressed participant with many problems,
both (X 2 ) and (Y 2 ) will be positive and their product will be positive. For a partici-
pant experiencing little stress and few problems, both (X 2 ) and (Y 2 ) will be nega-
tive, but their product will again be positive. Thus, the sum of (X 2 )(Y 2 ) will be large
and positive, giving us a large positive covariance.
The reverse would be expected in the case of a strong negative relationship. Here, large
positive values of (X 2 ) most likely will be paired with large negative values of (Y 2 ),
and vice versa. Thus, the sum of products of the deviations will be large and negative, indi-
cating a strong negative relationship.
Finally, consider a situation in which there is no relationship between Xand Y. In this
case, a positive value of (X 2 ) will sometimes be paired with a positive value and some-
times with a negative value of (Y 2 ). The result is that the products of the deviations will
be positive about half of the time and negative about half of the time, producing a near-zero
sum and indicating no relationship between the variables.
For a given set of data, it is possible to show that will be at its positive maximum
whenever Xand Yare perfectly positively correlated (r 5 1.00), and at its negative maxi-
mum whenever they are perfectly negatively correlated (r 52 1.00). When the two variables
are perfectly uncorrelated (r 5 0.00) covXYwill be zero.
covXY
Y
X
X Y
X Y
X Y
X Y
s^2 Y
s^2 X
covXY=
g(X 2 X)(Y 2 Y)
N 21
Section 9.3 The Covariance 251
Table 9.2 Data on stress and symptoms for 10 representative
participants
Participant Stress (X) Symptoms (Y)
1 30 4.60
2 27 4.54
3 9 4.38
4 20 4.25
5 3 4.61
6 15 4.69
7 5 4.13
8 10 4.39
9 23 4.30
10 34 4.80
oo o
N= 107
gXY=10353.66
sX=12.492 sY=0.202
X=21.290 Y=4.483
gX^2 =65,038 gY^2 =2154.635
gX= 2278 gY=479.668