# Spearman’s Rank Correlation Coefficient in Different Cases

Spearman’s Rank Correlation Coefficient or Spearman’s Rank Difference Method or Formula is a method of calculating the correlation coefficient of qualitative variables and was developed in 1904 by Charles Edward Spearman. In other words, the formula determines the correlation coefficient of variables like beauty, ability, honesty, etc., whose quantitative measurement is not possible. Therefore, these attributes are ranked or put in the order of their preference.

In the given formula,

r_{k }= Coefficient of rank correlation

D = Rank differences

N = Number of variables

Three different cases of Spearman’s Rank Correlation Coefficient:

**Case 1: When Ranks are given**

In this case, the ranks of the frequency distribution or variables are already given, and the coefficient of rank correlation is calculated based on those ranks. The formula for calculating Spearman’s Rank Correlation is

Example:In an art competition, two judges accorded following ranks to the 10 participants:

Judge X1 2 3 4 5 6 7 8 9 10 Judge Y6 2 9 7 1 4 8 3 10 5 Calculate coefficient of rank correlation.

Solution:

Judge X (R_{1})Judge Y (R_{2})D = R_{1}– R_{2}D^{2}1 6 -5 25 2 2 0 0 3 9 -6 36 4 7 -3 9 5 1 4 16 6 4 2 4 7 8 -1 1 8 3 5 25 9 10 -1 1 10 5 5 25 N = 10∑D^{2}_{ }= 142= 1 – 0.860

= 0.14

Coefficient of Correlation (r_{k}) = 0.14As the rank correlation is positive and closer to 0, it means that the association between the ranks of the two judges is weaker.

**Case 2: When Ranks are not given**

When the ranks of the variables or distribution are not given, then the individual has to rank the values themselves. While ranking the values, one has to adopt a uniform procedure for both series of distribution. For instance, if 1st rank is given to the lowest value of one series, then the same pattern should be followed for the second series as well. Once the rank has been determined, the coefficient of rank correlation is determined as the first case. The formula for calculating Spearman’s rank correlation coefficient is

Example:Calculate the Spearman’s Rank Correlation for the following data.

Mathematics14 15 17 12 16 11 18 9 10 Accountancy4 12 8 10 2 5 9 3 7

Solution:In the given case, there are 9 values, and the ranking for both X and Y or Mathematics and Accountancy is done by giving the highest rank to the highest value and the lowest rank to the lowest value. Therefore, 1st rank is given to 9 in the X series and 2 in the Y series. Similarly, the 9th rank is given to 18 in the X series and 12 in the Y series.

Mathematics (X)Rank R_{1}Accountancy (Y)Rank R_{2}D = R_{1}– R_{2}D^{2}14 5 4 3 2 4 15 6 12 9 -3 9 17 8 8 6 2 4 12 4 10 8 -4 16 16 7 2 1 6 36 11 3 5 4 -1 1 18 9 9 7 2 4 9 1 3 2 -1 1 10 2 7 5 -3 9 N = 9∑D^{2}= 84= 1 – 0.7

= 0.3

Coefficient of Correlation (r_{k}) = 0.3It means that there is a positive rank correlation of a moderate degree of 0.3.

**Case 3: When Ranks are equal**

When two or more values of a series have an equal rank, then in such cases, each value is given the average of the two ranks. To avoid any mistake, the formula for calculating Spearman’s Rank Correlation Coefficient is

Here, m_{1}, m_{2}, ……. are the number of times a value has repeated in the given X, Y, …….. series, respectively.

Example:Calculate the coefficient of rank correlation of the scores obtained by 7 students in an essay writing competition by two judges, X and Y.

X 15 12 20 16 18 20 26 Y 10 15 11 11 25 18 30

Solution:In the given case, there are 7 values or students, and ranks have been given as highest rank to the highest score and lowest rank to the lowest score. For instance, for scores given by Judge X, 1st rank is given to the score of 26 and for the scores given by Judge Y, 1st rank is given to the score of 30.

XRank R_{1 }YRank R_{2 }DD^{2 }15 6 10 7 -1 1 12 7 15 4 3 9 20 2.5 11 5.5 -3 9 16 5 11 5.5 -0.5 0.25 18 4 25 2 2 4 20 2.5 18 3 -0.5 0.25 26 1 30 1 0 0 ∑D^{2}= 23.5Judge X has given 20 scores to two students who are in the place of 2nd and 3rd rank. Therefore, the average of both ranks, i.e., (2+3)/2 = 2.5 rank has been given to both students.

Similarly, Judge Y has given 11 scores to two students who are in the place of 5th and 6th rank. Therefore, the average of both ranks, i.e., (5+6)/2 = 5.5 has been given to both students.

Also, in series X, the number 20 is repeated twice, and in Y series, the number 11 is repeated twice. Therefore, m for series X or m

_{1}is 2 and m for series Y or m_{2}is 2.= 1 – 0.4375

= 0.5625

Coefficient of Correlation = 0.56The positive correlation coefficient of 0.56 means that around 25% of the variation is related.