Tied rank correction formula vs fractional ranking in Spearman's Rank Correlation.

715 Views Asked by At

NOTE

I decided to post this here instead

https://stats.stackexchange.com/questions/249921/tied-rank-correction-formula-vs-fractional-ranking-in-spearmans-rank-correlatio

But leaving as a breadcrumb.


I have found two ways to deal with ties when calculation Spearman's Rank Correlation.

  1. Calculate the ranks using [fractional ranking](https://en.wikipedia.org/wiki/Ranking#Fractional_ranking_.28.221_2.5_2.5_4.22_ranking.29_, then calculate the Pearson's correlation of the ranks.

  2. Calculate the correlation as if there were no ties using the formula

$$1 - \frac{6\sum_i (x_i - y_i)^2}{n(n^2-1)}$$

And add a correction factor for each tie of multiplicity $m$ in either set

$$\frac{m(m^2-1)}{12}$$

How do these compare? Which is preferable under what conditions?