13 Research methods, statistics, critical review and evidence-based practice13.10 Correlation and regression

13.10.2 Pearson and Spearman correlation

3 min read2 figures

Written by Resident Doctor Committee · Published

Try it

Correlation, and the one point that changes it

Interactive

40 points with a sample correlation of 0.68, and one highlighted point at x 2.2 and y 1.4 which takes the correlation to 0.69.-4-2024-4-2024First measure

Highlighted point at 2.2, 1.4.

Correlation, all points
0.689
Without the highlighted point
0.675
One point is worth
0.014of correlation
Slope of the fitted line
0.758

A correlation is a number about a picture, and one point in the wrong place can move it further than the other 40 put together. Plot the data first, every time.

Slide r from 0 up to 0.9 and watch the points close in around the line. Then compare -0.5 with +0.5: the spread is the same and only the direction flips.

Choosing Pearson or Spearman

A correlation coefficient measures how two paired measures co-vary. It does not test a difference between groups.

Feature

Pearson

Spearman

Symbol

r

rho

Data

Two continuous, normally distributed variables

Ranked, ordinal, skewed or non-normal data

Relationship measured

Linear (straight-line trend)

Monotonic: consistently rising or falling, including curves

Method

Uses the raw values

Applies Pearson's formula to the ranks

Outliers

Strongly influenced

Less influenced, though not immune

  • Spearman's is used when the data break the parametric assumptions that Pearson's requires.

  • The choice of coefficient follows from the data (distribution, level of measurement, linearity) and says nothing about how strong the association turns out to be.

  • Kappa is Cohen's chance-corrected measure of agreement, not a correlation coefficient.

Range, sign and strength

  • Both r and rho are unitless and lie between -1 and +1; no value can fall outside that range.

  • The sign gives the direction: positive when both variables rise together, negative when one falls as the other rises.

  • The magnitude shows how closely the points follow a straight line, and reaches 1 only when every point lies on one.

  • A perfect falling straight line gives r = -1.

  • An r of 0 means no linear correlation, but it does not rule out a U-shaped relationship in which opposite trends cancel.

  • Strength is set by the absolute value of r, so a negative coefficient can be stronger than a positive one.

  • An absolute value of about 0.5 is a moderate correlation.

  • The weakest positive correlation is the smallest r above zero.

Each panel shows a different Pearson r from -1 to +1; the middle row shows that r stays the same even as the line's steepness changes, so r reflects scatter, not slope. DenisBoigelot , original uploader was Imagecreator, CC0, via Wikimedia Commons

Reading scatter plots

A scatter plot shows the direction, form and approximate strength of an association, but not the exact value of the coefficient.

Feature

Read from

Direction

The slope of the points

Strength

The size of r: how tightly the points cluster around a line

Linearity

Whether the cloud is straight and elliptical or bends

  • Points drifting upward with wide scatter around a gently rising fitted line show a weak positive correlation.

  • Points lying on a smooth curve show a real but non-linear association, so weak, strong, positive and negative do not apply.

What correlation cannot show

  • Causation: a strong positive Pearson correlation shows that two variables rise together linearly, not that either causes the other. Confounding, reverse causation and chance can all produce it.

  • Agreement: a high correlation between two instruments measuring the same construct shows only that the scores move together. It does not show agreement, reliability, which instrument is more valid, or that one can replace the other.

  • Two raters who always score five points apart have r = 1.0 yet never agree.

  • Agreement is assessed with Bland-Altman analysis, which plots paired differences against paired means, or with an absolute-agreement intraclass correlation coefficient.

  • Transitivity does not hold: knowing r for A with B and for B with C leaves r for A with C undetermined in both sign and size.

The upper and lower dashed lines mark the 95% limits of agreement, and the middle dashed line marks the mean difference between the two peak flow meters. Dekisugi, CC BY-SA 3.0, via Wikimedia Commons

Correlation and regression

  • A correlation coefficient measures linear association only; predicting one variable from another needs a regression equation.

  • The regression slope equals r multiplied by the ratio of the standard deviations, so no correlation gives a flat line with no predictive value.

  • Correlation is symmetrical and unitless, whereas regression gives the outcome and predictor distinct roles and keeps their units.

13.10.2 Pearson and Spearman correlation | MRCPsychiatrist