Pearson Correlation Coefficient
Compute Pearson correlation coefficient r between X and Y lists.
r = —
Pearson correlation coefficient (r)
Pearson's r tells you how strong a linear relationship between two variables is, and which way it points: r = Σ((xᵢ−x̄)(yᵢ−ȳ)) / √(Σ(xᵢ−x̄)²·Σ(yᵢ−ȳ)²). It always falls in [−1, 1]. A value of +1 is a perfect positive linear correlation, −1 a perfect negative one, and 0 says there's no linear relationship at all. As a rough guide, |r| < 0.3 is weak, 0.3–0.7 moderate, anything above 0.7 strong. Square it and r² gives you the share of variance in Y that X accounts for. One warning worth repeating: correlation does not imply causation. Ice cream sales and drownings move together only because both climb when it gets hot. And there's Anscombe's quartet (1973), four datasets that all share r ≈ 0.82 yet look nothing alike when plotted. Plot your data before you trust the number.
Applications
You'll see it in regression analysis, in finance for measuring how assets move together when diversifying a portfolio, in medicine when hunting for confounding variables, in social research, and in feature selection for machine learning. When the data has outliers or the relationship is monotonic but not straight, reach for Spearman's rank correlation instead, the non-parametric cousin that handles both gracefully.
FAQ
r = 0 means independent variables? Not quite. It only rules out a linear relationship. A perfect parabola y = x² can land at r ≈ 0 even though X and Y are tied together exactly.
How many points do I need? Three is enough to compute r mechanically, but for inference that means anything you usually want n ≥ 30. With just a handful of points, r jumps around wildly.
Pearson or Spearman? Go with Pearson when the data is continuous, roughly normal, and the link looks linear. Switch to Spearman for ordinal data, monotonic relations that bend, or whenever outliers are in play.
Related Tools
Correlation Significance Test
Computes the significance test for the Pearson correlation coefficient, answering whether the observed correlation between two variables is real or could have arisen by chance. A correlation of 0.5 in a sample of 6 points is unimpressive; the same correlation in 600 points is very strong. The test converts r into a t value, with n−2 degrees of freedom, and returns the p-value. The tool computes r, the t statistic and the two-sided p-value. Enter the two series of paired values.
Pearson Spearman Correlation Calculator
Computes simultaneously Pearson product moment correlation and Spearman rank correlation coefficients between two variables.
Point-Biserial Correlation
Computes the point-biserial correlation coefficient, which measures the association between a continuous variable and a dichotomous (two-group) variable. It is, in fact, the Pearson correlation applied to the case where one variable takes only two values — so it ranges from −1 to +1 and carries the same interpretation. It shows up often in psychometrics, to assess how well a test item (right/wrong) discriminates between high- and low-scoring students. Enter the continuous values of each of the two groups.
CI for Correlation (Fisher z Transform)
Computes the confidence interval for a correlation coefficient using the Fisher z transformation. The sampling distribution of r is skewed, especially near −1 or +1, which prevents applying the usual symmetric margin. Fisher solved this with a transformation that makes the distribution approximately normal; you build the interval on that scale and then map back to r. The result is an asymmetric interval, narrower on the side near the extremes. Enter the coefficient r and the sample size.
Partial Correlation
Computes the partial correlation between two variables while controlling for the effect of a third. It's the tool against spurious correlations: ice cream sales correlate with drownings, but only because both rise in hot weather — controlling for temperature, the partial correlation drops to near zero. It removes the influence of the control variable from both and measures the direct association that remains. The tool returns the partial coefficient and its significance test. Enter the three paired series.
Spearman Correlation (ρ)
Compute Spearman rank correlation ρ between X and Y lists.
The results provided by this tool are for general informational and educational purposes only and do not constitute professional, financial, medical, legal, tax or accounting advice. Always confirm important decisions with a qualified professional and official sources.