Spearman’s Rank Correlation Coefficient - Bivariate Data Part 2

Education concept. Student studying and brainstorming campus con

Introduction

Depending on your exam board you may need to know about Spearman’s Rank. It would seem however that with the change in A Level Maths Curriculum this is now only reserved for those students who choose to do A Level Further Maths as well. 

However, he is an overview of the topic for those students. You need to be able to: 

Spearman's Rank - Rank Correlation

Suppose that there are three judges to a competition but one of the judges is not really a judge. 

There are six dancers in a competition and each judge gives a score out of 10. 

The table below shows the 6 dancers and the scores given by each judge: 

\begin{array}{|c|c|c|c|c|c|c|} \hline \text { Dancer } & 1 & 2 & 3 & 4 & 5 & 6 \\ \hline \text { Judge 1 } & \mathbf{7} & \mathbf{9} & \mathbf{5} & \mathbf{6} & \mathbf{4} & \mathbf{1 0} \\ \hline \text { Judge 2 } & \mathbf{7} & \mathbf{3} & \mathbf{5} & \mathbf{4} & \mathbf{6} & \mathbf{1 0} \\ \hline \text { Judge 3 } & \mathbf{5} & \mathbf{6} & \mathbf{1} & \mathbf{4} & \mathbf{3} & \mathbf{8} \\ \hline \end{array}

From this table of values is it possible to spot the fake judge? Is there a set of results that stand out from the others?

One thing that can be done is to consider the ranking of each dancer from each of the judges and this is shown below: 

\begin{array}{|c|c|c|c|c|c|c|} \hline \text { Dancer } & 1 & 2 & 3 & 4 & 5 & 6 \\ \hline \text { Judge 1 } & \mathbf{7} & \mathbf{9} & \mathbf{5} & \mathbf{6} & \mathbf{4} & \mathbf{1 0} \\ \hline \text { Ranking } & \mathbf{3} & 2 & 5 & 4 & 6 & \mathbf{1} \\ \hline \text { Judge 2 } & \mathbf{7} & \mathbf{3} & \mathbf{5} & \mathbf{4} & \mathbf{6} & \mathbf{1 0} \\ \hline \text { Ranking } & 2 & 6 & 4 & 5 & 3 & 1 \\ \hline \text { Judge 3 } & \mathbf{5} & \mathbf{6} & \mathbf{1} & \mathbf{4} & \mathbf{3} & \mathbf{8} \\ \hline \text { Ranking } & \mathbf{3} & 2 & 6 & 4 & 5 & \mathbf{1} \\ \hline \end{array}

You should notice that Judge 1 and 2 both agree on which dancer should be ranked at 1st, 2nd, 3rd and 4th. However there is a clear difference on what judge 2 thinks. For instance a score of 7 from judge 2 gets a dancer a 2nd place but judge 1 will award a dancer 3rd place for the same score. 

Spearman’s rank

A rank is a ranking given to different scores such as which is best and so on. 

A correlation refers to how well two sets of data are linked. 

A coefficient is a number used as a measure.253512114

Spearman’s rank correlation coefficient (SRCC) compares the ranks of two sets of data and this has the following formula:

S R C C=1-\frac{6 \sum d_i^2}{n\left(n^2-1\right)}

Where d is the difference between the rankings and n is the number of pairs of ranks. 

The formula for SRCC can be used to compare the rankings for judges 1 and 2. 

\begin{array}{|c|c|c|c|c|c|c|} \hline \text { Dancer } & 1 & 2 & 3 & 4 & 5 & 6 \\ \hline \text { Judge 1 } & \mathbf{7} & \mathbf{9} & \mathbf{5} & \mathbf{6} & \mathbf{4} & \mathbf{1 0} \\ \hline \text { Judge 2 } & \mathbf{7} & \mathbf{3} & \mathbf{5} & \mathbf{4} & \mathbf{6} & \mathbf{1 0} \\ \hline \text { Judge 3 } & \mathbf{5} & \mathbf{6} & \mathbf{1} & \mathbf{4} & \mathbf{3} & \mathbf{8} \\ \hline \end{array}

The difference between the rankings between judge 1 and 2 are shown below:

\begin{array}{|c|c|c|c|c|c|c|} \hline \text { Dancer } & 1 & 2 & 3 & 4 & 5 & 6 \\ \hline \text { Judge 1 } & \mathbf{7} & \mathbf{9} & \mathbf{5} & \mathbf{6} & \mathbf{4} & \mathbf{1 0} \\ \hline \text { Ranking } & \mathbf{3} & 2 & 5 & 4 & 6 & 1 \\ \hline \text { Judge 2 } & \mathbf{7} & \mathbf{3} & \mathbf{5} & \mathbf{4} & \mathbf{6} & \mathbf{1 0} \\ \hline \text { Ranking } & 2 & 6 & 4 & 5 & 3 & 1 \\ \hline \text { Judge 3 } & \mathbf{5} & \mathbf{6} & \mathbf{1} & \mathbf{4} & \mathbf{3} & \mathbf{8} \\ \hline \text { Ranking } & \mathbf{3} & 2 & 6 & 4 & 5 & \mathbf{1} \\ \hline \end{array}

Difference in rankings: 

1, -4, 1, -1, 3 and 0. Do not worry if any results are negative because the calculation of d2 will make any values positive. 

Squaring each of these numbers gives: 1, 16, 1, 1, 9 and 0.

\sum d^2=1+16+1+1+9+0=28

Next applying the formula for SRCC gives: 

\begin{gathered} S R C C=1-\frac{6 \sum d_i^2}{n\left(n^2-1\right)} \\ =1-\frac{6 \times 28}{6\left(6^2-1\right)} \\ =1-\frac{168}{210} \\ =\frac{1}{5} \end{gathered}

Having now found the value of the SRCC, what does this value actually mean?

The maximum value for Spearman’s rank is 1 which means that there is a perfect correlation. A value of 0 means that the data is not correlated. 

The SRCC can be calculated for each pair of judges as shown above to give the following results: 

Judges 1 and 2, SRCC = 0.2

Judges 1 and 3, SRCC = 0.943

Judges 2 and 3, SRCC = 0.257

Both judges 1 and 2 have a low score and this applies to judges 2 and 3. However judges 1 and 3 have a very high coefficient. This means that their ranking match very well and they are the real judges. So judge 2 is the fake judge. 

A teacher smiling at camera in classroom

Example

The following table shows the scores by two people when playing 8 games. 

\begin{array}{|c|c|c|c|c|c|c|c|c|} \hline \text { Game } & \mathbf{1} & \mathbf{2} & \mathbf{3} & \mathbf{4} & \mathbf{5} & \mathbf{6} & \mathbf{7} & \mathbf{8} \\ \hline \text { Mr F } & 21 & 17 & 9 & 40 & 12 & 36 & 26 & 33 \\ \hline \text { Mr J } & 38 & 40 & 43 & 22 & 49 & 32 & 34 & 31 \\ \hline \end{array}

Find the SRCC given by Mr F and Mr J. 

Solution

First start off by ranking their scores. Place a 1 next to the top score and a 8 next to the lowest score for both players. 

\begin{array}{|c|c|c|c|c|c|c|c|c|} \hline \text { Game } & \mathbf{1} & \mathbf{2} & \mathbf{3} & \mathbf{4} & \mathbf{5} & \mathbf{6} & \mathbf{7} & \mathbf{8} \\ \hline \text { Mr F } & 21 & 17 & 9 & 40 & 12 & 36 & 26 & 33 \\ \hline \text { Ranking } & 5 & 6 & 8 & 1 & 7 & 2 & 4 & 3 \\ \hline \text { Mr J } & 38 & 40 & 43 & 22 & 49 & 32 & 34 & 31 \\ \hline \text { Ranking } & 4 & 3 & 2 & 8 & 1 & 6 & 5 & 7 \\ \hline \end{array}

Next find the difference between the rankings. Remember that there is no need to worry about any negative answers as they will be squared. 

\begin{array}{|c|c|c|c|c|c|c|c|c|} \hline \text { Game } & \mathbf{1} & \mathbf{2} & \mathbf{3} & \mathbf{4} & \mathbf{5} & \mathbf{6} & \mathbf{7} & \mathbf{8} \\ \hline \text { Mr F } & 21 & 17 & 9 & 40 & 12 & 36 & 26 & 33 \\ \hline \text { Ranking } & 5 & 6 & 8 & 1 & 7 & 2 & 4 & 3 \\ \hline \text { Mr J } & 38 & 40 & 43 & 22 & 49 & 32 & 34 & 31 \\ \hline \text { Ranking } & 4 & 3 & 2 & 8 & 1 & 6 & 5 & 7 \\ \hline \text { d } & 1 & 3 & 6 & -7 & 6 & -4 & -1 & -4 \\ \hline \text { d }^2 & 1 & 9 & 36 & 49 & 36 & 16 & 1 & 16 \\ \hline \end{array}

Next you need to find the sum of all squares.

\sum d^2=1+9+36+49+36+16+1+16=164

Next the value of the SRCC can be determined by using the formula:

\begin{gathered} S R C C=1-\frac{6 \sum d_i^2}{n\left(n^2-1\right)} \\ =1-\frac{6 \times 164}{8\left(8^2-1\right)} \\ =1-\frac{984}{504} \\ =-0.952 \end{gathered}

In this question a negative result has been obtained. The scale of the SRCC is from -1 to 1 where 0 indicates no correlation and 1 indicates a positive correlation. The result obtained suggests that any game Mr F likes to play will not be enjoyed by Mr J and vice versa. 

Below are some additional questions for you to try and the answers have been provided. As mentioned at the start of the article, it would appear that this particular topic is now part of A Level Further Maths only. It is certainly not on the specification for the Edexcel or MEI exam boards for single A Level Maths. 

Statistics does form quite a large component of the A Level Maths specification and especially with regards to the Large Data Set which is supported by Pearson (Edexcel) as well as MEI. 

In future articles we will cover further articles around statistics. If you are looking for some additional help regarding A Level Maths Statistics Revision then you can attend one of our revision courses that are bespoke to student needs as opposed to having a predetermined set of topics. If you have any questions about our courses just get in touch and we can forward you a course brochure. 

If you, or your parents would like to find out more, please just get in touch via email at info@exam.tips or call us on 0800 689 1272

New to exam.tips?