Kendall's Tau (τ)
The engine for Concordance Discovery. Kendall’s Tau (τ) quantifies the association between ordinal variables by auditing the probability of pair-wise agreement, providing ultimate precision for small samples.
What is it?
Kendall's Tau-b measures ordinal association based on the relative ordering of ranks, evaluating the proportion of concordant vs. discordant pairs.
When to use it
- Ordinal Scales: Variables are ordered rankings or Likert categories.
- Small Samples: More mathematically robust for small cohorts than Spearman's rho.
- Ties Adjustment: Tau-b handles square tables (equal categories); Tau-c handles rectangular grids.
Core Idea
It inspects every possible pair of subjects. If Subject A is ranked higher than Subject B on both X and Y, the pair is **Concordant** (parallel lines). If the rankings reverse, they are **Discordant** (crossing lines):
Hypotheses
How it works
- Pair every participant with every other participant.
- Classify each pair as Concordant (C) or Discordant (D).
- Subtract Discordant from Concordant (C - D).
- Divide by total pairs (adjusting for ties if Tau-b/c).
Assumptions
Important Note
💡 Symmetric Index: Kendall's Tau is symmetric—correlating X w.r.t Y yields the identical score as Y w.r.t X. It represents the probability of rank agreement minus disagreement.
Quick Example
| Candidate | Judge A Rank | Judge B Rank |
|---|---|---|
| C1 | 1 | 2 |
| C2 | 2 | 1 |
| C3 | 3 | 3 |
Kendall's Tau-b Laboratory
Change the association strength to see how rank connection lines cross (discordance) or align parallel (concordance).
| Pair Type | Count |
|---|---|
| Concordant Pairs (C) | 58 |
| Discordant Pairs (D) | 8 |
| Calculated Tau (τ) | 0.7576 |
| p-value approx. | 0.0006 |
Hypotheses
Pragmatic null and alternative hypotheses defined in mathematical notation.
H₀: τb = 0 (no monotonic association between variables)
Hₐ: τb ≠ 0 (monotonic association exists)
Tests monotonic association based on concordant vs discordant pairs. Can be one-tailed if direction predicted a priori. Tau-b adjusts for ties (tied ranks), making it suitable for ordinal data with many tied values.
Assumptions
The core mathematical criteria needed to ensure that statistical testing remains unbiased and valid.
Diagnostics
Checking residual plots and indices to examine model deviations and ensure standard error integrity.
- Scatterplot with smooth curve (lowess/loess) to assess monotonicity
- Check for tied ranks and ensure Tau-b is used (not Tau-a)
- Examine 95% confidence interval for tau
- Compare with Spearman's rho to ensure consistency
- Contingency table or heatmap for ordinal data
- Boxplots for each variable to identify outliers
- Report proportion of concordant vs discordant pairs
- Sensitivity analysis: compare tau with/without outliers
- Check sample size adequacy with power analysis
- Compare Kendall's tau-b with tau-c if tables are rectangular
Applied Minds
Review concrete study examples, data layout guidelines, and copy executable syntax scripts.
Sleep Quality and Academic Performance (Ordinal Likert Scales with Ties)
Research question: Is sleep quality associated with academic performance in college students? Design: Survey of 150 undergraduates rating sleep quality (5-point Likert: 1=very poor to 5=excellent) and self-reported GPA categories (6 ordinal levels: <2.0, 2.0-2.5, 2.5-3.0, 3.0-3.5, 3.5-4.0). Both variables ordinal with many tied ranks. Hypothesis: Better sleep quality associated with higher academic performance.
# Kendall's Tau-b: Ordinal correlation with tied ranks
# Sleep quality and academic performance in college students
library(tidyverse)
library(DescTools) # For KendallTauB with CI
library(psych) # For corr.test
# Simulate realistic data (or load: data <- read.csv("sleep_gpa.csv"))
set.seed(2025)
n <- 150
# Sleep quality (1-5 Likert) - clustered at 3 (average)
sleep_quality <- sample(1:5, n, replace=TRUE,
prob=c(0.10, 0.20, 0.40, 0.20, 0.10))
# GPA categories (1-6) correlated with sleep (monotonic relationship)
true_latent_gpa <- 0.5 * sleep_quality + rnorm(n, 0, 0.8)
gpa_category <- cut(true_latent_gpa,
breaks=c(-Inf, 1.5, 2.0, 2.5, 3.0, 3.5, Inf),
labels=c("<2.0", "2.0-2.5", "2.5-3.0", "3.0-3.5", "3.5-4.0", "4.0"))
gpa_numeric <- as.numeric(gpa_category)
data <- data.frame(
student_id = 1:n,
sleep_quality = factor(sleep_quality, levels=1:5,
labels=c("Very poor", "Poor", "Fair", "Good", "Excellent")),
sleep_numeric = sleep_quality,
gpa_category = gpa_category,
gpa_numeric = gpa_numeric
)
head(data, 10)
# === STEP 1: Check Assumptions ===
# 1. Check for tied ranks
cat("=== Frequency of Sleep Quality Ratings ===\n")
table(data$sleep_numeric)
cat("\nProportion of tied values in sleep:",
1 - length(unique(data$sleep_numeric))/n, "\n")
cat("\n=== Frequency of GPA Categories ===\n")
table(data$gpa_numeric)
# 2. Visual check for monotonicity
ggplot(data, aes(x=sleep_numeric, y=gpa_numeric)) +
geom_jitter(width=0.2, height=0.2, alpha=0.4, size=2) +
geom_smooth(method="loess", color="red", se=TRUE) +
labs(title="Sleep Quality vs Academic Performance",
subtitle="Red curve shows monotonic trend",
x="Sleep Quality(1=Very Poor to 5=Excellent)",
y="GPA Category(1=<2.0 to 6=4.0)") +
theme_classic()
# Contingency table heatmap
tab <- table(data$sleep_numeric, data$gpa_numeric)
pheatmap::pheatmap(tab,
main="Frequency Heatmap: Sleep × GPA",
display_numbers=TRUE,
cluster_rows=FALSE,
cluster_cols=FALSE)
# === STEP 2: Compute Kendall's Tau-b ===
# Method 1: Base R cor.test
result <- cor.test(data$sleep_numeric, data$gpa_numeric,
method="kendall", alternative="two.sided")
print(result)
cat("\n=== Kendall's Tau-b Results ===\n")
cat(sprintf("τb = %.3f\n", result$estimate))
cat(sprintf("z = %.2f, p = %.4f\n", result$statistic, result$p.value))
# Method 2: DescTools (provides CI)
tau_ci <- KendallTauB(data$sleep_numeric, data$gpa_numeric, conf.level=0.95)
cat(sprintf("τb = %.3f, 95%% CI [%.3f, %.3f]\n",
tau_ci[1], tau_ci[2], tau_ci[3]))
# === STEP 3: Interpretation ===
cat("\n=== Interpretation Guidelines ===\n")
cat("Tau magnitude: 0.1=small, 0.3=medium, 0.5=large(Cohen, 1988)\n")
cat("Note: Tau < Pearson r for same data(tau is more conservative)\n\n")
tau_val <- result$estimate
if (abs(tau_val) < 0.1) {
strength <- "negligible"
} else if (abs(tau_val) < 0.3) {
strength <- "small"
} else if (abs(tau_val) < 0.5) {
strength <- "moderate"
} else {
strength <- "large"
}
cat(sprintf("Effect size: %s(%s association)\n",
strength, ifelse(tau_val > 0, "positive", "negative")))
# === STEP 4: Concordant vs Discordant Pairs ===
# Calculate manually
n_pairs <- n * (n - 1) / 2
concordant <- sum(outer(data$sleep_numeric, data$sleep_numeric, "<") &
outer(data$gpa_numeric, data$gpa_numeric, "<"))
discordant <- sum(outer(data$sleep_numeric, data$sleep_numeric, "<") &
outer(data$gpa_numeric, data$gpa_numeric, ">"))
cat(sprintf("\nTotal pairs: %.0f\n", n_pairs))
cat(sprintf("Concordant pairs: %d(%.1f%%)\n", concordant, 100*concordant/n_pairs))
cat(sprintf("Discordant pairs: %d(%.1f%%)\n", discordant, 100*discordant/n_pairs))
cat(sprintf("Tied pairs: %d(%.1f%%)\n",
n_pairs - concordant - discordant,
100*(n_pairs - concordant - discordant)/n_pairs))
# === STEP 5: Compare with Spearman's rho ===
spearman_result <- cor.test(data$sleep_numeric, data$gpa_numeric, method="spearman")
cat(sprintf("\nSpearman's ρ = %.3f (p = %.4f)\n",
spearman_result$estimate, spearman_result$p.value))
cat("Note: Spearman's rho typically 1.5× larger than Kendall's tau for same data\n")
cat(sprintf("Actual ratio: %.2f\n", spearman_result$estimate / tau_val))
# === STEP 6: Sensitivity Analysis (remove outliers) ===
# Identify outliers using boxplot rule
outliers_sleep <- boxplot.stats(data$sleep_numeric)$out
outliers_gpa <- boxplot.stats(data$gpa_numeric)$out
if (length(outliers_sleep) > 0 | length(outliers_gpa) > 0) {
cat("\n=== Sensitivity Analysis(excluding outliers) ===\n")
data_no_outliers <- data[!(data$sleep_numeric %in% outliers_sleep |
data$gpa_numeric %in% outliers_gpa), ]
tau_no_outliers <- cor.test(data_no_outliers$sleep_numeric,
data_no_outliers$gpa_numeric,
method="kendall")$estimate
cat(sprintf("τb without outliers = %.3f (diff = %.3f)\n",
tau_no_outliers, tau_no_outliers - tau_val))
} else {
cat("\nNo outliers detected.\n")
}
# === APA-Style Reporting ===
cat("\n=== APA-Style Report ===\n")
cat(sprintf(
"A Kendall's tau-b correlation was computed to assess the association between
sleep quality and academic performance in 150 college students. Both variables
were measured on ordinal scales(sleep quality: 1-5 Likert; GPA: 6 ordered
categories). There was a significant positive monotonic association, τb = %.2f,
95%% CI [%.2f, %.2f], z = %.2f, p %s, indicating that students with better
sleep quality tended to have higher academic performance. The effect size was %s
(Cohen, 1988). The analysis revealed that %.0f%% of pairs were concordant
(both variables increased together), %.0f%% were discordant, and %.0f%% were
tied. These findings support the link between sleep quality and academic success,
consistent with prior research(Hershner & Chervin, 2014).\n",
tau_val, tau_ci[2], tau_ci[3], result$statistic,
ifelse(result$p.value < 0.001, "< .001", sprintf("= %.3f", result$p.value)),
strength,
100*concordant/n_pairs,
100*discordant/n_pairs,
100*(n_pairs - concordant - discordant)/n_pairs
))τb = 0.32, p < .001 (moderate positive association). 63% of student pairs were concordant (higher sleep quality paired with higher GPA), 37% discordant. Kendall's tau-b appropriately handles the many tied ranks in both ordinal variables. The moderate effect size (τb = 0.32) translates to meaningful real-world association: students rating sleep as 'excellent' averaged GPA category 4.2 (3.5-4.0 range) vs 2.8 (2.5-3.0 range) for 'poor' sleep. Findings align with sleep-academic performance literature showing correlations of r = 0.35-0.45.
Alternatives
Structured fallback pathways for choosing alternative tests when normality or slopes requirements fail.
- Kendall's Tau-C — The required adjustment when rows and columns have a different number of levels.
- Somers' D — Utilize the asymmetric audit if you have a designated Outcome variable.
- Goodman-Kruskal Gamma — Ignores ties entirely to find the 'Agreement Rate' among discordant pairs.
- Chi-Square Independence — If ties dominate, treat the categories as purely nominal.
Post-hoc
Group mean comparisons and correction controls (e.g. Tukey HSD, Bonferroni) to protect against Family-Wise Error Rates.
- Compare Kendall's tau-b with Spearman rs (tau is more robust with ties)
- Use Kendall's tau-c if table is rectangular (different row/column counts)
- Bootstrap confidence intervals for tau
- Examine concordant/discordant pair breakdown for interpretation
- Stratified analysis: compute tau within subgroups and compare
Kendall's Tau-b is a bivariate rank correlation. Traditional post-hoc tests are not applicable.
Effect Size
Understanding effect sizes (e.g., Cohen's d, Partial Eta-Squared) and clinical impact benchmarks.
0.0-0.1: negligible; 0.1-0.3: small; 0.3-0.5: moderate; 0.5+: large (Cohen, 1988 adapted for tau)
Tau typically ~0.67× Pearson r for same data. Tau more conservative but robust to outliers and doesn't assume linearity
High concordance (>60%) indicates strong monotonic trend; high discordance indicates negative association
0.2
0.5
0.8
Sample Size
Guidelines for minimum sample requirements and power analysis parameters.
The 'Small-Sample' Minimum: A minimum of 30 participants is recommended for a concordance audit. Tau-B is elite for small samples but requires enough pairs to distinguish agreement from random chance.
| Effect Size | Parameters | Required n |
|---|---|---|
| Small Effect | τ = .10 (Small) | n ≈ 1000 |
| Medium Effect | τ = .30 (Medium) | n ≈ 120 |
| Large Effect | τ = .50 (Large) | n ≈ 45 |
The 'Tie Strike': Tau-B is designed to handle ties by penalizing the denominator. If ties are extreme (e.g., >50%), increase your N by 20% to maintain your statistical authority.
Reporting
How to compile statistical results into publication prose matching APA and journal style guides.
A Kendall's tau-b correlation was conducted to examine the monotonic association between Variable X and Variable Y in sample description. If assumptions checked: Both variables were measured on ordinal scales with tied ranks, making tau-b appropriate. There was a significant/non-significant positive/negative monotonic association, τb = value, 95% CI [lower, upper], z = z-value, p = or < p-value, indicating that interpretation in context. The effect size was small/moderate/large according to Cohen (1988) guidelines. Optional: X% of pairs were concordant, Y% were discordant, and Z% were tied.
- Kendall's τb value
- 95% confidence interval
- z-statistic (for large samples) or exact p-value (small samples)
- p-value
- Sample size
- Statement about monotonicity and tied ranks
Manuscript Lab
Copy standard summary tables and forensic reporting grids to outline analysis details.
| Variable Pair | Tau-b | z-score | p-value |
|---|---|---|---|
| Expert Ranking ↔ Peer Ranking | .42 | 3.15 | .002 |
| Experience ↔ Performance | .18 | 1.45 | .147 |
The Concordance Metric. Measures the proportion of concordant pairs (agreeing ranks) minus discordant pairs.
Identical values. Tau-b explicitly corrects for ties, making it more robust than Spearman for Likert data.
Command Center
Syntax libraries and function parameters for executing calculations in stats packages.
# 1. Execute Kendall's Tau-b
cor.test(x, y, method = 'kendall')
# 2. Kendall with Confidence Intervals
DescTools::KendallTauB(x, y, conf.level = 0.95)Tau-b is the superior choice for 'Small n' ordinal data. It is more conservative and interpretable (probability of concordance) than Spearman.
# Execute Robust Ordinal Check
correlation::correlation(df, method = 'kendall')Common Mistakes
Analytical caveats and corrections to maintain modeling integrity.
References
Scholarly lineage and citation keys grounding the statistical framework.