We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Day 7: Spearman's Rank Correlation Coefficient
Day 7: Spearman's Rank Correlation Coefficient
Spearman's Rank Correlation Coefficient
We have two random variables, and :
If and denote the respective ranks of each data point, then the Spearman's rank correlation coefficient, , is the Pearson correlation coefficient of and .
Example
:
So,
Similarly,
equals the Pearson correlation coefficient of and , meaning that .
Special Case: and Don't Contain Duplicates
Here, is the difference between the respective values of and .
Proof
Let's define be the rank of and be the rank of . Both and are permutations of set , because data sets and contain no duplicates in this special case.
Mean of and :
Standard Deviation of and :
So,
Calculating :
We know that:
So,
Covariance of and :
Spearman's Rank Correlation Coefficient:
We know that the Spearman's rank correlation coefficient of and is equal to the Pearson correlation coefficient of and . So,