# Question Video: Understanding Spearman’s Rank Correlation Coefficient Mathematics

True or False: When Spearman’s rank correlation coefficient for two groups of data equals 1, it means that the data points perfectly lie on a straight line.

01:18

### Video Transcript

Is it true or false that when Spearman’s rank correlation coefficient for two groups of data equals one, it means that the data points perfectly lie on a straight line?

We know that when Spearman’s rank correlation coefficient is equal to one, we have perfect agreement between the ranks of the data. And if Spearman’s rank correlation coefficient is equal to one, then the term containing the sum of the differences squared must be equal to zero. So let’s look at this final example. Suppose we have the time in minutes it took for five students to take a test and their marks as a percentage. And now suppose we rank both our time and our marks, taking the shortest time and the lowest marks as one and the highest as five. And now, if we calculate the difference in ranks, each of the differences are zero because the ranks are in perfect agreement.

Now, if we square all the differences, each of these is equal to zero because zero squared is zero. And so the sum of the differences squared is also zero. And if we put this into our formula, the sum of the 𝑑 𝑖 squared is equal to zero, so the second term is equal to zero as we would expect. But now suppose we plot our original data. We can see from our scatter plot that although Spearman’s rank is equal to one, the data points themselves do not lie perfectly on a straight line. And this means that our statement is false.