Calculate Spearman's Rank Correlation Coefficient

This article was provided by wikiHow, a wiki building the world's largest, highest quality how-to manual. Please edit this article and find author credits at the original wikiHow article on how to calculate spearman's rank correlation coefficient. Content on wikiHow can be shared under a Creative Commons License.

Grade C Views 1,551
Last edited 2 months ago

Spearman's rank correlation coefficient allows you to identify easily the strength of correlation within a data set of two variables, and whether the correlation is positive or negative (whether the slope of the corresponding line is positive or negative). This guide will help you calculate it without too much difficulty.

Step 1  

Draw your table. You will need:  

  • 6 Columns, with headers as shown below.
  • as many rows as you have pairs of data. 

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). Give the lowest number a rank of 1, the next lowest number a rank of 2, and so on.

 

Step 4  

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. 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. 
 

Step 5  

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.)

 

Step 6  

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

 

Step 7  

Add up all the data in the "d" column. This value is Sd.

 

Step 8  

Insert this value into the Spearman's Rank Correlation Coefficient formula.

 

Step 9  

Replace the "n"s with the number of pairs of data you have and calculate the answer.

 

Step 10  

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

  • Close to -1 - Negative correlation.
  • Close to 0 - No linear correlation.
  • Close to 1 - Positive correlation.

Tips

  • Most data sets should contain at least 5 pairs of data in order to identifty a trend (3 were used for the example to make it easier to demonstrate)

Warnings

  • Spearman's rank correlation coefficient will only identify the strength of correlation where the data is consistantly increasing or decreasing. If a scatter graph of the data any other trend Spearman's rank will not give an accurate representation of its correlation.

Via wikihow

Creepy Crawler Ant Robot

Wow, this robot has incredible movement. "A-Pod is an ant inspired hexapod robot with a 2 DOF abdomen (tail), a 3 DOF head with large mandibles. 6 legs with 3 DOF each. Total 25 servos ...

Remote Control Your Lawn Mower

Time to make those lazy Sunday afternoons even lazier. Instructables member johndavid400 has posted a full HowTo on modding your lawn mower to operate via remote control. " ...How to make your ...

Why Buy a Car When You Can Build-It-Yourself?

BBC show Top Gear has built a homemade electric car in just 18 hours: the Hammerhead Eagle i-Thrust. According to Autocar,  "...the Hammerhead Eagle i-Thrust is a road legal car/shed that ...

Obama! Are You Eating that Chicken Wing Correctly?

Yes, there is a right way and a wrong way to eat a chicken wing. And yes, Obama likes chicken wings just like everybody else does. Here's how you do it, courtesy of Food Wishes (also, here's several ...

SPLAT! Art Made from Everyday Household Items

Tom Friedman. One of my very favorite contemporary artists. Friedman injects the wonder into the humdrum. He creates magic from the unsuspected with his incredible sculptures assembled from simple ...

loading...