Correlation: a complete guide

Analytika TeamLast reviewed 7 min read

Correlation answers a simple question: when one variable goes up, does the other tend to go up, go down, or do neither? It’s summarised in a single number, the correlation coefficient, which makes it one of the most widely reported statistics, and one of the most over-interpreted.

Reading a correlation coefficient

  • Sign = direction. Positive: both rise together (height and weight). Negative: one rises as the other falls (car weight and fuel economy).
  • Size = strength. 0 means no linear relationship, and ±1 means the points fall exactly on a line.
|r|Common label (Cohen, 1988)
around .10Small
around .30Medium
.50 and aboveLarge

These labels are rough guides. In some fields r = .20 is a meaningful finding, and in others r = .70 is disappointing. Squaring r gives r², the share of variance the two variables have in common: r = .50 means 25% shared variance.

Three correlation coefficients

Pearson’s r

Measures the strength of a linear relationship between two continuous variables. It’s the default, and it’s the one people mean by “correlation” without qualification. It assumes roughly normal variables and a straight-line pattern, and it’s sensitive to outliers. See Pearson correlation coefficient.

Spearman’s rank correlation (ρ, rho)

Pearson’s r calculated on the ranks of the data instead of the raw values. It measures any monotonic relationship, where one variable consistently rises or falls with the other, even along a curve. Use it for ordinal data, skewed data, outliers or curved relationships.

Kendall’s tau (τ)

Also rank-based, but it counts concordant and discordant pairs. It’s more robust with small samples and many tied values, and it tends to be smaller in size than Spearman’s ρ for the same data, so don’t compare the two directly.

Pearson vs Spearman on the same data

The mtcars dataset has 32 cars from 1974. Fuel economy falls as weight rises in a fairly straight line, so Pearson’s r = −.87. Fuel economy also falls as horsepower rises, but along a curve: the first extra horsepower costs more mpg than later ones. For that pair, Pearson’s r = −.78 while Spearman’s ρ = −.89. Spearman picks up the strong, consistent decline that a straight line describes less well.

When the two coefficients disagree noticeably, plot the data. The relationship is probably curved, or driven by a few extreme points.

Always plot first

Very different patterns can produce the same r. Anscombe (1973) made four small datasets with nearly identical means, variances and correlations (r ≈ .82): one a tidy linear cloud, one a smooth curve, one a perfect line with a single outlier, and one where a single point creates the entire correlation. A scatterplot shows which situation you’re in. A coefficient alone can’t.

Correlation does not imply causation

A correlation between A and B could arise because:

  • A causes B,
  • B causes A (reverse causation),
  • a third variable C causes both (confounding). Ice-cream sales and drownings both rise in summer, driven by hot weather.
  • or chance, especially when many correlations are tested.

Only an experiment with random assignment, or a careful design that rules out the alternatives, supports a causal claim. Phrases like “associated with” and “related to” are the honest language for correlations. Partial correlation or multiple regression can adjust for measured confounders, but never for unmeasured ones.

Correlation vs regression

Correlation treats the two variables symmetrically and gives one number for the strength of the relationship. Regression treats one as the outcome and gives an equation for predicting it: how much the outcome changes per unit of the predictor. With one predictor, the regression’s R² equals r².

How Analytika chooses

For two numeric columns, Analytika checks that both look normally distributed and that the relationship isn’t strongly curved (a Ramsey RESET test at α = .01). If both checks pass, it uses Pearson’s r. If either fails, or a variable is ordinal, it uses Spearman’s ρ and says why. It also flags influential points and shows the correlation without them, so one unusual case can’t quietly drive your result. Our free correlation calculator gives Pearson and Spearman side by side.

References

  • Anscombe, F. J. (1973). Graphs in statistical analysis. The American Statistician, 27(1), 17–21.
  • Cohen, J. (1988). Statistical power analysis for the behavioral sciences (2nd ed.). Lawrence Erlbaum.

More in Correlation

Try it with the free tools

Run this on your own data

Upload a dataset and ask your question in plain English. Analytika checks the assumptions, picks the test, runs it, and writes the results up in APA format.

Try it free