Spearman's Rank Correlation
- Spearman’s rank correlation test can be used to determine whether there is correlation between variables when:
- Data is not quantitative, e.g. an abundance scale has been used rather than a count of individuals
- A visual inspection of data suggests a non-linear correlation
- Data may not be normally distributed
- Method:
- Step 1: Create a scatter graph and identify possible linear correlation
- Step 2: State a null hypothesis
- Step 3: Use the following equation to work out Spearman’s rank correlation coefficient r
Where:
- rs = Spearman’s rank coefficient
- D = difference in rank
- n = number of samples
- Step 4: Refer to a table that relates critical values of rs to levels of probability
- If the value calculated for Spearman’s rank is greater than the critical value for the number of samples in the data ( n ) at the 0.05 probability level (p), then the null hypothesis can be rejected, meaning there is a correlation between two variables
Worked example
A group of students conducted an experiment using quadrats to measure the abundance of different plant species in a neglected allotment. They wanted to see if there was correlation between the abundance of species C and D. When they looked at their data and plotted a scatter graph they saw some correlation.
Investigate the possible correlation using Spearman’s rank correlation coefficient.
Scatter graph showing the correlation between the abundance of species C and species D
Because the data was not normally distributed they decided to use Spearman’s rank correlation coefficient.
Null hypothesis: there is no correlation between the abundance of species C and species D.
-
- n = 10 because there are 10 quadrat samples
Quadrat | No. of individuals of species C | Rank for species C | No. of individuals of species D | Rank for species D | Difference in rank (D) | D2 |
1 | 36 | 7 | 25 | 6 | 1 | 1 |
2 | 1 | 1 | 4 | 1 | 0 | 0 |
3 | 23 | 5 | 8 | 4 | 1 | 1 |
4 | 51 | 10 | 32 | 9 | 1 | 1 |
5 | 26 | 6 | 27 | 7 | -1 | 1 |
6 | 8 | 2 | 5 | 2 | 0 | 0 |
7 | 43 | 9 | 35 | 10 | -1 | 1 |
8 | 12 | 3 | 6 | 3 | 0 | 0 |
9 | 20 | 4 | 10 | 5 | -1 | 1 |
10 | 41 | 8 | 29 | 8 | 0 | 0 |
∑D2 = 6 |
Step 1: Rank each set of data (rank 1 being the smallest data figure)
Step 2: Find the difference in rank between the two species, D
Step 3: Square the difference in rank, D2
Step 4: Add up the values of D2 to give ∑D2 (= 6)
Step 5: Substitute the appropriate numbers into the equation (remember n = 10)
Step 5: Refer to a table that relates values of rs to probability. Look for the 0.05 probability level with n = 10
n | 10 |
Critical value of rs | 0.65 |
-
- Because Rs = 0.964, it is greater than the critical value of 0.65
- The null hypothesis can be rejected, there is genuine positive correlation between the abundance of species C and D
Examiner Tip
You will be provided with the formula for Spearman’s rank correlation in the exam. You need to be able to carry out the calculation to test for correlation, as you could be asked to do this in the exam. You should understand when it is appropriate to use the different statistical tests that crop up in this topic, and the conditions in which each is valid.
Correlation does not always mean causation. Just because there is a correlation between the abundance of species C and species D it does not mean that the presence of species C causes the presence of species D.