I have to calculate many correlations with mostly ordinal variables and I use Kendall's tau for this. In some cases there is one binary and one ordinal variable and in some cases there are two binary variables. Can I use Kendall's tau for the last case, too? I know I could use other methods for this but I think it would be more consistent if I use Kendalls's tau all the time. Does this make sense? Here is the result of an example in R:

Data <- data.frame(A = sample(1:2, 30, replace = TRUE))
Data$B <- as.numeric((Data$A*0.9 + rnorm(30)) > 2)
table(Data$A, Data$B)
> cor.test(Data$A, Data$B, method = "kendall", alternative = "greater")

    Kendall's rank correlation tau

data:  Data$A and Data$B
z = 1.6267, p-value = 0.0519
alternative hypothesis: true tau is greater than 0
sample estimates:


1 Answer 1


Yes, you can use Kendall's tau (-b) for two binary variables. The result should be similar to determining the correlation with phi.

The following is an example in R.



  ### remove set.seed for different samples

A = rep(c("A","B"),1,each=100)

X = factor(sample(A, 20))
Y = factor(sample(A, 20))

Table = xtabs(~X+Y)


   ###        Y
   ### X   A B
   ###   A 8 5
   ###   B 4 3


phi(Table, digits=4)

   ### 0.0428

cor(x=as.numeric(X), y=as.numeric(Y), method="kendall")

   ### 0.04279605
  • $\begingroup$ Thank you very much! $\endgroup$
    – TobiSonne
    Commented Dec 29, 2019 at 22:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.