Kendall rank correlation coefficient (often called Kendall’s τ or tau) is a non-parametric test which measures the strength of the relationship between two variables. This test is also used when Pearson product-moment correlation cannot be used because (one of) the assumptions for the test (is) are challenged. It is also an alternative to Spearman’s rho when the sample size is small.

As for Spearman’s rho, Kendall’s tau comes with one main assumption: the monotonicity of the relationship between variables. Check Lærd statistics’ webpage for a tip on monotonic relationships.

Let’s check this with an example. Here we consider the same variables and dataset as we used for Spearman’s rho: the weather records for the last 12 months in Bergen. The variables are rain and temperature, and again we’ll try to see whether there is a form of relationship between these variables.

Normality and equal variance are not to be check here, so let’s draw directly a scatter plot:

Hard to see any obvious relationship…

Let’s check Kendall’s τ . The function is cor.test(). Note that the function is the same as for Pearson’s r and Spearman’s rho. The extra parameter method=" " defines which correlation coefficient is to be considered in the test (choose between "pearson", "spearman" and "kendall"; if the parameter method is omitted, the default test will be Pearson’s r).

In this test, the null hypothesis H0 states that there is no relationship between the variables.

cor.test(rain, temperature, method="kendall")
## 
##  Kendall's rank correlation tau
## 
## data:  rain and temperature
## T = 27, p-value = 0.459
## alternative hypothesis: true tau is not equal to 0
## sample estimates:
##        tau 
## -0.1818182

Here, there isn’t much surprise: the p-value is largely greater than 0.05, this null hypothesis is accepted.

By curiosity, you can compare the result of this test with Spearman’s rho. There is a very slight difference between the two coefficients (after all, these are two different calculations…) but the conclusion is the same in the present case.