Formula
|
1. `r = 1 - (6 * sum d^2)/(n(n^2 - 1))`
|
Examples
1. Calculate Spearman's Rank Correlation Coefficient from the following Rank
Solution:| `Rx` | `Ry` | `d=Rx-Ry` | `d^2` |
| 3 | 6 | -3 | 9 |
| 5 | 4 | 1 | 1 |
| 8 | 9 | -1 | 1 |
| 4 | 8 | -4 | 16 |
| 7 | 1 | 6 | 36 |
| 10 | 2 | 8 | 64 |
| 2 | 3 | -1 | 1 |
| 1 | 10 | -9 | 81 |
| 6 | 5 | 1 | 1 |
| 9 | 7 | 2 | 4 |
| --- | --- | --- | --- |
| -- | -- | -- | 214 |
`r = 1 - (6 * sum d^2)/(n(n^2 - 1))`
`=1 - (6 * 214)/(10 * (10^2 - 1))`
`=1 - (6 * 214)/(10 * (100 - 1))`
`=1 - 1284/990`
`=1 - 1.297`
`=-0.297`
2. Calculate Spearman's Rank Correlation Coefficient from the following Rank
| X | 1 | 7 | 2 | 9 | 12 | 8 | 6 | 3 | 13 | 15 | 14 | 10 | 11 | 4 | 5 |
| Y | 2 | 9 | 1 | 7 | 15 | 8 | 5 | 3 | 13 | 14 | 11 | 10 | 12 | 6 | 4 |
Solution:| `Rx` | `Ry` | `d=Rx-Ry` | `d^2` |
| 1 | 2 | -1 | 1 |
| 7 | 9 | -2 | 4 |
| 2 | 1 | 1 | 1 |
| 9 | 7 | 2 | 4 |
| 12 | 15 | -3 | 9 |
| 8 | 8 | 0 | 0 |
| 6 | 5 | 1 | 1 |
| 3 | 3 | 0 | 0 |
| 13 | 13 | 0 | 0 |
| 15 | 14 | 1 | 1 |
| 14 | 11 | 3 | 9 |
| 10 | 10 | 0 | 0 |
| 11 | 12 | -1 | 1 |
| 4 | 6 | -2 | 4 |
| 5 | 4 | 1 | 1 |
| --- | --- | --- | --- |
| -- | -- | -- | 36 |
`r = 1 - (6 * sum d^2)/(n(n^2 - 1))`
`=1 - (6 * 36)/(15 * (15^2 - 1))`
`=1 - (6 * 36)/(15 * (225 - 1))`
`=1 - 216/3360`
`=1 - 0.0643`
`=0.9357`
This material is intended as a summary. Use your textbook for detail explanation.
Any bug, improvement, feedback then