The correlation coefficient measurements the goodness of fit of a set of pointsto a straight line but two quantities may in fact observe a perfect correlation without all the points lying on a straight line. The quantities x and y have a perfect though non linear relationship as shown on the graph below. The relationship is perfect for the ranges of x and y in that if x increases then so does y.

The correlation between variablesandthat have a non linear relationship may be better expressed by a function of the variables called the rank correlation coefficient. The rank correlation coefficient is found by ordering thein terms of size, labelling themEachhas a correspondingbut when theare put into order themay not have the same order as theSuppose thehave ranksLabel the ranks of theas(though we may in fact take them as).

For eachfindand find

in some order and each of these is equal toso

in some order and each of these is equal to

and similarly for

Spearman’s Rank correlation coefficient is given by