Kendall Rank Correlation (τ)

Check how well the order of two variables agrees with Kendall's τ. Every pair of observations is compared, and the difference between pairs in the same order and pairs in opposite order measures the correlation - stable for small samples and intuitive to read.

1Data Table

Paste a table copied from Excel into a cell (Ctrl+V). Click a column header (A, B…) before pasting to use the first line as column names. Double-click a header to rename it, right-click to insert/delete rows and columns, and formulas such as =A1*2 work too.

2Kendall Rank Correlation Options

How to calculate Kendall's tau

  1. Copy the two columns to compare (for example the scores or ranks given by two raters) together with the header.
  2. Select the two columns whose order to compare, such as rater A as Variable X and rater B as Variable Y.
  3. Press Analyze and check τ, the p-value and the interpretation in the statistics panel.

Worked example with sample data

The sample data are the scores given to 12 prototypes by rater A and rater B (no tied scores within a rater).

Kendall rank correlation of the scores of raters A and B (scatter plot, trendline, τ, p-value)
Kendall rank correlation of the scores of raters A and B (scatter plot, trendline, τ, p-value)

Comparing the 66 pairs of prototypes, 52 pairs are in the same order for both raters and 14 in opposite order, so τ = (52 - 14) / 66 = 0.5758. With no ties and 12 values, the p-value of 0.008758 comes from the exact permutation distribution; it is below 0.05, so the two raters agree more than chance would explain.

The Spearman ρ of the same data is 0.7273, larger than τ. The two coefficients are defined differently and τ is usually smaller, so do not judge τ on the same numeric scale as ρ or r.

A τ below 1 means some prototypes are ranked differently by the two raters. Look for points far from the trendline on the scatter plot (for example 60 points from A but 72 from B) and check whether the raters use different criteria.

How it is calculated

For every pair of observations, the pair is concordant if X and Y are in the same order and discordant if they are in opposite order. τ-b = (concordant - discordant) / √((all pairs - pairs tied in X)(all pairs - pairs tied in Y)), which stays within -1 to 1 even with ties.

As in SciPy's kendalltau, the p-value uses the exact permutation distribution when there are no ties and 33 or fewer values, and otherwise a normal approximation corrected for ties.

When to use it

It is used to see how well the rankings given by two raters (or two test methods) agree, or to study two variables with a small sample of about 10-20 values.

How to read Kendall's τ

  • On the same data τ is usually smaller than Spearman's ρ (example: τ=0.5758, ρ=0.7273). Judge the strength with the same cut-offs (0.1, 0.3, 0.5, 0.7).
  • τ can be read as 'probability that two randomly chosen observations are in the same order minus probability that they are in opposite order'. τ=0.5758 means concordant pairs outnumber discordant pairs by about 58 percentage points.
  • A p-value below 0.05 means the two orders agree more than chance would explain.

Frequently asked questions

Is it tau-a or tau-b?

It is tau-b, which corrects for ties. Without ties it equals tau-a.

Does it get slow with a lot of data?

Every pair is compared, so thousands of rows may take a moment, but it still finishes in your browser.

What if there are many ties?

Ties are corrected in the denominator of tau-b and the p-value uses a tie-corrected normal approximation. With very many ties, such as 1-5 point scales, τ can hardly reach 1.

Other chart tools