You are on page 1of 4

Spearman's rank correlation coefficient or Spearman's rho

The Spearman's rank-order correlation is the nonparametric version of the Pearson product-moment correlation.
Spearman's correlation coefficient, (ρ, also signified by rs) measures the strength and direction of association between
two ranked variables.

The formula is

where di = difference in paired ranks and n = number of cases. The formula to use when there are tied ranks is:

where i = paired score.

Procedure

1. Draw your data table. This will organize the information you need to calculate Spearman's Rank Correlation
Coefficient. You will need 6 Columns, with headers as shown below. As many rows as you have pairs of
data. Fill in the first two columns with your pairs of data.

2. In your third column rank the data in your first column from 1 to n (the number of data you have).
Give the lowest number a rank of 1, the next lowest number a rank of 2, and so on.

3. In your fourth column do the same as in step 3, but instead rank the second column.

If two (or more) pieces of data in one column are the same, find the mean of the ranks as if those pieces of data had
been ranked normally, then rank the data with this mean.

1
In the example at right, there are two 5s that would otherwise have ranks of 2 and 3. Since there are two 5s, take the
mean of their ranks. The mean of 2 and 3 is 2.5, so assign the rank 2.5 to both 5s.

4. In the "d" column calculate the difference between the two numbers in each pair of ranks. That is, if
one is ranked 1 and the other 3 the difference would be 2. (The sign doesn't matter, since the next step is to
square this number.)

5. Square each of the numbers in the "d" column and write these values in the "d2" column.

6. Add up all the data in the "d2" column. This value is Σd2 = 1+4+1 = 6
7. Choose one of these formulae: If there was no tie in previous steps, insert this value into the simplified
Spearman's Rank Correlation Coefficient formula

and replace the "n" with the number of pairs of data you have to calculate the answer.

If there were ties in any of previous steps, use the standard Spearman's Rank Correlation Coefficient formula
instead:

Interpret your result. It can vary between -1 and 1.

Solution

2
English Maths Rank Rank
d d2
(mark) (mark) (English) (maths)

56 66 9 4 5 25

75 70 3 2 1 1

45 40 10 10 0 0

71 60 4 7 3 9

62 65 6 5 1 1

64 56 5 9 4 16

58 59 8 8 0 0

80 77 1 1 0 0

76 67 2 3 1 1

61 63 7 6 1 1

Where d = difference between ranks and d2 = difference squared.

We then calculate the following:

We then substitute this into the main equation with the other information as follows:

3
as n = 10. Hence, we have a ρ (or rs) of 0.67. This indicates a strong positive relationship between the ranks
individuals obtained in the maths and English exam. That is, the higher you ranked in maths, the higher you ranked
in English also, and vice versa.

You might also like