The marks in history and mathematics of twelve students in a public examination are given below. Calculate a coefficient of correlation by ranks.
Student | A | B | C | D | E | F | G | H | I | J | K | L |
History | 69 | 36 | 39 | 71 | 67 | 76 | 40 | 20 | 85 | 65 | 55 | 34 |
Mathematics | 33 | 52 | 71 | 25 | 79 | 22 | 83 | 81 | 24 | 35 | 46 | 64 |
Students |
History (H) |
Mathematics(M) |
Rank (H) |
Rank(M) |
|d| |
d2 |
A B C D E F G H I J K L |
69 36 39 71 67 76 40 20 85 65 55 34
|
33 52 71 25 79 22 83 81 24 35 46 64 |
4 10 9 3 5 2 8 12 1 6 7 11 |
9 6 4 10 3 12 1 2 11 8 7 5 |
5 4 5 7 2 10 7 10 10 2 0 6
|
25 6 25 49 4 100 49 100 100 4 0 36
|
n=12,∑d2=508
r=1−6∑d2n(n2−1)=1−6×50812(122−1)=1−30481716=−0.77