Since there are ties present, the following formula is used to compute the rank correlation coefficient:
\({r_s} = \frac{{n\sum {xy} - \left( {\sum x } \right)\left( {\sum y } \right)}}{{\sqrt {n\left( {\sum {{x^2}} } \right) - {{\left( {\sum x } \right)}^2}} \sqrt {n\left( {\sum {{y^2}} } \right) - {{\left( {\sum y } \right)}^2}} }}\)
The table below shows the required calculations:
Ranks of Ages of Actresses(x) | Ranks of Ages of Actors(y) | xy | \({x^2}\) | \({y^2}\) |
8 | 4 | 32 | 64 | 16 |
3 | 6.5 | 19.5 | 9 | 42.25 |
4 | 5 | 20 | 16 | 25 |
6 | 9 | 54 | 36 | 81 |
2 | 6.5 | 13 | 4 | 42.25 |
9 | 2 | 18 | 81 | 4 |
1 | 8 | 8 | 1 | 64 |
5 | 3 | 15 | 25 | 9 |
7 | 1 | 7 | 49 | 1 |
\(\sum x \)=45 | \(\sum y \)=45 | \(\sum {xy} \)=186.5 | \(\sum {{x^2}} \)=285 | \(\sum {{y^2}} \)=284.5 |
Here, n = 9.
Substituting the values in the formula, the value of\({r_s}\)is obtained as follows:
\(\begin{array}{c}{r_s} = \frac{{n\sum {xy} - \left( {\sum x } \right)\left( {\sum y } \right)}}{{\sqrt {n\left( {\sum {{x^2}} } \right) - {{\left( {\sum x } \right)}^2}} \sqrt {n\left( {\sum {{y^2}} } \right) - {{\left( {\sum y } \right)}^2}} }}\\ = \frac{{9\left( {186.5} \right) - \left( {45} \right)\left( {45} \right)}}{{\sqrt {9\left( {285} \right) - {{\left( {45} \right)}^2}} \sqrt {9\left( {284.5} \right) - {{\left( {45} \right)}^2}} }}\\ = - 0.644\end{array}\)
Therefore, the value of the Spearman rank correlation coefficient is equal to -0.644.