In: Math
Here is a bivariate data set.
x | y |
---|---|
50.4 | 96.8 |
53.7 | 27.6 |
-17.6 | 158.6 |
49.9 | -48.1 |
30.5 | -6.1 |
36.7 | 179 |
43.5 | -3.9 |
40.5 | 65.1 |
52.1 | -129.7 |
43.5 | 85.1 |
33.4 | -41.4 |
63.4 | -50 |
25.3 | 31.8 |
41.2 | 11.8 |
34.4 | 149.4 |
50.5 | -50.5 |
Find the correlation coefficient and report it accurate to three
decimal places.
r =
Solution:
Correlation coefficient = r = [n∑xy - ∑x∑y]/sqrt[(n∑x^2 – (∑x)^2)*(n∑y^2 – (∑y)^2)]
The calculation table is given as below:
No. |
x |
y |
x^2 |
y^2 |
xy |
1 |
50.4 |
96.8 |
2540.16 |
9370.24 |
4878.72 |
2 |
53.7 |
27.6 |
2883.69 |
761.76 |
1482.12 |
3 |
-17.6 |
158.6 |
309.76 |
25153.96 |
-2791.36 |
4 |
49.9 |
-48.1 |
2490.01 |
2313.61 |
-2400.19 |
5 |
30.5 |
-6.1 |
930.25 |
37.21 |
-186.05 |
6 |
36.7 |
179 |
1346.89 |
32041 |
6569.3 |
7 |
43.5 |
-3.9 |
1892.25 |
15.21 |
-169.65 |
8 |
40.5 |
65.1 |
1640.25 |
4238.01 |
2636.55 |
9 |
52.1 |
-129.7 |
2714.41 |
16822.09 |
-6757.37 |
10 |
43.5 |
85.1 |
1892.25 |
7242.01 |
3701.85 |
11 |
33.4 |
-41.4 |
1115.56 |
1713.96 |
-1382.76 |
12 |
63.4 |
-50 |
4019.56 |
2500 |
-3170 |
13 |
25.3 |
31.8 |
640.09 |
1011.24 |
804.54 |
14 |
41.2 |
11.8 |
1697.44 |
139.24 |
486.16 |
15 |
34.4 |
149.4 |
1183.36 |
22320.36 |
5139.36 |
16 |
50.5 |
-50.5 |
2550.25 |
2550.25 |
-2550.25 |
Total |
631.4 |
475.5 |
29846.18 |
128230.2 |
6290.97 |
From above table, we have
n = 16
∑x = 631.4
∑y = 475.5
∑x^2 = 29846.18
∑y^2 = 128230.2
∑xy = 6290.97
Correlation coefficient = r = [n∑xy - ∑x∑y]/sqrt[(n∑x^2 – (∑x)^2)*(n∑y^2 – (∑y)^2)]
Correlation coefficient = r = [16*6290.97 - 631.4*475.5]/sqrt[(16*29846.18 – 631.4^2)*(16*128230.2– 475.5^2)]
Correlation coefficient = r = -0.52595
r = -0.526