Kendall's Tau Calculator

Rank correlation with ties.

Example:

Enter paired X and Y values to calculate Kendall's tau

Use Kendall's tau when you want to measure how strongly two variables are related, especially when you have ordinal data (rankings, ratings) or when your data has many tied values. It's more robust than Pearson correlation to outliers and non-normal data, and provides a more interpretable measure of agreement than Spearman's correlation when sample sizes are small.

What Is Kendall's Tau?

Kendall's tau (Ο„) is a rank correlation coefficient that measures the ordinal association between two variables. It counts the proportion of concordant and discordant pairs.

Question answered: "Do higher values of X tend to go with higher (or lower) values of Y?"

Range: -1 to +1

  • Ο„ = +1: Perfect positive association
  • Ο„ = 0: No association
  • Ο„ = -1: Perfect negative association

Why Use Kendall's Tau?

Advantages Over Spearman

  • More intuitive interpretation (based on pair comparisons)
  • Better statistical properties for small samples
  • Handles ties more naturally
  • Confidence intervals are more accurate

When to Use

  • Ordinal data (rankings, Likert scales)
  • Non-normal continuous data
  • When ties are common
  • Small sample sizes
  • Robust alternative to Pearson

How It Works

Concordant and Discordant Pairs

For each pair of observations (i, j):

Concordant: If both X and Y rank in the same direction

  • (Xi>Xj(X_i > X_j and Yi>Yj)Y_i > Y_j) or (Xi<Xj(X_i < X_j and Yi<Yj)Y_i < Y_j)

Discordant: If X and Y rank in opposite directions

  • (Xi>Xj(X_i > X_j and Yi<Yj)Y_i < Y_j) or (Xi<Xj(X_i < X_j and Yi>Yj)Y_i > Y_j)

Tied: If Xi=XjX_i = X_j or Yi=YjY_i = Y_j

Tau-a (Ignores Ties)

Ο„a=Cβˆ’D(n2)=Cβˆ’Dn(nβˆ’1)/2\tau_a = \frac{C - D}{\binom{n}{2}} = \frac{C - D}{n(n-1)/2}

Where:

  • C = number of concordant pairs
  • D = number of discordant pairs

Tau-b (Adjusts for Ties)

Ο„b=Cβˆ’D(C+D+TX)(C+D+TY)\tau_b = \frac{C - D}{\sqrt{(C + D + T_X)(C + D + T_Y)}}

Where:

  • TXT_X = pairs tied only on X
  • TYT_Y = pairs tied only on Y

Most commonly used when both variables can have ties.

Tau-c (For Rectangular Tables)

Ο„c=2m(Cβˆ’D)n2(mβˆ’1)\tau_c = \frac{2m(C - D)}{n^2(m-1)}

Where m = min(rows, columns). Used for tables where rows β‰  columns.

Example Calculation

Data: 5 students ranked by exam score (X) and class participation (Y)

StudentExam Rank (X)Participation Rank (Y)
A12
B21
C33
D45
E54

Step 1: Count all pairs (n = 5, so 10 pairs)

PairX comparisonY comparisonResult
A-B1 < 22 > 1Discordant
A-C1 < 32 < 3Concordant
A-D1 < 42 < 5Concordant
A-E1 < 52 < 4Concordant
B-C2 < 31 < 3Concordant
B-D2 < 41 < 5Concordant
B-E2 < 51 < 4Concordant
C-D3 < 43 < 5Concordant
C-E3 < 53 < 4Concordant
D-E4 < 55 > 4Discordant

Results: C = 8, D = 2

Tau-a:

Ο„a=8βˆ’210=0.60\tau_a = \frac{8 - 2}{10} = 0.60

Interpretation: Moderate positive association.

Interpretation Guidelines

| |Ο„| | Interpretation | |-----|----------------| | 0.00 - 0.10 | Negligible | | 0.10 - 0.20 | Weak | | 0.20 - 0.30 | Moderate | | 0.30 - 0.50 | Strong | | > 0.50 | Very strong |

Note: Kendall's tau tends to be lower than Spearman's rho for the same data.

Statistical Significance

For Small Samples

Use exact tables or permutation tests.

For Large Samples (n > 10)

Normal approximation:

z=Ο„2(2n+5)9n(nβˆ’1)z = \frac{\tau}{\sqrt{\frac{2(2n+5)}{9n(n-1)}}}

Or with ties:

z=Ο„bSE(Ο„b)z = \frac{\tau_b}{SE(\tau_b)}

Handling Ties

Types of Ties

  • X ties: Same rank on X, different on Y
  • Y ties: Different rank on X, same on Y
  • XY ties: Same rank on both (very tied)

Impact

  • Tau-a ignores ties (can inflate correlation)
  • Tau-b adjusts denominator (preferred for most data)
  • Tau-c best for rectangular contingency tables

Kendall's Tau vs. Spearman's Rho

AspectKendall's Ο„Spearman's ρ
BasisPair comparisonsRank differences
Typical magnitudeLowerHigher
TiesHandles betterApproximates
Statistical propertiesBetter for small nMore common
InterpretationProbability-basedCorrelation-like

Approximate Relationship

Οβ‰ˆ1.5Γ—Ο„\rho \approx 1.5 \times \tau

Or more precisely: Οβ‰ˆsin⁑(Ο€2Ο„)\rho \approx \sin(\frac{\pi}{2}\tau)

Probability Interpretation

Kendall's tau has a direct probability interpretation:

Ο„=P(concordant)βˆ’P(discordant)\tau = P(\text{concordant}) - P(\text{discordant})

For a randomly selected pair:

  • Ο„ = 0.6 means 80% concordant, 20% discordant
  • (0.8 - 0.2 = 0.6)

Partial Kendall's Tau

Control for a third variable Z:

Ο„XY.Z=Ο„XYβˆ’Ο„XZΟ„YZ(1βˆ’Ο„XZ2)(1βˆ’Ο„YZ2)\tau_{XY.Z} = \frac{\tau_{XY} - \tau_{XZ}\tau_{YZ}}{\sqrt{(1-\tau_{XZ}^2)(1-\tau_{YZ}^2)}}

Applications

Medical Research

Association between ordinal outcomes (pain scales, disease stages).

Psychology

Relationship between ranked preferences or attitudes.

Education

Agreement between different graders on rankings.

Quality Assessment

Agreement between ranked product evaluations.

Survey Research

Association between Likert-scale responses.

Confidence Intervals

For tau-b, approximate 95% CI:

Ο„bΒ±1.96Γ—SE(Ο„b)\tau_b \pm 1.96 \times SE(\tau_b)

Where:

SE(Ο„b)β‰ˆ2(2n+5)9n(nβˆ’1)SE(\tau_b) \approx \sqrt{\frac{2(2n+5)}{9n(n-1)}}

More accurate CIs use bootstrap methods.

Reporting Results

APA format:

"There was a moderate positive association between exam performance and class participation, Ο„b = .60, p = .028."

Full report:

"Kendall's tau-b was computed to assess the relationship between exam ranking and participation ranking. There was a significant positive correlation, Ο„b = .60 (95% CI: .15, .85), z = 2.20, p = .028, indicating that students who ranked higher on exams tended to also rank higher on participation."

Common Mistakes

Using Wrong Tau Variant

  • Use tau-b for continuous data with ties
  • Use tau-c for rectangular tables
  • Specify which variant was used

Comparing Tau to Spearman Directly

Tau is typically lowerβ€”account for this when interpreting.

Ignoring Sample Size

Statistical significance depends heavily on n. A small Ο„ can be significant with large n.

Not Checking for Ties

Many ties may affect which tau variant is appropriate.

Assumptions

Ordinal Scale

Variables must be at least ordinal (rankings meaningful).

Monotonic Relationship

Kendall's tau detects monotonic (not just linear) relationships.

Independent Observations

Each observation pair should be independent.

Historical Context

Maurice Kendall developed this coefficient in 1938 as an alternative to Spearman's rho. His approach based on counting concordant and discordant pairs provides a more intuitive interpretation and better statistical properties.

Kendall also contributed the partial tau and tau-c for specialized applications.

Related Calculations

Summary

Kendall's tau measures ordinal association by comparing concordant and discordant pairs. Tau-b (most common) adjusts for ties; tau-c is for rectangular tables. Values range from -1 to +1, with interpretation based on the probability of concordance versus discordance. Tau tends to be lower than Spearman's rho for the same data but has better statistical properties for small samples. Use for ordinal data, non-normal distributions, or when ties are common. Report the tau variant used, along with confidence intervals and p-values.