🎉 75% of content is free forever — Unlock Premium from $10/mo →
CW
NEWSLIVESearch All Content
💼 Servicesℹ️ About✉️ ContactView Pricing Plansfrom $10

Kendall's Tau — Concordance-Based Correlation

Foundations of StatisticsDescriptive Statistics🟢 Free Lesson

Kendall's Tau

Descriptive Statistics

Count Pairs, Not Pixels — A More Intuitive Correlation

Kendall's τ takes a fundamentally different approach to correlation: instead of squaring differences, it simply counts how many pairs of observations agree or disagree. This makes it one of the most intuitive measures of rank association.

Key things Kendall's tau helps you understand:

  • Concordant vs discordant pairs — A pair agrees (concordant) if both variables rank in the same order; it disagrees (discordant) if they flip.
  • Robust small-sample behavior — Kendall's τ has better statistical properties than Spearman for small datasets with many tied ranks.
  • Tied rank handling — The τ-b variant gracefully adjusts for ties, making it the default choice in most software.

In small samples or datasets full of ties, Kendall's τ often tells the more honest story.


What is Kendall's Tau?

Definition

Kendall's τ (tau) measures the ordinal association between two variables by counting concordant and discordant pairs.


python
import numpy as np
from scipy import stats

np.random.seed(42)

x = np.array([1, 2, 3, 4, 5, 6, 7, 8])
y = np.array([2, 1, 4, 3, 6, 5, 8, 7])

tau, p_value = stats.kendalltau(x, y)
print(f"Kendall's tau = {tau:.4f}")
print(f"p-value       = {p_value:.4f}")

Concordant vs Discordant Pairs

A pair (i, j) is concordant if both x and y rank in the same order: and (or both >).

A pair is discordant if the ranks disagree: but .

Pair TypeConditionEffect on τ
ConcordantSame order in X and YIncreases τ
DiscordantOpposite order in X and YDecreases τ
TiedSame rank in X or YExcluded from calculation

Kendall's τ-a vs τ-b

VariantFormulaWhen to Use
τ-aNo ties in data
τ-bHandles ties (default in scipy)
τ-cRectangular tables
python
# τ-a (no ties correction)
n = len(x)
tau_a = 2 * (tau)  # Simplified; scipy does not directly compute τ-a
print(f"τ-b = {tau:.4f}")

Comparison with Spearman

python
np.random.seed(42)
n = 20
x = np.random.normal(0, 1, n)
y = x + np.random.normal(0, 0.5, n)

rho, _ = stats.spearmanr(x, y)
tau, _ = stats.kendalltau(x, y)

print(f"Spearman ρ = {rho:.4f}")
print(f"Kendall τ  = {tau:.4f}")

Kendall Tau in Machine Learning

ML ApplicationKendall Tau UsageWhy
Learning to rankEvaluate ranking agreementHandles ties better than Spearman
Recommendation systemsUser preference orderingRank-based evaluation
Feature selectionOrdinal feature relationshipsRobust to outliers
Inter-rater reliabilityAgreement between annotatorsLabel quality assessment
python
import numpy as np
from scipy.stats import kendalltau, spearmanr

# Compare rankings
model_a_ranks = [1, 2, 3, 4, 5]
model_b_ranks = [1, 3, 2, 5, 4]

kendall_tau, _ = kendalltau(model_a_ranks, model_b_ranks)
spearman_rho, _ = spearmanr(model_a_ranks, model_b_ranks)
print(f"Ranking agreement: Kendall τ = {kendall_tau:.3f}, Spearman ρ = {spearman_rho:.3f}")
print("Kendall tau is more conservative (fewer pairwise comparisons)")

Key Takeaways

Kendall's τ counts concordant vs discordant pairs — an intuitive, pair-wise interpretation of rank association.

τ ranges from -1 to +1 — same scale as Spearman's ρ, making comparison straightforward.

τ-b is the default — handles tied ranks gracefully, unlike the simpler τ-a variant.

More robust than Spearman for small samples and many ties, but expect lower absolute values — this is expected, not a flaw.

"When your sample is small or full of ties, let Kendall's τ do the counting — concordant pairs agree, discordant pairs disagree, and the truth falls somewhere in between."


Extended Learning: Beyond the Basics

Key Concepts Summary

This lesson covers fundamental concepts that serve as building blocks for more advanced topics. Master these basics before moving to intermediate and advanced material.

Prerequisite Knowledge

Before studying this topic in depth, ensure you understand:

  • Basic definitions and terminology
  • Core formulas and their derivations
  • Common applications in real-world scenarios
  • Typical pitfalls and misconceptions

Step-by-Step Walkthrough

Let us work through a complete example to solidify understanding:

Step 1: Identify the problem type. Determine which category this problem falls into and which approach is most appropriate.

Step 2: Apply the relevant formula. Substitute known values into the appropriate equation, paying attention to units and constraints.

Step 3: Simplify and solve. Work through the algebra step by step, checking each intermediate result.

Step 4: Verify the answer. Check that the solution satisfies the original conditions and makes logical sense.

Common Mistakes to Avoid

  1. Misidentifying the problem type — Always start by categorizing the problem
  2. Incorrect formula application — Verify the formula applies to your specific case
  3. Unit errors — Always check units are consistent throughout
  4. Sign errors — Pay careful attention to positive and negative values
  5. Rounding too early — Keep full precision until the final answer
  6. Forgetting constraints — Check that solutions satisfy all given conditions

Real-World Applications

Understanding this concept is essential for:

  • Advanced problem solving in examinations
  • Building intuition for more complex topics
  • Developing analytical thinking skills
  • Applying mathematical reasoning to practical situations

Practice Exercises

  1. Basic: Solve 5 problems of increasing difficulty using the core concept.
  2. Intermediate: Apply the concept to word problems with multiple steps.
  3. Advanced: Combine this concept with 2-3 other topics in a comprehensive problem.
  4. Challenge: Create your own problem that requires this concept plus additional knowledge.

Interview and Exam Tips

  • Common question patterns: Identify which exam or interview formats test this topic
  • Time management: Practice completing problems within time constraints
  • Common traps: Know the typical mistakes examiners set as distractors
  • Verification strategy: Develop a quick method to check your answer

Related Topics

Quick Reference Card

ConceptFormula/RuleKey InsightCommon Use
Core DefinitionSee main textUnderstand the intuitionFoundation for all applications
Key FormulaSee main textMemorize the derivationDirect problem solving
Special CaseSee main textRecognize when it appliesSimplifies complex problems
Edge CaseSee main textKnow the limitationsAvoids errors

Further Reading

For students who want to go deeper:

  • Standard textbooks on the subject
  • Research papers applying this concept
  • Online courses with video explanations
  • Practice problem collections with detailed solutions
CW

ChatWhole Learn Editorial Team

Written by experienced data scientists, software engineers, and educators. All content is reviewed by industry professionals to ensure accuracy and relevance.

Last reviewed: 2026-11-14

—
☆☆☆☆☆
0 ratings

Rate & Feedback

Need Expert Statistics Help?

Get personalized tutoring, project support, or professional consulting.

Advertisement