In statistics, the Kendall rank correlation coefficient, commonly referred to as Kendall's τ coefficient (after the Greek letter τ, tau), is a statistic used to measure the ordinal association between two measured quantities. A τ test is a non-parametric hypothesis test for statistical dependence based on the τ coefficient. It is a measure of rank correlation: the similarity of the orderings of the data when ranked by each of the quantities. It is named after Maurice Kendall, who developed it in 1938, though Gustav Fechner had proposed a similar measure in the context of time series in 1897. Intuitively, the Kendall correlation between two variables will be high when observations have a similar or identical rank (i.e. relative position label of the observations within the variable: 1st, 2nd, 3rd, etc.) between the two variables, and low when observations have a dissimilar or fully reversed rank between the two variables. Both Kendall's τ {\displaystyle \tau } and Spearman's ρ {\displaystyle \rho } can be formulated as special cases of a more general correlation coefficient. Its notions of concordance and discordance also appear in other areas of statistics, like the Rand index in cluster analysis.
Definition
Let ( x 1 , y 1 ) , . . . , ( x n , y n ) {\displaystyle (x_{1},y_{1}),...,(x_{n},y_{n})} be a set of observations of the joint random variables X and Y, such that all the values of ( x i {\displaystyle x_{i}} ) and ( y i {\displaystyle y_{i}} ) are unique. (See the section Accounting for ties for ways of handling non-unique values.) Any pair of observations ( x i , y i ) {\displaystyle (x_{i},y_{i})} and ( x j , y j ) {\displaystyle (x_{j},y_{j})} , where i < j {\displaystyle i<j} , are said to be concordant if the sort order of ( x i , x j ) {\displaystyle (x_{i},x_{j})} and ( y i , y j ) {\displaystyle (y_{i},y_{j})} agrees: that is, if either both x i > x j {\displaystyle x_{i}>x_{j}} and y i > y j {\displaystyle y_{i}>y_{j}} holds or both x i < x j {\displaystyle x_{i}<x_{j}} and y i < y j {\displaystyle y_{i}<y_{j}} ; otherwise they are said to be discordant. In the absence of ties, the Kendall τ coefficient is defined as:
τ = ( number of concordant pairs ) − ( number of discordant pairs ) ( number of pairs ) = 1 − 2 ( number of discordant pairs ) ( n 2 ) . {\displaystyle \tau ={\frac {({\text{number of concordant pairs}})-({\text{number of discordant pairs}})}{({\text{number of pairs}})}}=1-{\frac {2({\text{number of discordant pairs}})}{n \choose 2}}.}
for i < j < n {\displaystyle i<j<n} where ( n 2 ) = n ( n − 1 ) 2 {\displaystyle {n \choose 2}={n(n-1) \over 2}} is the binomial coefficient for the number of ways to choose two items from n items. The number of discordant pairs is equal to the inversion number that permutes the y-sequence into the same order as the x-sequence.
Properties The denominator is the total number of pair combinations, so the coefficient must be in the range −1 ≤ τ ≤ 1.
… excerpt ends here. Continue reading the full article.

