Pearson, Spearman & Kendall: Choosing the Right Correlation Coefficient
When you select a correlation metric, you are fundamentally choosing how you want to measure association between two variables. The three most common coefficients — Pearson, Spearman, and Kendall — differ in their assumptions, their sensitivity to outliers and non-linearity, and exactly what number they hand you at the end. Picking the wrong one doesn't just give you an imprecise answer — it can give you a confidently wrong one.
Three ways to measure association
All three coefficients return a number between −1 and +1. A value near +1 means the variables move together strongly and positively; near −1 means they move strongly in opposite directions; near 0 means little consistent association was detected by that particular method. That last caveat is the whole lesson: the same dataset can hand you three different numbers depending on which question you asked.
Pearson r
Question asked: “Do these two variables move together in a straight line?” Sensitive to the actual values and to outliers.
Spearman ρ
Question asked: “When X goes up, does Y consistently go up too — in any shape, not just a straight line?” Works on ranks.
Kendall τ
Question asked: “For every possible pair of points, do X and Y agree on which one is bigger?” Also rank-based, more conservative.
1️⃣ Pearson correlation (r)
What it measures
The strength of a linear relationship between two continuous variables — how tightly the points cluster around a straight line.
Covariance of X and Y, standardized by the product of their standard deviations.
Key properties
- Range: −1 to +1
- Assumes a linear relationship
- Assumes continuous (interval/ratio) data
- Assumes approximate normality and homoscedasticity
- Highly sensitive to outliers
Interpretation & when to use
- +1 → perfect positive linear relationship
- 0 → no linear relationship detected
- −1 → perfect negative linear relationship
- Best for process variables, financial returns, and continuous engineering measurements when the scatterplot already looks like a straight line
If your data are roughly normal and you already expect linearity from the physics or process — for example, temperature vs. a mechanical property — use Pearson.
2️⃣ Spearman’s rank correlation (ρ or rs)
What it measures
A monotonic relationship — not necessarily a straight line, just a consistent direction. Instead of correlating the raw values, Spearman first converts each variable to ranks and then runs a Pearson correlation on those ranks.
di is the difference between the ranks of the i-th pair of observations; n is the sample size. (This shortcut form assumes no tied ranks; with ties, Spearman is computed as the Pearson correlation of the two rank columns instead.)
Key properties
- Range: −1 to +1
- Nonparametric — no normality assumption
- Works with ordinal data as well as continuous data
- Less sensitive to outliers than Pearson (an extreme value only shifts a rank, not the raw distance)
Interpretation & when to use
- Measures whether, as X increases, Y tends to increase (or decrease) consistently
- Best for non-normal or skewed data, ordinal data, and monotonic-but-curved relationships
If the relationship is monotonic but visibly curved — for example, a rank of defect severity vs. customer complaints — use Spearman.
3️⃣ Kendall’s tau (τ)
What it measures
Association based on concordant vs. discordant pairs. Take every possible pair of observations. If the pair agrees on ordering — the one with the bigger X also has the bigger Y — it's concordant. If they disagree, it's discordant. Kendall's tau is built directly from that tally.
C = number of concordant pairs, D = number of discordant pairs. (The version used below and by most software, “tau-b,” adjusts the denominator to account for tied ranks.)
Key properties
- Range: −1 to +1
- Nonparametric; robust with small samples
- Handles tied ranks explicitly in its own formula (tau-b)
- Usually smaller in magnitude than Spearman’s ρ for the same data — that's expected, not an error
Interpretation & when to use
- Best for small datasets
- Best when there are many tied ranks
- Preferred when you need more statistically robust inference (its sampling distribution behaves better in small samples)
If the sample is small or there are many ties — for example, comparing a handful of small production-batch heats — use Kendall.
See it happen: concordant vs. discordant pairs
Six production batches were ranked by furnace temperature and by tensile strength. Reveal every one of the 15 possible pairs to see exactly which ones agree (concordant), disagree (discordant), or tie.
| Batch | Temp. rank | Strength rank |
|---|
| Pair | ΔTemp rank | ΔStrength rank | Classification |
|---|
Side-by-side comparison
| Feature | Pearson | Spearman | Kendall |
|---|---|---|---|
| Type | Parametric | Nonparametric | Nonparametric |
| Measures | Linear relationship | Monotonic relationship | Monotonic relationship |
| Data type | Continuous | Ordinal / continuous | Ordinal / continuous |
| Normality required | Yes | No | No |
| Outlier sensitivity | High | Moderate | Low |
| Best for | Linear engineering data | Ranked or skewed data | Small samples, theoretical rigor |
One more important insight: Pearson measures covariance strength. Spearman and Kendall measure order consistency. That distinction is the reason the same dataset can honestly produce three different numbers — they are not competing estimates of one true quantity, they are answers to three different questions.
Interactive: relationship explorer
Pick a relationship pattern, drag the noise slider, and watch what happens to all three coefficients at once. This is the fastest way to build intuition for when Pearson quietly fails.
Pattern
Scatterplot
n = 30Coefficients
Interactive: correlation calculator
Paste or type your own paired data (comma, space, or newline separated — same count of values on each side) to compute all three coefficients directly.
Scatterplot of your data
Results
Practical decision rule
- Is the data continuous and roughly normal, and do you expect a straight-line relationship? → Use Pearson.
- Is the relationship monotonic but not linear? → Use Spearman.
- Is the sample small, or are there many tied ranks? → Use Kendall.
Always look at the scatterplot before trusting any single number. All three coefficients can look “reasonable” while completely missing a non-monotonic (e.g., U-shaped) relationship — none of the three is designed to detect that.
Engineering & data-science context
In steel and process analytics, the choice usually falls out of the question being asked:
Temperature vs. mechanical property
Continuous, physically linear over the working range → Pearson.
Rank of defect severity vs. customer complaints
Ordinal severity tiers, consistent direction but not a straight line → Spearman.
Small batch-to-batch heat comparisons
A handful of heats, ties likely, need robust small-sample inference → Kendall.
Common pitfalls
- Correlation is not causation. Any of the three coefficients can be large because of a lurking (confounding) variable, not because X drives Y.
- A single outlier can dominate Pearson. Two extreme points can swing r dramatically while barely moving Spearman or Kendall — try the “Outliers present” preset above.
- Zero correlation does not mean no relationship. All three coefficients can sit near zero for a strong but non-monotonic (curved both ways) pattern.
- Ties need the right formula. Skip the shortcut Spearman formula when ranks are tied; use the rank-then-Pearson approach or the tau-b version of Kendall instead.
- A big r does not certify a good regression. Linearity, constant variance, and independence still need to be checked separately before fitting a line.
Statistics Implementation
Excel has native, one-cell support for Pearson correlation, but no built-in Spearman or Kendall function — both have to be assembled from ranks. The table and worked examples below show exactly how, without guessing at syntax that doesn't exist.
Excel Functions
| Function | Syntax | Purpose | When to use it |
|---|---|---|---|
CORREL | =CORREL(array1,array2) | Pearson correlation coefficient between two ranges. | Use directly on raw values for Pearson r; use on two rank columns to get Spearman ρ. |
PEARSON | =PEARSON(array1,array2) | Mathematically identical to CORREL; older function name kept for compatibility. | Either function is fine — most analysts default to CORREL. |
RSQ | =RSQ(known_ys,known_xs) | Returns the square of the Pearson correlation coefficient (r²). | Use to report the proportion of variance explained when discussing r in a simple-linear-regression context. |
RANK.AVG | =RANK.AVG(number,ref,[order]) | Ranks a value within a range, averaging tied ranks. | Use to build the rank columns that Spearman (and a manual Kendall check) both depend on. Prefer this over the legacy RANK, which does not average ties. |
SIGN | =SIGN(number) | Returns −1, 0, or +1. | Use on pairwise differences to classify a pair as concordant, discordant, or tied when building Kendall's tau by hand. |
SUMPRODUCT | =SUMPRODUCT(array1,array2,...) | Multiplies arrays element-wise and sums the result. | Use with SIGN across a helper pairwise grid to tally concordant/discordant pairs for Kendall's tau (Excel has no native KENDALL function). |
T.DIST.2T | =T.DIST.2T(x,deg_freedom) | Two-tailed p-value from the t-distribution. | Use to test whether a Pearson r is significantly different from zero: t = r√((n−2)/(1−r²)), then =T.DIST.2T(ABS(t), n-2). |
FISHER / FISHERINV | =FISHER(x) / =FISHERINV(y) | Fisher z-transformation and its inverse. | Use to build an approximate confidence interval for Pearson r: transform r with FISHER, build a normal-based interval on the z-scale, then convert the endpoints back with FISHERINV. |
Excel Use Cases
Pearson r, directly
With X in A2:A31 and Y in B2:B31:
=CORREL(A2:A31,B2:B31)
One cell, one answer — but only trust it once you've looked at the scatterplot.
Spearman ρ, via ranks
In helper columns, rank each variable, averaging ties:
=RANK.AVG(A2,$A$2:$A$31,1) filled down for X, and the same pattern for Y in another column.
Then run CORREL on the two rank columns — that result is Spearman's ρ.
Significance test for Pearson r
With r in cell D2 and n = 30:
=D2*SQRT((30-2)/(1-D2^2)) for t, then =T.DIST.2T(ABS(t_cell),28) for the two-tailed p-value.
Compare the p-value to your chosen α to decide whether the correlation is statistically distinguishable from zero.
Kendall's tau, built by hand
Excel has no native Kendall function. Build an n×n helper grid of SIGN of each pairwise X-difference times the SIGN of the matching Y-difference, then use SUMPRODUCT to count how many pairs are +1 (concordant) vs. −1 (discordant), and apply the tau-b formula from this lesson by hand. For anything beyond a small teaching example, use statistical software instead.
Minitab Navigation
| Task | Menu path | Notes |
|---|---|---|
| Pearson or Spearman correlation | Stat → Basic Statistics → Correlation | Enter two or more numeric columns; the dialog's Method option lets you choose Pearson (default) or Spearman rank correlation, plus a significance test for each pair. |
| Check linearity/monotonicity first | Graph → Scatterplot | Alternative/companion step. Always view the scatterplot — with or without a fitted line — before trusting a correlation number, since Minitab will compute r or ρ on any pair of columns whether or not the relationship is actually well-suited to it. |
| Kendall's tau between two variables | No dedicated menu item in standard Minitab Basic Statistics | Be transparent about this limitation: Minitab's built-in Correlation dialog covers Pearson and Spearman only. For a two-variable Kendall's tau, either compute it manually from ranks (as shown above) or use software with native support (e.g., R's cor(method="kendall") or Python's scipy.stats.kendalltau). Do not confuse this with Minitab's separate Kendall's Coefficient of Concordance, which measures agreement across multiple raters and is a different statistic. |
Which option should you choose? Start from the decision rule, not the menu: run Stat → Basic Statistics → Correlation with Method set to Pearson when you expect linearity and normality, switch the same dialog's Method to Spearman when the relationship is monotonic but not linear or the data are ordinal, and fall back to a manual or external Kendall's tau calculation for small, tie-heavy samples.
Exam Tips
- Correlation ≠ causation, every time it's tested. ASQ CSSBB/CQE items frequently plant a high r and ask what conclusion is defensible — the answer is rarely “X causes Y.”
- Match the assumption to the data before picking a formula. A question describing skewed, ordinal, or ranked engineering data (defect severity tiers, inspector scores) is cueing you toward Spearman or Kendall, not Pearson.
- Know why r can mislead. Exam scenarios love the “one extreme outlier” setup precisely because it shows Pearson's sensitivity — if the question hinges on a couple of unusual points, expect Spearman/Kendall to be the more defensible answer.
- Connect r to regression. r² (via
RSQ) is the proportion of variance in Y explained by a simple linear fit on X — a common bridge question between correlation and regression topics. - Ties matter for both real analysis and exam wording. If a scenario mentions repeated or tied ranks, that's the cue for Kendall's tau-b or a rank-based Spearman calculation, not the tie-naive shortcut formula.
- Statistical significance is not practical significance. A statistically significant correlation in a huge dataset can still be too weak to act on; always weigh the coefficient's size against engineering tolerances and cost of action.