Kendall’s tau
Association and correlation · reference distribution: N(0, 1) approx.
When to use it
Measure the agreement in order between two variables, counting concordant and discordant pairs.
Null hypothesis
There is no association: τ = 0.
Assumptions
- At least ordinal variables
Test statistic
\tau_a = \dfrac{C - D}{\binom{n}{2}}Effect size
τ itself.
How to report it
τ = .33, n = 30, p = .010
In R and Python
R
cor.test(x, y, method = "kendall")
Python
stats.kendalltau(x, y)
In Python, stats is scipy.stats and np is numpy.
Variants and alternatives
- Tau-b, which corrects for ties in the denominator and is what most software computes
Where it sits in the catalog
Association and correlation. Instead of comparing groups, they measure whether two variables move together, and how strongly.
In the decision tree
- What do you want to do? Measure the relationship between two variables
- What kind of variables are they? Both numeric
- Is the relationship linear, without strong extreme values? No, or the variables are ordinal
- Is the sample small, or does it have many ties? Yes