Measures whether two rankings move together by counting pairs. For every pair of points, the pair is concordant if x and y order the same way and discordant if they order oppositely; the difference is divided by the number of pairs. It stands up to outliers better than Spearman.
This measures whether two rankings move together by counting pairs. For every pair of points, the pair is concordant if and order the same way, and discordant if they order oppositely.
is the number of concordant pairs, the discordant ones, and the denominator is the total number of pairs. All concordant gives 1, all discordant , and an even split 0.
With running 1 to 8 and at 2, 1, 4, 3, 6, 5, 8, 7, neighbouring values are swapped in four places. Of the 28 pairs, 4 are discordant and 24 concordant, giving .
Both work from ranks, but they measure different things. Spearman squares the differences between the ranks themselves, while Kendall counts the share of pairs whose order is reversed. That makes Kendall easier to interpret directly and even more resistant to outliers. On the same data, Kendall usually comes out closer to 0.
Repeated values leave a pair neither concordant nor discordant. The version used here, , reduces the total number of pairs to account for them.
The p-value comes from a normal approximation, so treat it as a guide in small samples.