Spearman Correlation formula
What is the definition of the Spearman Correlation test?
ρ=rs=1−6∑d2in(n2−1)
- p : Spearman correlation
- rs : Spearman correlation
- di : rg(Xi) - rg(Yi): difference between the two ranks of each observation (for example, one can have the second best score on variable X, but the ninth on variable Y.)
- n : number of scores
Note: if there are tied ranks, the following method can be used to calculate the Spearman Correlation:
ρ=∑i(xi−ˉx)(yi−ˉy)√∑i(xi−ˉx)2∑i(yi−ˉy)2
- x : value of x
- x̄ : mean of x
- y : value of y
- ȳ : mean of y
- 3420 reads