1001Ferramentas
šŸ”— Calculators

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

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.