Statistical Calculators

Which Statistical Test?

Pearson, Spearman or Kendall? Which Correlation to Use

Published · 3 min read

You have two variables and want a single number for how closely they move together. Three famous coefficients are available: Pearson, Spearman and Kendall. They often give similar answers, which hides the fact that they measure different things. Three small datasets show when they part ways.

Three scatter plots showing a linear trend, a curved trend and a trend with an outlier

What each one measures

Pearson's coefficient measures how closely points follow a straight line, using the actual values. Spearman's replaces values with ranks and measures how consistently one variable rises when the other does, in a straight line or not. Kendall's tau also uses ranks, but counts pairs of observations that agree or disagree in order. Guides to medical research recommend Spearman's when data are skewed or ordinal (Mukaka, 2012).

Dataset one: a clean outlier

Take ten students. Hours studied are 2, 3, 4, 5, 6, 7, 8, 9, 10 and 40, with scores 52, 55, 53, 60, 58, 62, 61, 65, 64 and 95. One student who studied 40 hours pulls the line toward himself. The Pearson correlation calculator gives r = 0.985, while the Spearman calculator gives 0.95 and the Kendall tau calculator gives 0.82.

Remove the outlier and Pearson falls to 0.93, Spearman to 0.93 and Kendall to 0.78.

Pearson was inflated most by the extreme point, because it uses the distance of every value from the mean.

Dataset two: a curve

Now take x from 1 to 10 and y rising exponentially. The relationship is perfectly consistent, since y always increases with x, yet it is not a straight line. Pearson returns about 0.87, while Spearman and Kendall both return exactly 1.00, because the order is perfectly preserved.

Why Kendall is lower

Kendall's tau is usually smaller than Spearman's for the same data, because it counts every discordant pair, so a few swaps cost it more. Neither is wrong. Their scales differ, which is why you should never compare a tau with a Spearman value directly.

A simple decision guide

Use Pearson when the relationship looks linear, there are no major outliers, and the variables are roughly symmetric. Use Spearman when the relationship is monotonic but curved, or the data are ranks, ordinal scores or skewed. Use Kendall with small samples or many ties, or when you prefer its interpretation as the difference between the probabilities of concordant and discordant pairs.

Size, significance and sample

A coefficient needs context. With 10 observations, a correlation near 0.63 is needed to clear the usual 5% significance bar, while with 100 observations even 0.20 qualifies. Statistical significance therefore says little about strength. Squaring Pearson's r gives the share of variation shared by the two variables, which has a direct meaning, but squared Spearman or Kendall values do not mean the same thing.

Ties deserve a mention too. When many observations share the same value, such as ratings on a 1-to-5 scale, rank methods need adjustments, and Kendall's tau has variants designed for ties. Check which version your software reports, and say so when you publish the result. A short note on which coefficient you used is worth more than extra decimal places.

Always look at a scatter plot first, since all three can hide odd patterns. A zero Pearson value can accompany a strong U-shaped relationship, and a high value never proves cause, as discussed in our article on correlation versus causation.

Compare all three: enter your paired data into the Pearson calculator and the Kendall and Spearman calculator and check how much the outlier matters.

Sources and further reading

  1. Mukaka (2012), A guide to appropriate use of correlation coefficient in medical research, Malawi Med J