Spearman’s Rank correlation Coefficient
Let $(x_1, y_1), (x_2, y_2), \cdots , (x_n, y_n)$
be the ranks of $n$ individuals in two characteristics $A$ and $B$ respectively.
Formula
Spearman’s rank correlation coefficient is denoted by $\varrho$ and is given by
$\varrho = 1- \dfrac{6 \sum_{i=1}^{n}d_i^2}{n(n^2-1)}$
where,
$n$
is the number of pairs of observations,$d_i = x_i - y_i$
is the difference between the pairs of ranks of the $i^{th}$ individual in the two characteristics.