Correlation Analysis (Pearson, Spearman, Kendall)

Computes Pearson r, Spearman ρ and Kendall τ including p-values and confidence intervals.

Statusvalidated
Version1.0.0
Minitab equivalentStat > Basic Statistics > Correlation

Description

Complete correlation analysis for two variables: parametric Pearson r (linear relationship), rank-based Spearman ρ (monotone relationship) and Kendall τ (pair-based concordance measure). For each method the correlation coefficient, t- or z-statistic, two-sided p-value, r² and Fisher- or normal-approximated confidence interval are returned.

Formulas

Pearson
Pearson correlation coefficient: measures linear dependence
Spearman
Spearman ρ: Pearson correlation of ranks (using average ranks for ties)
Kendall
Kendall τ_b: concordant minus discordant pairs, normalised by tie-corrected maximum
t-Statistik
t-statistic for r and ρ; when |r| = 1 we set t = ±∞ and p = 0 (perfect-correlation special case)

Assumptions

  • For exact Pearson p-values: bivariate normality
  • Spearman/Kendall: only a monotone relationship is required
  • Observations are independent

Limitations

  • Correlation does not imply causation
  • Pearson is sensitive to outliers and non-linear relationships
  • For perfect correlation (|r| = 1) the classical t-formula is singular — the implementation must handle this special case robustly

References

  • Hollander, M., Wolfe, D. A., Chicken, E. (2013), Nonparametric Statistical Methods, 3rd Ed., Wiley
  • NIST/SEMATECH e-Handbook of Statistical Methods, Section 1.3.5.13