🔗
advancedintermediate30 min

Pearson vs Spearman vs Kendall Correlation Coefficient: Formulas, Differences, and Which to Use

Three correlation coefficients dominate statistical practice — Pearson, Spearman, and Kendall. They measure different things and work with different data types. Learn the formulas, the assumptions, when each is appropriate, and the worked examples that show exactly when they agree and disagree.

What You'll Learn

  • State the formula and assumptions for Pearson, Spearman, and Kendall correlation
  • Choose the appropriate correlation coefficient based on data type and distribution
  • Calculate each coefficient by hand for small datasets
  • Interpret correlation magnitudes using established thresholds
  • Recognize when two coefficients agree vs disagree and why

1. Direct Answer: The Three Correlations in One Paragraph

Pearson correlation (r) measures linear association between two continuous variables. Formula: r = Σ(x - x̄)(y - ȳ) / √(Σ(x - x̄)² × Σ(y - ȳ)²). Ranges from -1 to +1. Assumes both variables are normally distributed and the relationship is linear. Sensitive to outliers. Spearman correlation (ρ or r_s) measures monotonic association between two variables using ranked data. Calculate Pearson correlation on the ranks. Ranges -1 to +1. No distributional assumptions; works with ordinal data or non-normal continuous data. Detects monotonic but non-linear relationships that Pearson misses. Kendall correlation (τ) measures monotonic association based on concordant and discordant pairs. τ = (C - D) / (n(n-1)/2), where C is the count of concordant pairs and D is the count of discordant pairs. Ranges -1 to +1. No distributional assumptions; more robust than Spearman for small samples and ties; more intuitive interpretation (τ is literally the probability difference between concordance and discordance). When to use each: Pearson for continuous, normally distributed, linear relationships (and if outliers are controlled). Spearman for non-normal continuous data, ordinal data, or when the relationship may be monotonic but non-linear. Kendall when sample size is small (under 30-40), when there are many tied values, or when you want a more robust and interpretable measure. In large samples with clean data, all three typically agree in sign and approximate magnitude. This content is for educational purposes only and does not constitute statistical advice.

Key Points

  • Pearson: linear, continuous, normal — most common but strict assumptions
  • Spearman: monotonic, ranks — widely used alternative when assumptions fail
  • Kendall: concordance-based, small samples — robust and interpretable
  • All three range -1 to +1 and have same sign in most datasets
  • Choice depends on data type, distribution, outliers, and sample size

2. Pearson Correlation: The Classic

Formula: r = Σ(xᵢ - x̄)(yᵢ - ȳ) / √(Σ(xᵢ - x̄)² × Σ(yᵢ - ȳ)²) Or equivalently: r = Cov(X,Y) / (σ_X × σ_Y) Pearson measures the strength and direction of a LINEAR relationship between two continuous variables. A positive r means both variables tend to increase together; negative means one increases while the other decreases; zero means no linear relationship. Assumptions: 1. Both variables are continuous (interval or ratio scale) 2. Both variables are normally distributed (or approximately so) 3. Relationship between them is linear 4. No extreme outliers (r is highly sensitive to outliers) 5. Homoscedasticity (variance of y is roughly constant across x) Violations of these assumptions can produce misleading r values. Worked example: heights (x) and weights (y) of 6 adults. x: 60, 62, 65, 68, 70, 72 (inches) y: 115, 130, 145, 160, 170, 185 (lbs) x̄ = 66.17, ȳ = 150.83 Deviations and products: (60-66.17)(115-150.83) = -6.17 × -35.83 = 221.07 (62-66.17)(130-150.83) = -4.17 × -20.83 = 86.86 (65-66.17)(145-150.83) = -1.17 × -5.83 = 6.82 (68-66.17)(160-150.83) = 1.83 × 9.17 = 16.78 (70-66.17)(170-150.83) = 3.83 × 19.17 = 73.42 (72-66.17)(185-150.83) = 5.83 × 34.17 = 199.21 Σ(x-x̄)(y-ȳ) = 604.16 Σ(x-x̄)² = 38.07 + 17.39 + 1.37 + 3.35 + 14.67 + 33.99 = 108.84 Σ(y-ȳ)² = 1283.76 + 434.08 + 33.99 + 84.09 + 367.48 + 1167.59 = 3370.99 r = 604.16 / √(108.84 × 3370.99) = 604.16 / √366,891.79 = 604.16 / 605.72 = 0.997 Very strong positive linear correlation, as expected for height and weight in adults. Interpret: as height increases, weight tends to increase linearly. Effect size interpretation (Cohen's conventions): - r = ±0.1: small - r = ±0.3: medium - r = ±0.5: large - r = ±0.7+: very large Coefficient of determination (r²) = 0.994 in this example. 99.4% of variance in weight is explained by variance in height (very unrealistic for real data, but illustrates the principle).

Key Points

  • Pearson formula uses deviations from mean
  • Assumes continuous, normal, linear, no outliers
  • r² tells you proportion of variance explained
  • Cohen's thresholds: 0.1 small, 0.3 medium, 0.5 large
  • Highly sensitive to outliers — a single outlier can radically shift r

3. Spearman Correlation: The Rank Version

Spearman correlation is simply Pearson correlation computed on the ranks of the data. This has two consequences: 1. No distributional assumptions — ranks don't care whether the original data is normal, skewed, or bimodal. 2. Detects monotonic non-linear relationships — if y is a non-linear monotonic function of x (like y = x² for positive x, or y = log(x)), Pearson will understate the association but Spearman will pick it up. Formula (when no ties): ρ = 1 - (6 × Σd²) / (n × (n² - 1)) Where d = difference between the ranks of each pair, and n = number of pairs. With ties, use the Pearson formula applied to the ranks. Worked example: data showing a non-linear but monotonic relationship. x: 1, 2, 3, 4, 5, 6 y: 1, 8, 27, 64, 125, 216 (y = x³) Ranks: since the order matches exactly, rank of x_i = i, rank of y_i = i. All d values = 0. ρ = 1 - (6 × 0) / (6 × 35) = 1.0 Perfect Spearman correlation. Pearson for this data would be less than 1.0 because the relationship is non-linear (cubic). This demonstrates Spearman's key advantage: it captures monotonic association regardless of linearity. When Spearman outperforms Pearson: - Relationship is monotonic but clearly non-linear (e.g., exponential growth) - Data has outliers that bias Pearson - One or both variables are ordinal (cannot assume interval scale) - Data is non-normal (skewed, bimodal) When Pearson outperforms Spearman: - Data is truly linear and meets Pearson's assumptions - You care about the specific shape (magnitude, not just direction) of the relationship - Coefficient of determination (r²) interpretation is needed For most real-world data analysis, computing both and comparing is informative. If they agree, report Pearson (more interpretable). If they disagree substantially, investigate why (outliers, non-linearity) and typically report Spearman with an explanation. This content is for educational purposes only and does not constitute statistical advice.

Key Points

  • Spearman = Pearson applied to ranks
  • No distributional assumptions
  • Detects monotonic relationships that Pearson misses
  • Simple formula when no ties: 1 - 6Σd²/(n(n²-1))
  • Less sensitive to outliers than Pearson

4. Kendall Tau: The Concordance Measure

Kendall's tau uses a different mathematical foundation — counting concordant and discordant pairs. A concordant pair is two data points where the variables move in the same direction (both higher or both lower). A discordant pair is two data points where the variables move in opposite directions. Formula (no ties): τ = (C - D) / (n(n-1)/2) Where C = number of concordant pairs, D = number of discordant pairs, and n(n-1)/2 is the total number of possible pairs. τ ranges from -1 (all pairs discordant) to +1 (all pairs concordant), with 0 indicating random association. Worked example: 5 data points. (x, y) pairs: (1,2), (2,4), (3,3), (4,6), (5,5) List all pairs and classify: (1,2)-(2,4): x increases (1→2), y increases (2→4). Concordant. (1,2)-(3,3): x increases, y increases (2→3). Concordant. (1,2)-(4,6): x increases, y increases (2→6). Concordant. (1,2)-(5,5): x increases, y increases (2→5). Concordant. (2,4)-(3,3): x increases (2→3), y decreases (4→3). Discordant. (2,4)-(4,6): x increases (2→4), y increases (4→6). Concordant. (2,4)-(5,5): x increases (2→5), y increases (4→5). Concordant. (3,3)-(4,6): x increases, y increases (3→6). Concordant. (3,3)-(5,5): x increases, y increases (3→5). Concordant. (4,6)-(5,5): x increases (4→5), y decreases (6→5). Discordant. Concordant: 8. Discordant: 2. Total pairs: n(n-1)/2 = 5×4/2 = 10. τ = (8 - 2) / 10 = 0.6 Interpretation: τ has an intuitive interpretation as a probability. τ = 0.6 means that for a random pair of observations, the probability of concordance minus the probability of discordance is 0.6. Or equivalently, if you randomly pick two pairs, the ranks are 80% concordant and 20% discordant (because (C + D)/10 = 1, and C - D = 6 means C = 8 = 80%, D = 2 = 20%). Kendall vs Spearman: for most data they produce similar rankings of variable pairs. Kendall is preferred when: - Sample size is small (under 30-40) - There are many tied values - Robustness against distribution assumptions is critical - The interpretation as 'probability of concordance minus discordance' is useful Kendall τ values tend to be smaller in magnitude than Spearman ρ for the same data. This is not a defect — it reflects different measurement scales. Don't directly compare Kendall and Spearman numbers; use the appropriate one for your situation.

Key Points

  • τ based on counting concordant vs discordant pairs
  • Formula: (C - D) / (n(n-1)/2)
  • Range: -1 to +1
  • Intuitive interpretation: net probability of concordance
  • Kendall values typically smaller than Spearman on same data

5. When to Use Which: Decision Framework

Decision tree: Step 1: What's your data type? - Both variables continuous, interval/ratio scale → proceed to step 2 - At least one variable ordinal → Spearman or Kendall (not Pearson) - Nominal data → correlation is not appropriate; use chi-square or other measures Step 2: Is the relationship linear? - Yes, clearly linear → proceed to step 3 - No, but monotonic (always increases or always decreases) → Spearman or Kendall - Non-monotonic → correlation is not appropriate; consider regression with polynomial terms or non-linear models Step 3: Are both variables approximately normally distributed? - Yes → Pearson is the best choice - No, skewed or non-normal → Spearman or Kendall Step 4: Are there outliers? - No outliers → Pearson (with other assumptions met) - Outliers present → Spearman or Kendall (robust to outliers) Step 5: Is sample size large (n ≥ 40)? - Yes → Pearson or Spearman generally work well - No (small sample) → Kendall is preferred (better small-sample properties) Final recommendations: For standard linear analysis with normal, large data: Pearson. For non-normal data, ordinal data, or suspected non-linear monotonic: Spearman. For small samples (n < 30-40) or many ties: Kendall. For complete analyses reporting multiple correlations: compute all three. Divergence between them is informative — it reveals non-linearity, outliers, or distributional issues. This content is for educational purposes only and does not constitute statistical advice.

Key Points

  • Data type first — nominal data needs different measures
  • Linear vs monotonic determines Pearson vs Spearman
  • Non-normal distributions favor Spearman or Kendall
  • Small samples (under 40) favor Kendall
  • Computing all three reveals data structure

6. Common Pitfalls and Best Practices

Common mistakes: 1. Using Pearson when it's inappropriate. Applying Pearson to non-normal data, ordinal variables, or relationships with obvious outliers produces misleading results. Always examine your data visually (scatterplot) before choosing a correlation coefficient. 2. Interpreting correlation as causation. No correlation coefficient establishes causation, regardless of magnitude. This is first-week statistics content but constantly forgotten. Correlation only quantifies association. 3. Over-interpreting small correlations. r = 0.1 or r = 0.15 in a large sample can be statistically significant but explains less than 2% of variance. Statistical significance and practical importance are different things. 4. Ignoring non-linearity. A near-zero Pearson correlation doesn't mean no relationship — it means no LINEAR relationship. A U-shaped relationship can have r = 0 while still being a strong non-linear association. Always plot your data. 5. Sample size effects on significance. The p-value for a correlation depends on both magnitude and sample size. Very large samples produce statistical significance for trivial correlations. Report effect size (the coefficient itself) alongside any p-value, not instead of it. 6. Attenuation from measurement error. Unreliable measurements systematically understate correlation (the attenuation phenomenon). If your variables have substantial measurement error, true correlations are higher than observed. In reliability-focused contexts, use disattenuated correlation formulas. 7. Using correlation when regression would be better. Correlation measures association symmetrically (same result regardless of which variable is X or Y). Regression measures how one variable predicts another — different question, different interpretation. Best practices: 1. Always plot the data first (scatterplot). 2. Choose the coefficient based on data properties, not habit. 3. Report the coefficient, sample size, and confidence interval (not just p-value). 4. State which coefficient you used and why. 5. For non-standard situations, compute and report multiple coefficients. This content is for educational purposes only and does not constitute statistical advice.

Key Points

  • Always plot data before choosing a correlation measure
  • Correlation does NOT establish causation
  • Non-linear relationships can have near-zero Pearson
  • Report coefficient + sample size + CI, not just p-value
  • State which coefficient you used and the rationale

Key Takeaways

  • Pearson r: linear association, continuous normal data
  • Spearman ρ: monotonic association, ranked data (Pearson on ranks)
  • Kendall τ: concordant minus discordant pairs / total pairs
  • All three range from -1 to +1
  • Pearson is sensitive to outliers; Spearman and Kendall are robust
  • Cohen's thresholds (r): 0.1 small, 0.3 medium, 0.5 large
  • r² = proportion of variance explained
  • Spearman formula (no ties): 1 - 6Σd²/(n(n²-1))
  • Kendall τ has intuitive probability interpretation
  • Pick based on data type, distribution, outliers, sample size

Practice Questions

1. A dataset has heavy outliers and one variable is ordinal (1-5 Likert scale). Which correlation coefficient is most appropriate?
Spearman or Kendall. Pearson is inappropriate because (1) Likert scales are ordinal, not interval — the distance between '1' and '2' isn't guaranteed to equal the distance between '4' and '5'; and (2) Pearson is sensitive to outliers. Spearman is the standard choice in this situation; Kendall is preferred if the sample is small or has many ties.
2. Calculate Spearman correlation for: x = [1,2,3,4,5], y = [2,4,6,8,10]. Use the simple formula.
Ranks of x: 1,2,3,4,5. Ranks of y: 1,2,3,4,5. All d = 0, so Σd² = 0. ρ = 1 - (6×0)/(5×24) = 1.0. Perfect positive correlation — the ranks are identical, meaning the variables are perfectly monotonically related.
3. If Pearson r = 0.6 and Spearman ρ = 0.85 on the same data, what does this discrepancy suggest?
The relationship is monotonic but non-linear. Spearman captures the full rank-order agreement (0.85) while Pearson measures only the linear component (0.6). The data likely has an exponential, logarithmic, or polynomial shape. Plot the data to see the actual functional form. If non-linear but monotonic, report Spearman. If you need to characterize the functional form, fit a non-linear regression.
4. What's the key advantage of Kendall τ over Spearman ρ?
Kendall has better small-sample properties (more robust inference with n < 30-40), handles ties more elegantly in its formulation, and has an intuitive probabilistic interpretation (τ equals probability of concordance minus probability of discordance). Spearman's advantage is more widely recognized and simpler to calculate for large samples without ties. In practice, both give similar rank-order conclusions; Kendall is preferred for small or tie-heavy samples.
5. Why shouldn't you interpret a correlation as causation?
Correlation only measures statistical association between two variables — it doesn't establish causal direction, rule out reverse causation, or eliminate confounding. Variables can correlate due to: (1) direct causation A → B; (2) reverse causation B → A; (3) shared cause C → both A and B; (4) coincidence in a small sample. Establishing causation requires experimental design, instrumental variables, natural experiments, or carefully controlled observational studies that rule out alternative explanations. Even strong correlations (r > 0.9) don't establish causation without additional evidence.

Study with AI

Get personalized help and instant answers anytime.

Download StatsIQ

FAQs

Common questions about this topic

Technically, Pearson assumes interval-scale data, while Likert scales are ordinal. However, it's extremely common in practice — especially for 5-point or 7-point Likert scales with approximately normal distributions — to compute Pearson anyway. The pragmatic answer: for purely ordinal data with small range (e.g., 1-3), use Spearman or Kendall. For larger Likert scales (1-7 or 1-10) that approximate continuous measurement, Pearson is acceptable if the data is roughly normal. The strict answer: use Spearman if you want to be methodologically defensible.

For Pearson: no LINEAR relationship between the variables. It does NOT mean no relationship — there could be a strong non-linear relationship (U-shaped, V-shaped, or other non-monotonic pattern) that Pearson misses entirely. Always plot your data. A scatterplot of a perfect parabola (y = x² for x in [-5, 5]) has Pearson r = 0 despite being deterministically related. For Spearman and Kendall: r = 0 means no monotonic relationship — still possible to have a symmetric non-monotonic relationship undetected.

Report: the coefficient (r, ρ, or τ as appropriate), the sample size (n), a 95% confidence interval for the coefficient, and the p-value (two-tailed unless you have a specific directional hypothesis). Format varies by journal but commonly: 'r = 0.72, 95% CI [0.58, 0.83], n = 60, p < .001.' Always state which coefficient you used and why ('Spearman correlation was used because the variables were non-normally distributed'). For multiple correlations, present a correlation matrix.

Yes — all three coefficients (Pearson, Spearman, Kendall) are bounded between -1 and +1. Exact values of ±1 occur only when variables are perfectly related (deterministic relationship). In real data, perfect correlations typically indicate redundant variables or data errors. Most real-world meaningful correlations fall between ±0.1 and ±0.8. Values above ±0.9 often indicate that two variables are measuring essentially the same thing (multicollinearity concern in regression).

Yes. Snap a photo of your data or describe your variables, and StatsIQ identifies the appropriate correlation coefficient based on data type, distribution, sample size, and presence of outliers. It calculates Pearson, Spearman, and Kendall, compares the results, and explains any discrepancies (suggesting non-linearity, outliers, or distributional issues). Also provides interpretation with effect size thresholds and confidence intervals. This content is for educational purposes only and does not constitute statistical advice.

More Study Guides