In: Statistics and Probability
Calculate the correlation coefficient for the following data:
X=0, -1, -2, -3, -2, -2, 0, 1, 2, 3, 2, 1
Y=3, 2, 1, 0, -1, -2, -3, -2, -1, 0, 1, 2
Find through Excel.
Correlation coefficients are used in statistics to measure how strong a relationship is between two variables. There are several types of correlation coefficient: Pearson’s correlation (also called Pearson’s R) is a correlation coefficient commonly used in linear regression.
Formula for Pearson's correlation coefficient is given by
X | Y | XY | X2 | Y2 | |
0 | 3 | 0 | 0 | 9 | |
-1 | 2 | -2 | 1 | 4 | |
-2 | 1 | -2 | 4 | 1 | |
-3 | 0 | 0 | 9 | 0 | |
-2 | -1 | 2 | 4 | 1 | |
-2 | -2 | 4 | 4 | 4 | |
0 | -3 | 0 | 0 | 9 | |
1 | -2 | -2 | 1 | 4 | |
2 | -1 | -2 | 4 | 1 | |
3 | 0 | 0 | 9 | 0 | |
2 | 1 | 2 | 4 | 1 | |
1 | 2 | 2 | 1 | 4 | |
Sum | -1 | 0 | 2 | 41 | 38 |
Now
In excel, you can use
=CORREL(array1,array2)
Therefore, the correlation coefficient between two variable is 0.05