Loading...
Loading...
Calculate Pearson, Spearman, and Kendall correlation coefficients with scatter plot visualization, significance testing, and Python code.
Separate numbers with commas, spaces, or new lines
Enter X and Y values above, or load an example dataset.
Supports comma, space, or newline-separated values. Minimum 3 data pairs.
No. Correlation measures the strength and direction of a linear relationship between two variables, but it does not prove that one variable causes changes in the other. A strong correlation can be due to a lurking third variable (confounder), coincidence, or reverse causation. Always use controlled experiments or causal inference methods to establish causality.
Use Spearman when your data is ordinal (ranked), when the relationship is monotonic but not linear, or when outliers are present. Spearman is a non-parametric measure that works on ranks, so it is robust to outliers and does not assume normality. Pearson is best when both variables are continuous and the relationship is approximately linear.
R-squared is the square of the Pearson correlation coefficient (r). It represents the proportion of variance in the dependent variable explained by the independent variable. For example, r = 0.9 gives R-squared = 0.81, meaning 81% of the variance in Y is explained by X. The remaining 19% is unexplained variation.
The p-value tests the null hypothesis that the true correlation is zero. A p-value < 0.05 means the correlation is statistically significant at the 5% level. However, statistical significance does not mean practical significance. A very large sample can make a tiny correlation (e.g., r = 0.05) statistically significant even though it has negligible practical value.
Kendall tau measures the ordinal association between two variables by counting concordant and discordant pairs. It is preferred over Spearman when the sample size is small (n < 20), when there are many tied ranks, or when you want a more robust measure of concordance. Its values tend to be smaller than Spearman rho for the same data.