Concept

Rank Correlation

Definition

Rank correlation measures the degree to which two variables move together by comparing the ranks of their observations rather than the values themselves. The two best-known coefficients are Spearman rho, which is simply Pearson correlation applied to ranks, and Kendall tau, which counts the proportion of concordant minus discordant pairs. Both range from minus one to plus one, with the same interpretive endpoints as Pearson correlation, but with stronger guarantees in the presence of outliers and non-linear monotonic relationships.

The conceptual move is to discard distance information and keep only order. If x and y both rise together monotonically — even if the relationship is logarithmic, exponential, or sigmoidal — the ranks will agree and the rank correlation will be near one. Pearson correlation on the same data would fall below one because the relationship is not a straight line, and could be pulled toward zero by a single extreme outlier on either axis.

Why it matters

How it works

Spearman rho is computed in two passes. First, replace each observation with its rank — the smallest value becomes one, the second smallest becomes two, and so on, with ties handled by averaging. Then compute the ordinary Pearson correlation between the two rank vectors. The result inherits the algebraic properties of Pearson correlation but is computed on a transformed scale where all distributions are uniform.

Kendall tau works differently. It examines every pair of observations and asks whether the pair is concordant — both x and y move in the same direction between the two observations — or discordant. Tau is the difference between the number of concordant and discordant pairs, normalised by the total pair count. It tends to give a smaller numerical value than Spearman for the same data, but its sampling distribution is better behaved at small sample sizes, and its interpretation as a probability of concordance has a cleaner real-world meaning.

Where it goes next

Continue exploring

Tags