The Spearman Correlation Test

What it’s for:

The Spearman correlation coefficient (rs) tests for a linear correlation between two variables that need not be normally distributed (non-parametric test). A perfect linear relationship between the two variables would result in r = 1 (or r = -1 for a negative correlation), and no relationship between the two variables results in r = 0.

Assumptions/Cautions:

Data must be collected in pairs (i.e. both variables must be measured at the same time and place), and each pair of data must be independent.
Looks only for a linear relationship between the two variables.
Does not imply a cause and effect relationship.
When many tied ranks are present, it is more accurate to calculate RS by calculating the formula for Pearson correlation on ranked data (Zar 1996) rather than using the formula given below.
How to use it:

1) The Spearman correlation test uses the ranks of individual data points rather than their actual value. You therefore need to rank your data points. You will need a separate set of rankings for each variable. If two or more measurements have the same value (i.e. you have a tie), assign each point a ranking equal to the mean of the ranks being used. For example, if the values for ranks 2 and 3 are equal, both measurements are assigned a rank of 2.5, and the next measurement would receive rank 4. If the values for 5,6, and 7 are tied, all three receive a rank of 6, and the next measurement would receive a rank of 8. It makes no difference whether you rank your measurements from lowest to highest or highest to lowest.

2) Once you have ranked all of your X and Y values, you need to calculate the difference (di) between the X ranking and the Y ranking, for each pair of data.

3) The Spearman correlation coefficient, rs, can then be calculated as shown in the box at right (Zar 1996). Note that the sum in the denominator is calculated by squaring the difference between the rankings within each pair, and then summing these squared values. Remember that n is your sample size.

4) Estimate your p-value using a computer program or table of critical values. Note that the Spearman test uses sample size (n) rather than degrees of freedom.

5) Draw a conclusion based on your p-value. See also Types of Error.

MS Excel Tips:

Versions of MS Excel tested will not perform a Spearman correlation test directly. However, the Spearman correlation test is equivalent to performing a Pearson correlation test on your ranked data (Zar 1996). This has the additional advantage of dealing more accurately with tied ranks. The Pearson correlation is available in Excel through the CORREL or PEARSON functions, or under TOOLS DATA ANALYSIS Correlation from the menus. The value obtained should be compared to a table of critical values for rs, not r. Excel, or any other spreadsheet, makes calculation of sums and sums of squares infinitely simpler.

RETURN