Professor Digitalfor studentsSign in

Correlation Explained: Pearson’s r and Spearman’s Rho With Examples

Reviewed by Prof. Dr. Alexander Holtermann · Updated 16 October 2026 · 6 min read

A correlation coefficient measures the strength and direction of a relationship between two variables, from −1 to +1. Correlation is not causation.

Key takeaways

  • Pearson’s r measures the linear relationship between two metric variables; Spearman’s rho uses ranks and works for ordinal data, monotonic relationships and outliers.
  • r ranges from −1 (perfect negative) through 0 (no linear relationship) to +1 (perfect positive). Cohen’s benchmarks: .10 small, .30 medium, .50 large.
  • r² is the proportion of shared variance: r = .84 means the two variables share 70% of their variance.
  • Significance is tested with t = r · √(n − 2) / √(1 − r²), df = n − 2. With small samples even large correlations have wide confidence intervals.
  • Correlation does not prove causation: a third variable, reverse causation or chance can explain a correlation.

What is a correlation?

Two variables are correlated when their values tend to vary together. In a positive correlation, higher values of one go with higher values of the other (study hours and exam score). In a negative correlation, higher values of one go with lower values of the other (exam anxiety and exam score).

The correlation coefficient summarizes this in one number between −1 and +1. The sign gives the direction, the absolute value the strength. Always look at a scatter plot first: the coefficient only captures one kind of pattern, and very different data sets can share the same r.

|r|Cohen (1988)Shared variance r²
.10small1%
.30medium9%
.50large25%
.70very large49%

Pearson’s r: formula and worked example

Pearson’s product-moment correlation standardizes the covariance by both standard deviations:

r = Σ(x − Mx)(y − My) / √(Σ(x − Mx)² · Σ(y − My)²)

Ten students report weekly study hours (x) and their exam score (y):

x: 2, 3, 5, 6, 7, 8, 10, 11, 12, 14 y: 55, 62, 58, 66, 61, 70, 68, 74, 65, 80

QuantityValue
MeansMx = 7.80, My = 65.90
Standard deviationsSDx = 3.94, SDy = 7.50
Sum of cross-products Σ(x − Mx)(y − My)222.80
Sums of squaresΣ(x − Mx)² = 139.60, Σ(y − My)² = 506.90
r222.80 / √(139.60 · 506.90) = .84
r².70
t-testt(8) = .84 · √8 / √(1 − .70) = 4.34, p = .002
95% CI (Fisher z)[.44, .96]

Spearman’s rank correlation

Spearman’s rho (r_s) is Pearson’s r computed on the ranks of the data instead of the raw values. It measures whether the relationship is monotonic (consistently increasing or decreasing), not necessarily linear.

Use Spearman when at least one variable is ordinal (e.g., a single Likert item, class rank), when the relationship is monotonic but curved, or when outliers would distort Pearson’s r. For the study-hours data, r_s = .79, p = .006, similar to Pearson because the relationship is roughly linear and there are no extreme outliers.

A third coefficient, Kendall’s tau, is also rank-based and is often preferred for small samples with many ties.

CoefficientDataMeasuresSensitive to outliers
Pearson’s rtwo metric variableslinear relationshipyes
Spearman’s rhoordinal or metricmonotonic relationshipmuch less
Kendall’s tauordinal or metric, many tiesmonotonic relationshipmuch less
Point-biserial rone binary, one metricmean difference (equivalent to t-test)yes
φ (phi)two binary variablesassociation in a 2 × 2 tablenot applicable

Assumptions and pitfalls

A correlation coefficient is easy to compute and easy to misread. Check these points before interpreting it.

  • Linearity: Pearson’s r only captures straight-line relationships. A perfect U-shaped relationship (e.g., arousal and performance) can have r ≈ 0.
  • Outliers: a single extreme point can create or destroy a correlation. Look at the scatter plot and compare with Spearman.
  • Restricted range: if you only survey top students, the correlation between study time and grades shrinks because the variance is limited.
  • Subgroups: pooling two groups with different means can create a correlation that exists in neither group (or reverse it, Simpson’s paradox).
  • Significance tests assume bivariate normality for Pearson’s r; with larger samples the test is robust.

Correlation is not causation

Ice cream sales and drowning deaths are correlated, because both rise in summer. This is the classic example of a confounding (third) variable. A correlation between study hours and grades might reflect that motivated students both study more and perform better, regardless of study time.

Other explanations for a correlation are reverse causation (good grades motivate students to study more) and chance, especially when you compute many correlations. Only an experiment with random assignment can establish causation. In correlational designs, write “is associated with” or “is related to”, not “leads to” or “increases”.

Partial correlation and sample size

A partial correlation measures the relationship between two variables while controlling for a third, for example study hours and exam score controlling for prior grade point average. It is a first step toward multiple regression, which can control for several variables at once.

For planning: to detect a medium correlation (r = .30) with α = .05 (two-sided) and power .80, the power analysis tool gives 85 participants; for a small correlation (r = .10), 783; for a large one (r = .50), 30.

How to report a correlation in APA style

Report r with two decimals and no leading zero, the degrees of freedom (n − 2) in parentheses, the p-value and ideally the confidence interval. For several variables, a correlation table with M and SD in the first columns is standard.

Doing this in SPSS, R, JASP or Excel

Pearson’s r and Spearman’s rho are the same in every program. Ask for the p-value and, ideally, a confidence interval, and always look at a scatterplot first.

ProgramHow to run it
SPSSAnalyze → Correlate → Bivariate; tick Pearson and/or Spearman
Rcor.test(df$x, df$y); Spearman: method = "spearman"
JASP / jamoviRegression → Correlation; tick Pearson or Spearman, confidence intervals and scatter plots
ExcelCORREL(range1, range2) gives r, but no p-value or confidence interval

Frequently asked questions

What is a strong correlation?

By Cohen’s benchmarks, |r| ≈ .10 is small, .30 medium and .50 or more large. In some fields, such as test-retest reliability, much higher values are expected, so compare with your research area.

When should I use Spearman instead of Pearson?

When a variable is ordinal, when the relationship is monotonic but not linear, or when outliers or strong skewness would distort Pearson’s r.

What does r² mean?

r² is the proportion of variance the two variables share. r = .50 means r² = .25, so 25% of the variance in one variable is linearly related to the other.

Can a correlation be significant but weak?

Yes. With large samples even r = .10 can be significant. Significance says the correlation is probably not zero; r says how strong it is.

Does a correlation of 0 mean there is no relationship?

It means there is no linear relationship. A curved relationship can still exist, which is why you should always check a scatter plot.

Sources and further reading

  • Cohen, J. (1988). Statistical Power Analysis for the Behavioral Sciences (2nd ed.). Lawrence Erlbaum.
  • Agresti, A., & Finlay, B. (2018). Statistical Methods for the Social Sciences (5th ed.). Pearson.
  • Howell, D. C. (2013). Statistical Methods for Psychology (8th ed.). Wadsworth Cengage Learning.

Your university’s examination regulations and style guide always take precedence.

Related articles