How to Calculate Spearman's Rank Correlation Coefficient
Draw your data table., Fill in the first two columns with your pairs of data. , In your third column rank the data in your first column from 1 to n (the number of data you have)., In your fourth column do the same as in step 3, but instead rank the...
Step-by-Step Guide
-
Step 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. ,, Give the lowest number a rank of 1, the next lowest number a rank of 2, and so on. , 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.
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. , 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.) ,, This value is Σd2. , If there were ties in any of previous steps, use the standard Spearman's Rank Correlation Coefficient formula instead: , It can vary between
-1 and
1.
Close to
-1
- Negative correlation.
Close to 0
- No linear correlation.
Close to 1
- Positive correlation.
Remember to divide by the exact total of results, then half it.
After, divide it by Σd2. -
Step 2: Fill in the first two columns with your pairs of data.
-
Step 3: In your third column rank the data in your first column from 1 to n (the number of data you have).
-
Step 4: In your fourth column do the same as in step 3
-
Step 5: but instead rank the second column.
-
Step 6: In the "d" column calculate the difference between the two numbers in each pair of ranks.
-
Step 7: Square each of the numbers in the "d" column and write these values in the "d2" column.
-
Step 8: Add up all the data in the "d2" column.
-
Step 9: Choose one of these formulae: If there was no tie in previous steps
-
Step 10: 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.
-
Step 11: Interpret your result.
Detailed Guide
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. ,, Give the lowest number a rank of 1, the next lowest number a rank of 2, and so on. , 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.
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. , 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.) ,, This value is Σd2. , If there were ties in any of previous steps, use the standard Spearman's Rank Correlation Coefficient formula instead: , It can vary between
-1 and
1.
Close to
-1
- Negative correlation.
Close to 0
- No linear correlation.
Close to 1
- Positive correlation.
Remember to divide by the exact total of results, then half it.
After, divide it by Σd2.
About the Author
Theresa Sanchez
A passionate writer with expertise in DIY projects topics. Loves sharing practical knowledge.
Rate This Guide
How helpful was this guide? Click to rate: