Correlation vs Causation: Pearson vs Spearman

Correlation measures how two variables move together — but it doesn't tell you why. And there's more than one way to measure it. Here's what you actually need to know.

A correlation coefficient runs from −1 to +1: near +1 the two variables rise together, near −1 one rises as the other falls, near 0 there's no linear relationship. Simple — but two cautions trip people up.

Two ways to measure: linear vs rank

Pearson's r measures linear association — how tightly the points hug a straight line — from the raw values, so one extreme point can swing it hard. Spearman's ρ and Kendall's τ throw the raw values away and work on the ranks (1st, 2nd, 3rd…). That makes them measure any monotonic relationship — consistently up or down, even if it curves — and shrug off outliers. When Pearson and the rank measures disagree, the gap is the finding. Here are the two cases where they part ways.

Case 1 — a perfect climb that isn't a straight line

Practice sessions versus a skill score. Every session helps, but with diminishing returns — the classic learning curve:

Practice sessionsSkill score
115
228
338
554
868
1280
2091
3098

The ranking is flawless — more practice always means a higher score — so Spearman ρ = 1.00 and Kendall τ = 1.00. But the climb bends, so Pearson r = 0.90. Pearson isn't wrong; it's answering a narrower question ("how straight-line?") than the one you usually care about ("do they move together?"). Trust Pearson alone here and you'd under-rate a rock-solid relationship. Grab the data — practice_scores.csv — and try it.

A scatter of practice sessions versus skill score forming a smooth upward curve
Practice vs score — a smooth, strictly increasing curve.
Legend close-up: Pearson r = 0.90, Spearman rho = 1.00, Kendall tau = 1.00
The same plot's legend, zoomed: r = 0.90 but ρ = τ = 1.00 — a perfect ranking, an imperfect line.

Case 2 — one outlier that invents a correlation

Twelve home sales in one neighborhood. Eleven are ordinary mid-size houses; the twelfth is a mansion:

Home size (sq ft)Sale price ($k)
1,450445
1,520410
1,560470
1,610398
1,660455
1,700428
1,760462
1,810405
1,860449
1,910433
1,980420
8,2003,950

Among the eleven ordinary homes, size barely tracks price: Pearson r = −0.11 — essentially nothing. Add the single mansion and Pearson leaps to 0.996, screaming "near-perfect correlation." It's a mirage. The rank measures aren't fooled: Spearman ρ = 0.17 and Kendall τ = 0.09, still basically zero. The whole "correlation" rests on one high-leverage point — drop the mansion and it evaporates. Grab the data — home_sales_outlier.csv.

A scatter of eleven clustered homes plus one far-off mansion
Eleven ordinary homes in a cloud; one mansion out in the corner.
Legend close-up: Pearson r = 0.996, Spearman rho = 0.17, Kendall tau = 0.09
The same plot's legend, zoomed: r = 0.996 but ρ = 0.17, τ = 0.09 — the correlation is that one point.
Reading the gap. A high Spearman/Kendall with a lower Pearson usually means a curve (Case 1). A high Pearson with low Spearman/Kendall usually means an outlier or a few extreme points doing all the work (Case 2). Don't average them — ask which story your scatter tells.

What about Kendall's τ?

Kendall's τ is the other rank-based coefficient. Rather than correlating the ranks like Spearman, it counts concordant versus discordant pairs — for every two rows, do both variables agree on which is larger? Being rank-based, it tells the same story as Spearman (note ρ = τ = 1.00 in Case 1, and both near zero in Case 2). It usually runs a little smaller in magnitude, and it's the steadier choice for small samples or data with many tied values. Use Spearman when you want something on Pearson's familiar −1-to-+1 scale; reach for Kendall when you want the most robust, easy-to-defend number.

The trap: correlation isn't causation

Even a real, well-measured correlation doesn't tell you why. Two variables can move together because one causes the other, because a third factor drives both, or by sheer coincidence. Ice-cream sales correlate with drownings — not because cones are dangerous, but because hot weather drives both. A correlation is a starting point for a question, never the answer to it.

Always plot it. Anscombe's quartet famously shows four datasets with identical correlations but wildly different shapes — and Case 2 above is exactly why. A scatter plot catches the curve, the outlier, or the cluster that a single number hides.

In Stratum

Every coefficient above came straight from Stratum. On any scatter, switch on Correlation in the control bar to print Pearson, Spearman and/or Kendall — each with its p-value — right on the plot, exactly as in the figures here. Prefer a table? The Correlation analysis shows one method at a time, with a Method switch to compare them. Grab practice_scores.csv and home_sales_outlier.csv and see both cases for yourself.

Download Stratum

Frequently asked questions

When should I use Spearman instead of Pearson?

Use Spearman when the relationship is monotonic but curved, when the data is skewed, or when outliers would distort Pearson's r. Spearman works on ranks, so it's more robust.

Does correlation imply causation?

No. A strong correlation means two variables move together; it doesn't say one causes the other. A lurking third variable or coincidence can produce the same pattern.

What is a strong correlation?

Loosely, |r| above ~0.7 is strong, ~0.3–0.7 moderate, below ~0.3 weak — but always read it alongside a scatter plot and your sample size.

Can two variables be related but have zero correlation?

Yes — correlation only measures linear (Pearson) or monotonic (Spearman) association. A U-shaped relationship can have near-zero correlation while being perfectly real.

What’s the difference between Spearman and Kendall?

Both are rank-based, so they usually agree. Spearman correlates the ranks and shares Pearson’s −1-to-+1 scale; Kendall counts concordant vs discordant pairs, tends to run smaller in magnitude, and holds up better with small samples or many ties. Stratum offers both — you flip the Method switch to see each.

correlationstatistics-explained