Kendall’s rank correlation is a measure of association between two ordered variables, based on whether pairs of observations have the same or opposite relative order. Usually denoted by the Greek letter , it measures the balance between concordant and discordant pairs rather than the numerical distances between observations. Introduced by Maurice Kendall in 1938, it is widely used for ordinal data, comparisons of rankings, and relationships that are monotonic but not necessarily linear. Several variants differ in how they account for tied values.
Concordant and discordant pairs
Consider paired observations,
For each pair of distinct observations :
- The pair is concordant if : the observation with the larger -value also has the larger -value.
- The pair is discordant if : the observation with the larger -value has the smaller -value.
- The pair is tied on one or both variables if the corresponding values are equal.
Let be the number of concordant pairs and the number of discordant pairs. The total number of unordered observation pairs is the binomial coefficient
The basic numerator is
where is , , or according to whether is positive, zero, or negative.
When there are no ties, . Perfect agreement in ordering gives a coefficient of , and perfectly reversed ordering gives .
Example
Suppose four objects receive the following ranks:
| Object | Ranking | Ranking |
|---|---|---|
| A | 1 | 1 |
| B | 2 | 3 |
| C | 3 | 2 |
| D | 4 | 4 |
There are six pairs. Only the pair B–C is discordant, so and . With no ties,
This indicates that concordant pairs substantially outnumber discordant pairs; it does not mean that two-thirds of the objects have identical ranks.
Main variants
Tau-a
The simplest normalization is
When ties occur, tied pairs contribute zero to the numerator but remain in the denominator. Consequently, ties can prevent from attaining or , even when there are no disagreements among comparable pairs.
Tau-a is particularly natural when both rankings are complete and have no ties, or when the intended quantity is the unconditional difference between concordance and discordance probabilities.
Tau-b
Tau-b adjusts the denominator for ties:
where is the number of pairs tied on , including pairs also tied on , and is defined analogously.
If the tie groups in have sizes , then
with an analogous expression for .
An equivalent formula is
where counts pairs tied only on , and counts pairs tied only on . Pairs tied on both variables appear in neither factor.
Tau-b lies between and when defined. It is undefined if either variable is constant, because the denominator is zero. Although it corrects for ties, its attainable range can still be narrower than for particular, incompatible patterns of ties in the two variables.
Tau-c
Tau-c, also called Stuart–Kendall tau-c, is often used for ordinal contingency tables, especially tables with different numbers of row and column categories. It is defined by
where is the smaller of the numbers of distinct observed categories of the two variables, and .
Its normalization accounts for table dimensions rather than using the tie correction of tau-b. Tau-c is not interchangeable with tau-b: the two can differ substantially when category counts or category frequencies differ. Tau-c is also not generally identical to tau-a when there are no ties; in that case , and the two formulas coincide.
Population interpretation
Let and be independent observations from the same joint distribution. The population counterpart of tau-a is
where denotes expected value. Equivalently,
For continuous marginal distributions, ties have probability zero. Thus,
For example, a population value of means that two independently selected observations are concordant with probability , under the no-ties assumption.
The sample tau-a is a U-statistic: an average of a fixed function over all unordered pairs of observations. For independent, identically distributed observations, it is an unbiased estimator of this population parameter.
With discrete variables, a population version corresponding to tau-b is
provided both denominator probabilities are positive.
Properties and interpretation
Invariance under order-preserving transformations
Kendall’s correlation depends on ordering, not numerical spacing. Applying a strictly increasing transformation separately to either variable leaves the coefficient unchanged. Applying a strictly decreasing transformation to one variable reverses its sign; applying decreasing transformations to both leaves it unchanged.
A transformation that is not strictly monotonic may create ties and change the result.
This invariance makes Kendall’s correlation suitable for ordinal scales, where category order is meaningful but numerical differences need not be.
Association is not independence
Independence implies zero population Kendall correlation when the coefficient is defined, but zero Kendall correlation does not generally imply independence.
For example, let have a continuous distribution symmetric about zero and let . The variables are dependent, but symmetry balances concordant and discordant pairs, giving population tau zero. Kendall’s correlation therefore measures a particular form of ordered association, not every possible dependence.
Likewise, rank association alone does not establish causation.
Sensitivity to extreme observations
Making an already extreme observation numerically larger does not change the coefficient unless its relative order changes. Kendall’s correlation is therefore less sensitive to numerical magnitudes than moment-based measures.
It is not immune to unusual or contaminated observations: a single observation participates in pairs, and changing its position can change all of those pairwise comparisons.
Statistical inference
Kendall’s correlation is commonly used in hypothesis testing for association.
Exact testing
Under a null hypothesis of independence and appropriate exchangeability, one variable can be permuted relative to the other to obtain the null distribution of the statistic. Without ties, every ordering of one ranking relative to the other is equally likely under the null.
For small samples, the resulting p-value can be calculated exactly, by enumeration or specialized algorithms. Conditional permutation procedures can also accommodate ties, although software support for exact tied-data calculations varies.
Large-sample approximation
For independent observations with continuous marginal distributions, under independence,
Consequently,
For sufficiently large samples,
has an approximately standard normal distribution under the null. Some implementations apply a continuity correction.
Ties require a corresponding correction to the variance; using the no-ties formula can give incorrect significance levels. Moreover, the displayed null variance is not a general variance formula for estimation under arbitrary dependence between and .
A confidence interval may be constructed using an appropriate asymptotic standard error or bootstrap procedure. Ordinary resampling of observation pairs presumes independent sampling units. Clustered or serially dependent data require methods that respect that dependence.
Testing independence is also distinct from testing only that population tau equals zero: zero tau permits some dependent distributions, so an independence-based permutation test does not automatically test that broader composite hypothesis.
Relationship to other measures
Pearson and Spearman correlation
Pearson’s correlation coefficient measures linear association using numerical deviations from means. Kendall’s coefficient instead measures pairwise ordering agreement and does not require meaningful distances between values.
Spearman’s rank correlation is Pearson correlation applied to ranks, usually with average ranks assigned to ties. It assesses association through rank values rather than directly counting concordant and discordant pairs.
The coefficients have different numerical scales. A Kendall coefficient and a Spearman coefficient of the same magnitude do not necessarily indicate equivalent association strength.
For a nondegenerate bivariate normal distribution with Pearson correlation ,
This identity depends on the distributional setting and is not a universal conversion formula.
Kendall distance
For two complete rankings without ties, the Kendall distance is the number of discordant pairs . The correlation and distance satisfy
Thus, correlation describes agreement, while the corresponding distance counts pairwise disagreements. Extensions to partial rankings and ties require additional conventions.
Computation and applications
Direct comparison of all pairs requires operations. Sorting observations by one variable and counting inversions in the other permits algorithms, with additional bookkeeping for ties. These bounds use big-O notation.
Common applications include:
- Ordinal measurements: assessing association between ordered categories without assuming equal category spacing.
- Ranking comparison: comparing rankings produced by judges, systems, or scoring methods.
- Monotonic association analysis: describing relationships that need not be linear.
- Trend detection: relating measurements to time order.
The Mann–Kendall test uses the same concordance-minus-discordance principle to assess monotonic trends. Its standard null calculations rely on assumptions about independence; serial correlation or seasonality can invalidate an unadjusted analysis.
Interpretation also depends on sampling and data handling. Coarse categorization creates ties and can change the coefficient; selectively missing observations can distort the observed association. A complete report identifies the variant used, the sample size, the treatment of ties and missing values, and the method used for any inferential calculation.