Skip to content

Economics · Ch 6 — Correlation

Calculation Of Rank Correlation Coefficient

6.3.6

Calculation Of Rank Correlation Coefficient

The rank correlation coefficient is computed under three situations: (1) the ranks are already given, (2) the ranks must be worked out from the data, and (3) some ranks are repeated.

Case 1 — ranks are given (Example 3). Five competitors in a beauty contest are ranked by three judges A, B and C; we find which pair of judges agrees most. Rank correlation is computed for each of the three pairs using rs=1−6∑D2n3−nr_s = 1 - \dfrac{6\sum D^2}{n^3 - n} with n=5n = 5.

For judges A and B, the differences in ranks give ∑D2=14\sum D^2 = 14:

rs=1−6×1453−5=1−84120=1−0.7=0.3r_s = 1 - \frac{6 \times 14}{5^3 - 5} = 1 - \frac{84}{120} = 1 - 0.7 = 0.3

For A and C, ∑D2=10\sum D^2 = 10, giving rs=1−60120=0.5r_s = 1 - \dfrac{60}{120} = 0.5. For B and C it works out to 0.90.9. So judges A and C are the closest in taste, while B and C differ the most.

Case 2 — ranks not given (Example 4). Five students' marks in Statistics (X) and Economics (Y) are given. Each variable is first ranked (highest mark = rank 1), producing pairs of ranks RXR_X and RYR_Y; formula (4) is then applied exactly as in Case 1.

Case 3 — ranks repeated (Example 5). When items tie, each tied item gets the average of the ranks they would occupy. In the example Y takes the value 50 at the 9th, 10th and 11th positions, so all three receive the average rank 10. With repeated ranks a correction factor is added for every group of ties, and the formula becomes

rs=1−6[∑D2+m13−m112+m23−m212+… ]n3−nr_s = 1 - \frac{6\left[\sum D^2 + \dfrac{m_1^3 - m_1}{12} + \dfrac{m_2^3 - m_2}{12} + \dots\right]}{n^3 - n}

where m1,m2,…m_1, m_2, \dots are the sizes of the tied groups. For this data (n=12n = 12, ∑D2=198\sum D^2 = 198) the correction from the ties works out to

33−312+23−212=24+612=2.5\frac{3^3 - 3}{12} + \frac{2^3 - 2}{12} = \frac{24 + 6}{12} = 2.5

so that

rs=1−6(198+2.5)123−12=1−12031716=1−0.70=0.30r_s = 1 - \frac{6(198 + 2.5)}{12^3 - 12} = 1 - \frac{1203}{1716} = 1 - 0.70 = 0.30

Thus X and Y show a positive rank correlation — they move in the same direction — but the relationship is not strong.

Think About It

Activity

…