Pearson Spearman Correlation Calculator
Computes simultaneously Pearson product moment correlation and Spearman rank correlation coefficients between two variables.
â
Pearson and Spearman correlation
Pearson's r measures how strongly two variables move together in a straight line: r = ÎŁ(xᾢ â xĚ)(yᾢ â Čł) / â(ÎŁ(xᾢ â xĚ)²¡Σ(yᾢ â Čł)²). It assumes interval data, and a single extreme point can drag it around. Spearman's Ď runs that same calculation on the ranks of x and y instead of the raw values. That makes it non-parametric: it picks up any monotonic relationship, not just a linear one, and it shrugs off outliers. Both coefficients sit in [â1, 1], where â1 is a perfect negative trend, 0 means no monotonic association, and +1 a perfect positive one. Warning: Anscombe's quartet (1973) put together four datasets that all share r â 0.82 yet look completely different on paper. So don't read r without plotting the points first. And a correlation, however tight, says nothing about cause.
Applications
You'll find it in epidemiology, pairing a risk factor against an outcome. Finance leans on it for asset correlations and portfolio diversification. In machine learning it helps with feature selection and spotting collinearity. Psychometrics uses it to validate questionnaires, and A/B tests use it on related metrics. Really, any exploratory pass that screens two numeric variables for a relationship tends to start here.
FAQ
Pearson or Spearman, which one? Reach for Pearson when the relationship looks roughly linear and there are no wild outliers. Switch to Spearman if the trend is monotonic but curved, if your data is ordinal, or if a few outliers are throwing things off.
What counts as a "strong" correlation? Cohen's rough convention puts |r| â 0.1 as small, 0.3 as medium, and 0.5 as large. The bar really depends on your field, though. A physicist might call 0.9 weak, while in the social sciences 0.3 already turns heads.
Does r = 0 mean there's no relationship at all? Not necessarily. All it rules out is a linear one. Take a clean parabola y = x² on [â1, 1]: it gives r = 0, yet the relationship is completely deterministic. This is exactly why you plot the points.
Related Tools
Pearson Correlation Coefficient
Compute Pearson correlation coefficient r between X and Y lists.
Spearman Correlation (Ď)
Compute Spearman rank correlation Ď between X and Y lists.
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.
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.
Clopper-Pearson Binomial CI (Exact)
Computes the exact Clopper-Pearson confidence interval for a binomial proportion. Unlike the Wald formula and even Wilson's, which are approximations, Clopper-Pearson is built directly on the binomial distribution, guaranteeing coverage of at least the nominal level â which is why it's regarded as the reference conservative interval. It's the choice when you need a rigorous guarantee, even with small samples. Enter the successes, the total and the confidence level.
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.