When observations are not repeated:
r = \(1 – \frac{6Σd^2}{n(n^2−1) }\)
Where, d = Rx – Ry
Rx = Rank of variable X
Ry = Rank of variable Y
When observations are repeated:
\(r = 1 – \frac{6(Σd^2+CF)}{n(n^2−1)}\)
Where d = Rx – Ry
Rx = Rank of variable X
Ry = Rank of variable Y
CF = Correction Factor =\( Σ\left(\frac{m^3−m}{12}\right)\)
m = No. of repeatations of a observation