How it works
The Pearson correlation coefficient r measures how closely two variables follow a straight-line relationship. It ranges from −1 (perfect negative line) through 0 (no linear relationship) to +1 (perfect positive line).
r² is the share of the variation in one variable that is explained by a linear relationship with the other. An r of 0.8 gives r² = 0.64, so 64% of the variation is explained.
Correlation does not imply causation, and Pearson’s r only detects linear patterns. A strong curved relationship can still have an r near zero, so it is worth plotting the data too.
Formula
r = Σ(x − x̄)(y − ȳ) ÷ √( Σ(x − x̄)² × Σ(y − ȳ)² )
Questions people ask
What counts as a strong correlation?
A common rule of thumb: |r| above 0.7 is strong, 0.5–0.7 moderate, 0.3–0.5 weak and below 0.3 very weak. What matters in practice depends on the field.
Is Pearson’s r affected by outliers?
Yes, strongly. A single extreme point can create or hide a correlation. Spearman’s rank correlation is a more robust alternative.
Does the order of the lists matter?
No. Swapping X and Y gives the same r, but each X must line up with its matching Y.