Why is Spearman's rank $n-2$ degrees of freedom?

1.6k Views Asked by At

I have a basic understanding of degrees of freedom but I get lost when it's about Spearman's. Every book says $n-2$ however my understanding would mean it is either $n-1$ or $2(n-1)$ but is isn't. How so?