X |
Y |
XY |
X^2 |
Y^2 |
1 |
10 |
10 |
1 |
100 |
1 |
8 |
8 |
1 |
64 |
2 |
4 |
8 |
4 |
16 |
4 |
-2 |
-8 |
16 |
4 |
S1 |
S2 |
S3 |
S4 |
S5 |
8 |
20 |
18 |
22 |
184 |
Correlation coefficient r=(4S3-S1S2)/sqrt((4S4-S1^2)(4S5-S2^2))=
(4*18-8*20)/sqrt(4*22-64)(4*184-400))=
-88/sqrt(24*336)=-88/89.8=-0.98 (the number 4 is the size of the dataset, four pairs of XY elements).
The correlation coefficient is almost -1, which indicates a strong correlation. In this case a negative correlation implies that as X increases, Y decreases.