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.
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.