User Tools

Site Tools



Statistical Tests Available

Correlation - Spearman's R Test

The Spearman's R Correlation Test (also called the Spearman's rank correlation coefficient) is generally used to look at the (roughly) linear relationship between two ordinal variables e.g. satisfaction ratings for staff and level of staff training. You should never run this test without viewing a scatterplot and visually examining the basic shape of the relationship. The test could indicate a low linear correlation and yet the data could have a very strong and clear non-linear pattern e.g. a U shape. The other thing to look for is outliers. The correlation coefficient could also be very high when the relationship is monotonic but not linear. See Scatterplot comparing Spearman and Pearson correlation.

Looking at the patterns below, we have a very strong linear relationship (A), a less strong linear relationship (B), and a weaker linear relationship (C). (D) is barely there, (E) is a very strong non-linear relationship, and (F) is an otherwise weak relationship with an important outlier. It should be noted that even though (C) might have a reasonably high R, that for any given x-axis value there is a considerable spread of y values. You couldn't really consider x as a proxy for y e.g. if you were comparing the results of a cheap and quick measurement tool against the results of an expensive and time-consuming measurement tool. Yes, they produce results with a reasonably high level of correlation, but it is still quite a loose relationship. Many more examples of patterns can be found here: Correlation examples.png.

You should always look at the scatter plot before interpreting the results. Sometimes completely different datasets can produce identical summary statistics (see Anscombe's quartet).

Two key things to note about the test are the p value and R. The p value tells you if you can reject the null hypothesis or not - namely, the hypothesis that there is no linear relationship. The R value gives an indication of the strength of the relationship. If the value is 0.7, we look at R squared to see how much the change in one variable is explained by change in the other - in this case 0.49 or less than half. Once again, it is always important to look at the scatterplot when interpreting the findings.

The Spearman's R Correlation Test is for data that is at least ordinal. If your data is numeric and adequately normal in distribution then the appropriate alternative is the Pearson's R Correlation Test.


Statistical Tests Available


help/spearmansr.txt · Last modified: 2012/04/21 17:47 (external edit)