# Spearman'S Rank Correlation Coefficient

Spearman’s Rank Correlation Coefficient
Spearman's rank correlation coefficient (r
) is a reliable and fairly simple method of testing
s
both the strength and direction (positive or negative) of any correlation between two
variables.
.
s
(a) Create a table with the column headings as in the example below. Rank each variable
in the tables, putting the rank in either column R1 or R2. In each case, give the highest
value 1, the next highest 2, and so on.
2
Variable 1
Rank (R1)
Variable 2
Rank (R2)
Difference, d, (R2-R1)
d
Where two or more variables are the same add the rank positions the number would have if
they were the next ones in the sequence, and then divide by the number of positions used.
Then continue the ranking as though all of the positions had been used. See the example
below:
Variable 1
Rank 1
If these were the next three numbers in the sequence
they’d use rank positions 3, 4 and 5. As they are the
25
4
same, add 3, 4 and 5 together and divide by the three
30
1
positions they use: 3+4+5 = 12 divided by 3 = 4.
25
4
25
4
28
2
Continue ranking from the next position, i.e. 6.
24
6
(b) Calculate the difference between the two ranks, d, and then square this, d2.
(c) Calculate your value for r
using the following formula:
s
2
6
d
where Σ = ‘sum of’,
 
 
r
1
=
and n = number of pairs of data
s
3
n
n
The value of r
should be between -1 (perfect negative correlation) and +1 (perfect
s
positive correlation). The nearer the value is to 0, the weaker the correlation.
This is not the end, however, as you must now test to see how likely it is that your
calculation is not just the result of chance. This is called significance testing. It
considers your result in relation to how much data you had. [These are called the
degrees of freedom, df. In Spearman's rank, df is the same as n.] The table, on the
next page, gives the critical values that are necessary to give different levels of
significance for values of n.