Page tree

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

@wikipedia


(1) \rho_s(x,y) = 1 - \frac{6}{n(n^2-1)} \sum_i \big( rg(x_i)-rg(y_i) \big)^2

where  rg(x_i) and  rg(x_i) are the ranks of elements  x_i and y_i,  i.e. index number in a low-to-high sorted array:  

(2) \{ x \} = \{ x_1, x_2, x_3 ... x_n \} \rightarrow \{ rg(x) \} = \{ x_{i_1}, x_{i_2}, x_{i_3} ... x_{i_n} \}, \, {\rm where} \, x_{i_1} \leq x_{i_2} \leq x_{i_3} ... \leq x_{i_n}
(3) \{ y \} = \{ y_1, y_2, y_3 ... y_n \} \rightarrow \{ rg(y) \} = \{ y_{i_1}, y_{i_2}, x_{i_3} ... y_{i_n} \}, \, {\rm where} \, y_{i_1} \leq y_{i_2} \leq y_{i_3} ... \leq y_{i_n}
  • No labels