Kendall等级相关系数(Kendall tau rank correlation coefficient,肯德尔等级相关系数)
The Kendall tau rank correlation coefficient (or simply the Kendall tau coefficient, Kendall's τ or tau test(s)) is a non-parametric statistic used to measure the degree of correspondence between two rankings and assessing the significance of this correspondence. In other words, it measures the strength of Association of the cross tabulations.
It was developed by Maurice Kendall in 1938.
目录 |
The Kendall tau coefficient (τ) has the following properties:
Kendall tau coefficient is defined
where n is the number of items, and P is the sum, over all the items, of the number of items ranked after the given item by both rankings.
P can also be interpreted as the number of concordant pairs . The denominator in the definition of τ can be interpreted as the total number of pairs of items. So, a high value of P means that most pairs are concordant, indicating that the two rankings are consistent. Note that a tied pair is not regarded as concordant or discordant. If there is a large number of ties, the total number of pairs (in the denominator of the expression of τ) should be adjusted accordingly.
Suppose we rank a group of eight people by height and by weight where person A is tallest and third-heaviest, and so on:
Person | A | B | C | D | E | F | G | H |
---|---|---|---|---|---|---|---|---|
Rank by Height | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
Rank by Weight | 3 | 4 | 1 | 2 | 5 | 7 | 8 | 6 |
We see that there is some correlation between the two rankings but the correlation is far from perfect. We can use the Kendall tau coefficient to objectively measure the degree of correspondence.
Notice in the Weight ranking above that the first entry, 3, has seven other elements to its right (4,1,2,5,7,8,6). How many of these elements are also to the right of 3 in the other ranking?
The elements to the right of 3 in the Height ranking are: 4,5,6,7,8, so the number of elements to the right of 3 in both rankings is 5 (they are 4,5,6,7,8) and so the contribution to P of this entry is 5.
Moving to the second entry, 4, we see that there are six elements to the right of it. Among these elements those that are to the right of 4 also in the other ranking are four (5,6,7,8), so the contribution to P is 4. Continuing this way, we find that
Thus . This result indicates a strong agreement between the rankings, as expected.