Lesson 4 of 6 · 14 min

The Spearman rank correlation test

When the data are not normal, contain outliers or are already ranks, replace each value by its rank and correlate the ranks instead.

In short

  • The Spearman rank correlation rS r_S is essentially the Pearson correlation calculated on ranks; it is a non-parametric measure.
  • Rank each variable within its own sample, largest = 1. Tied values share the average of the ranks they occupy.
  • rS=1−6∑di2/[n(n2−1)] r_S = 1 - 6\sum d_i^2/[n(n^2-1)] , where di d_i is the difference in ranks for pair i.
  • Like r, rS r_S runs from −1 (rankings exactly reversed) to +1 (identical rankings).
  • Testing: small samples need a special table of critical values; for large samples (n > 30) use the usual t-statistic with n − 2 df.

Unlock this lesson free for 7 days

Create a free account to get 7 days of full access — every lesson, video, flashcard, mock and the question bank. No card needed.

The Spearman rank correlation test · Parametric and Non-Parametric Tests of Independence