• Written By Preethu
  • Last Modified 17-12-2024

Correlation for Tied Ranks: Definition, Formula, Repeated Ranks, Examples, FAQs

img-icon

Correlation for tied ranks: Spearman’s rank correlation coefficient is a technique that can be used to summarise the strength and direction of a relationship between two variables. When we calculate Spearman’s rank correlation coefficient, it is assumed that two or more units do not have the same rank. When two or more observations have equal values, if there is a tie, it is difficult to assign ranks to them. In such cases, the observations are given the average of the ranks they would have received. Then, a different formula is used to calculate the correlation coefficient.

How to Rank Tied Data?

To calculate Spearman’s rank correlation coefficient, we first have to rank the items. It is normally assumed that all items have different ranks. But there are some instances where two or more units can have the same rank. This situation is called a tied rank situation.

Situations arise with two or more items having equal values. It is difficult to assign ranks to those variables when there is such a tie. In these cases, the observations are given the average of the ranks they would have received if there was no tie.

For example, two items are placed in the \({8^{{\text{th}}}}\) place. We cannot give rank \(8\) to both of them. So, we will take the average of the ranks they must have received if there was no tie. So, the average of ranks \(8\) and \(9\) will be taken and assigned to both the observations.

Average of ranks \( = \frac{{8 + 9}}{2} = \frac{{17}}{2} = 8.5\)

This \(8.5\) will be the common rank assigned to the tied observations. Now, the following observation will be ranked as \(10\)

If three observations are ranked equal at the \({8^{{\text{th}}}}\) place, then they are given the average ranks they would have received in the case of no tie. So, the average of the ranks \(8,9\) and \(10\) will be taken and assigned to all the three observations.

Average of ranks \( = \frac{{8 + 9+10}}{3} = \frac{{27}}{3} = 9\)

Here, \(9\) is the common rank assigned to each of the three equal observations, and the next rank will be \(11\). 

A different formula is used to calculate Spearman’s rank correlation coefficient in the case of tied ranks.

Spearman’s Rank Correlation Formula For Repeated Ranks

The Spearman’s correlation coefficient for tied ranks can be calculated using the formula

\(\rho  = 1 – 6\left[ {\frac{{\sum {D_i^2}  + \frac{1}{{12}}\left( {m_1^3 – {m_1}} \right) + \frac{1}{{12}}\left( {m_2^3 – {m_2}} \right) +  \ldots }}{{n\left( {{n^2} – 1} \right)}}} \right]\)

Where \({m_1},\,{m_2}….\) are the number of repetitions of ranks and \(\frac{{m_i^3 – {m_i}}}{{12}}\)  is their corresponding correction factors.

Like normal Spearman’s rank correlation coefficient, the tied rank coefficient will have values only between \(1\) and \(-1\), both included. \(+1\) denotes a perfect positive correlation, \(-1\) denotes a perfect negative correlation, and \(0\) indicates no correlation.

Solved Examples of Correlation for Tied Ranks

Below are a few solved examples that can help in getting a better idea.

Q.1. Identify whether the given data contains tied ranks.

Expenditure on advertisement\(10\)\(15\)\(17\)\(25\)\(14\)\(11\)\(20\)\(22\)
Profit\(6\)\(25\)\(12\)\(18\)\(25\)\(40\)\(10\)\(7\)

Ans: When ranking the data, ties, that is, two or more subjects having exactly the same value of a variable, are likely to occur. Tied ranks arise when two items in a column have the same rank. In the case of ties, the tied observations receive the same average rank.
Here, in the given data, we can see that \(25\) is occurring twice, and hence there is a tie in the ranks.

Q.2. The following table gives the data of the marks obtained by \(8\) students in Commerce and Mathematics. Compute the rank correlation coefficient.

Marks in Commerce\(15\)\(20\)\(28\)\(12\)\(40\)\(60\)\(20\)\(80\)
Marks in Mathematics\(40\)\(30\)\(50\)\(30\)\(20\)\(10\)\(30\)\(60\)

Ans:

Marks in Commerce \(\left( X \right)\)Rank \(\left( {{R_{1i}}} \right)\)Marks in Mathematics \(\left( Y \right)\)Rank \(\left( {{R_{2i}}} \right)\)\({D_i} = {R_{1i}} – {R_{2i}}\)\(D_i^2\)
\(15\)\(2\)\(40\)\(6\)\(-4\)\(16\)
\(20\)\(3.5\)\(30\)\(4\)\(-0.5\)\(0.25\)
\(28\)\(5\)\(50\)\(7\)\(-2\)\(4\)
\(12\)\(1\)\(30\)\(4\)\(-3\)\(9\)
\(40\)\(6\)\(20\)\(2\)\(4\)\(16\)
\(60\)\(7\)\(10\)\(1\)\(6\)\(36\)
\(20\)\(3.5\)\(30\)\(4\)\(-0.5\)\(0.25\)
\(80\)\(8\)\(60\)\(8\)\(0\)\(0\)
Total\(\sum {D_i^2}  = \,81.5\)

Correlation coefficient for tied ranks, \(\rho  = 1 – 6\left[ {\frac{{\sum {D_i^2}  + \frac{1}{{12}}\left( {m_1^3 – {m_1}} \right) + \frac{1}{{12}}\left( {m_2^3 – {m_2}} \right) +  \ldots }}{{n\left( {{n^2} – 1} \right)}}} \right]\)
In Commerce \(\left( X \right)\), \(20\) is repeated two times, corresponding to ranks \(3\) and \(4\). Therefore, \(3.5\) is assigned for ranks \(2\) and \(3\), with \({m_1} = 2\).
In Mathematics \(\left( Y \right)\), \(30\) is repeated three times, corresponding to ranks \(3\),\(4\) and \(5\).Therefore,\(4\) is assigned for ranks \(3\),\(4\) and \(5\) with \({m_2} = 3\).
Therefore,
\(\rho  = 1 – 6\left[ {\frac{{81.5 + \frac{1}{{12}}\left( {{2^3} – 2} \right) + \frac{1}{{12}}\left( {{3^3} – 3} \right)}}{{8\left( {{8^2} – 1} \right)}}} \right]\)
\( = 1 – 6\frac{{[81.5 + 0.5 + 2]}}{{504}}\)
\( = 1 – \frac{{504}}{{504}}\)
\(\therefore \,\rho  = 0\)
Hence, we can conclude that the marks in Commerce and Mathematics are not correlated at all.

Q.3. Calculate the rank correlation coefficient from the following data:

Expenditure on advertisement\(10\)\(15\)\(14\)\(25\)\(14\)\(14\)\(20\)\(22\)
Profit\(6\)\(25\)\(12\)\(18\)\(25\)\(40\)\(10\)\(7\)

Ans: Let us denote the expenditure on advertisement by \(x\) and profit by \(y\)

\(x\)Rank of \(x\left( {{R_x}} \right)\)\(y\)Rank of \(y\left( {{R_y}} \right)\)\(d = {R_x} – {R_y}\)\({d^2}\)
\(10\)\(8\)\(6\)\(8\)\(0\)\(0\)
\(15\)\(4\)\(25\)\(2.5\)\(1.5\)\(2.25\)
\(14\)\(6\)\(12\)\(5\)\(1\)\(1\)
\(25\)\(1\)\(18\)\(4\)\(-3\)\(9\)
\(14\)\(6\)\(25\)\(2.5\)\(3.5\)\(12.25\)
\(14\)\(6\)\(40\)\(1\)\(5\)\(25\)
\(20\)\(3\)\(10\)\(6\)\(-3\)\(9\)
\(22\)\(3\)\(7\)\(7\)\(-5\)\(25\)
\(\sum {{d^2}}  = 83.50\)

\({r_s} = 1 – \frac{{6\left\{ {\sum {{d^2}}  + \frac{{m\left( {{m^2} – 1} \right)}}{{12}} +  \ldots } \right\}}}{{n\left( {{n^2} – 1} \right)}}\)
Here rank \(6\) is repeated three times in the rank of \(x\) and rank \(2.5\) is repeated twice in the rank of \(y\), so the correction factor is
\(\frac{{3\left( {{3^2} – 1} \right)}}{{12}} + \frac{{2\left( {{2^2} – 1} \right)}}{{12}}\)
Hence rank correlation coefficient is
\({r_s} = 1 – \frac{{6\left\{ {83.50 + \frac{{3\left( {{3^2} – 1} \right)}}{{12}} + \frac{{2\left( {{2^2} – 1} \right)}}{{12}}} \right\}}}{{8(64 – 1)}}\)
\({r_s} = 1 – \frac{{6\left\{ {83.50 + \frac{{3 \times 8}}{{12}} + \frac{{2 \times 3}}{{12}}} \right\}}}{{8 \times 63}}\)
\({r_s} = 1 – \frac{{6(83.50 + 2.50)}}{{504}}\)
\({r_s} = 1 – \frac{{516}}{{504}}\)
\({r_s} = 1 – 1.024\)
\(\therefore {r_s} =  – 0.024\)
This implies a negative association between expenditure on advertisement and profit.

Q.4. Compute the coefficient of rank correlation between Economics marks and Statistics marks as given below:

Economics Marks\(80\)\(56\)\(50\)\(48\)\(50\)\(62\)\(60\)
Statistics Marks\(90\)\(75\)\(75\)\(65\)\(65\)\(50\)\(65\)

Ans:
For the computation of rank correlation between Economics marks and Statistics marks with tied marks, the table has to be extended with the following calculations.

Economics MarksStatistics MarksRank for Economics \(\left( X \right)\)Rank for Statistics \(\left( X \right)\)\(d = x – y\)\({d^2}\)
\(80\)\(90\)\(1\)\(1\)\(0\)\(0\)
\(56\)\(75\)\(4\)\(2.5\)\(1.5\)\(2.25\)
\(50\)\(75\)\(5.5\)\(2.5\)\(3\)\(9\)
\(48\)\(65\)\(7\)\(5\)\(2\)\(4\)
\(50\)\(65\)\(5.5\)\(5\)\(0.5\)\(0.25\)
\(62\)\(50\)\(2\)\(7\)\(-5\)\(25\)
\(60\)\(65\)\(3\)\(5\)\(-2\)\(4\)
Total\(44.5\)

We know that \(\sum\limits_i {\frac{{t_j^3 – {t_j}}}{{12}}}  = \frac{{\left[ {\left( {{2^3} – 2} \right) + \left( {{2^3} – 2} \right) + \left( {{3^3} – 2} \right)} \right]}}{{12}}\)
\( = \frac{{[(8 – 2) + (8 – 2) + (27 – 3)]}}{{12}}\)
\( = \frac{{[6 + 6 + 24]}}{{12}}\)
\( = \frac{{36}}{{12}}\)
\(= 3\)
Spearman’s rank correlation coefficient:
\({r_R} = 1 – \frac{{6\left[ {\sum\limits_i {d_i^2}  + \sum\limits_j {\frac{{\left( {t{j^3} – tj} \right)}}{{12}}} } \right]}}{{n\left( {{n^2} – 1} \right)}}\)
Substituting the values we get
\({r_R} = 1 – \frac{{[6 \times (44.50 + 3)]}}{{\left[ {7\left( {{7^2} – 1} \right)} \right]}}\)
\( = 1 – \frac{{[6 \times 47.3)]}}{{[7(49 – 1)]}}\)
\( = 1 – \frac{{283.8}}{{336}}\)
\(\therefore {r_R} \approx 0.15\)
Hence, there is a positive correlation.

Q.5. The values \(X\) and \(Y\) are given as follows. Find the correlation between \(X\) and \(Y\).

\(X\)\(Y\)
\(1200\)\(75\)
\(1150\)\(65\)
\(1000\)\(50\)
\(900\)\(100\)
\(800\)\(90\)
\(780\)\(85\)
\(760\)\(90\)
\(750\)\(40\)
\(730\)\(50\)
\(700\)\(60\)
\(620\)\(50\)
\(600\)\(75\)

Ans:
Here, \(Y\) has the value of \(50\) at the \({9^{{\text{th}}}}\), \({10^{{\text{th}}}}\) and \({11^{{\text{th}}}}\) rank. Hence all three are given the average rank, i.e., \(10\).

Rank of \(X\)Rank of \(Y\)Deviation in the Ranks\({d^2}\)
\(1\)\(5.5\)\(-4.5\)\(20.25\)
\(2\)\(7\)\(-5\)\(25.00\)
\(3\)\(10\)\(-7\)\(49.00\)
\(4\)\(1\)\(3\)\(9.00\)
\(5\)\(2.5\)\(2.5\)\(6.25\)
\(6\)\(4\)\(2\)\(4.00\)
\(7\)\(2.5\)\(4.5\)\(20.25\)
\(8\)\(12\)\(-4\)\(16.00\)
\(9\)\(10\)\(-1\)\(1.00\)
\(10\)\(8\)\(2\)\(4.00\)
\(11\)\(10\)\(1\)\(1.00\)
\(12\)\(5.5\)\(6.5\)\(42.25\)
Total\(198.00\)

The formula of Spearman’s rank correlation coefficient when the ranks are repeated is as follows

\({r_n} = 1 – \frac{{6\left[ {\Sigma {D^2} + \frac{{\left( {m_1^3 – {m_1}} \right)}}{{12}} + \frac{{\left( {m_2^3 – {m_2}} \right)}}{{12}} +  \ldots } \right]}}{{n\left( {{n^2} – 1} \right)}}\)

Where \({m_1},\,{m_2}….\) are the number of repetitions of ranks and \(\frac{{m_i^3 – {m_i}}}{{12}}\)  is their corresponding correction factors.

The necessary correction for this data thus is

\(\frac{{{3^3} – 3}}{{12}} + \frac{{{2^3} – 2}}{{12}} = \frac{{30}}{{12}} = 2.5\)

Substituting the values of these in the formula, we get

\({r_s} = 1 – \frac{{6(198 + 2.5)}}{{{{12}^3} – 12}} = (1 – 0.70) = 0.30\)

Thus, there is a positive rank correlation between \(X\) and \(Y\).

Summary of Correlation for Tied Ranks

The Spearman’s rank correlation coefficient is the non-parametric version of the Pearson correlation coefficient. It measures the association between two or more ranked or ordered variables. This method is used to measure the strength and direction of the association between two sets of data when ranked by each of their quantities.

As Spearman’s coefficient measures the strength of a monotonic relationship, the data has to be monotonically related. When ranking the data, ties (two or more subjects having exactly the same value of a variable) are likely to occur. Tied ranks arise when two items in a column have the same rank. In such cases, the items are given the average of the ranks they would have otherwise received.

FAQs on Correlation for Tied Ranks

Students might be having many questions with respect to the Correlation for Tied Ranks. Here are a few commonly asked questions and answers.

Q.1. What are the tied ranks in Spearman’s correlation?
Ans:
 In Spearman’s rank correlation analysis, rank is the position of observations in the ascending order of their values. When the observations are all different then different ranks are assigned to them according to the value of the observations. But, when two or more observations have the same value, there will be a tie in the ranks assigned, which is called the tied ranks.

Q.2. How do you calculate tied rank?
Ans: When two or more items have equal values (a tie), it is difficult to give ranks to them. In such cases, the items are given the average of the ranks they would have otherwise received.

Q.3. How do you do Spearman’s rank with tied ranks?
Ans: The Spearman’s correlation coefficient for tied ranks can be found by the formula
\(\rho  = 1 – 6\left[ {\frac{{\sum {D_i^2}  + \frac{1}{{12}}\left( {m_1^3 – {m_1}} \right) + \frac{1}{{12}}\left( {m_2^3 – {m_2}} \right) +  \ldots }}{{n\left( {{n^2} – 1} \right)}}} \right]\)
Where \({m_1},\,{m_2}….\) are the number of repetitions of ranks and \(\frac{{m_i^3 – {m_i}}}{{12}}\)  is their corresponding correction factors.

Q.4. What is a tied observation?
Ans: It is normally assumed that all items have different ranks. But there are some instances where two or more units can have the same rank. This situation is called a tied rank situation, and such observations with equal values are called tied observations.

Q.5. What to do when there is a tie of three observations?
Ans: When there is a tie of three observations, see the ranks they should get naturally, take the average, and then assign all the average ranks. For example, \(x\) has a value repeated or tied three times which should have the ranks \(3,4,5\) otherwise, if there was no tie. Then, the ranks of \(x\) will be \(\frac{{3 + 4 + 5}}{3} = 4\) and the next rank will be assigned the rank \(6\).

We hope this page on Correlation for Tied Ranks is helpful to you. If you have any queries related to this page, ping us through the comment box below and we will get back to you as soon as possible.

Unleash Your True Potential With Personalised Learning on EMBIBE