Spearman Rank Correlation Calculator Formula
Understand the math behind the spearman rank correlation calculator. Each variable explained with a worked example.
Formulas Used
Spearman rho
rho = 1 - (6 * sum_d2) / (n * (pow(n, 2) - 1))Variables
| Variable | Description | Default |
|---|---|---|
n | Number of Pairs | 10 |
sum_d2 | Sum of d squared | 20 |
How It Works
Spearman Rank Correlation
rho = 1 - 6*Sum(d^2)/[n(n^2-1)]
Measures monotonic relationship between ranked variables.
Worked Example
10 pairs, Sum d^2=20.
n = 10sum_d2 = 20
- 01rho = 1 - 120/990 = 0.8788
Ready to run the numbers?
Open Spearman Rank Correlation Calculator