Example: how to calculate Spearman Correlation?
Sample question
The scores for nine students in history and algebra are as follows:
- History: 35, 23, 47, 17, 10, 43, 9, 6, 28
- Algebra: 30, 33, 45, 23, 8, 49, 12, 4, 31
Compute the Spearman rank correlation.
Answer
- Step 1: rank each student
| Student # | History Score | History Rank | Algebra Score | Algebra Rank |
| 1 | 35 | 3 | 30 | 5 |
| 2 | 23 | 5 | 33 | 3 |
| 3 | 47 | 1 | 45 | 2 |
| 4 | 17 | 6 | 23 | 6 |
| 5 | 10 | 7 | 8 | 8 |
| 6 | 43 | 2 | 49 | 1 |
| 7 | 9 | 8 | 12 | 7 |
| 8 | 6 | 9 | 4 | 9 |
| 9 | 28 | 4 | 31 | 4 |
- step 2: calculate difference between the ranks (d) and square d
| Student # | History Score | History Rank | Algebra Score | Algebra Rank | d | d2 |
| 1 | 35 | 3 | 30 | 5 | 2 | 4 |
| 2 | 23 | 5 | 33 | 3 | 2 | 4 |
| 3 | 47 | 1 | 45 | 2 | 1 | 1 |
| 4 | 17 | 6 | 23 | 6 | 0 | 0 |
| 5 | 10 | 7 | 8 | 8 | 1 | 1 |
| 6 | 43 | 2 | 49 | 1 | 1 | 1 |
| 7 | 9 | 8 | 12 | 7 | 1 | 1 |
| 8 | 6 | 9 | 4 | 9 | 0 | 0 |
| 9 | 28 | 4 | 31 | 4 | 0 | 0 |
- step 3: sum (add up) all the d2 scores
- Σ d2 = 4 + 4 + 1 + 0 + 1 + 1 + 1 + 0 + 0 = 12
- step 4: insert the values in the formula. These ranks are not tied, so use the first formula:
\[\rho = 1 - \frac{6\sum{d^2_i}}{n(n^2-1)}\]
= 1 – (6*12)/(9(81-1))
= 1 – 72/720
= 1-0.1
= 0.9
> The Spearman Rank Correlation for this set of data is 0.9.
Join with a free account for more service, or become a member for full access to exclusives and extra support of WorldSupporter >>
Concept of JoHo WorldSupporter
JoHo WorldSupporter mission and vision:
- JoHo wants to enable people and organizations to develop and work better together, and thereby contribute to a tolerant and sustainable world. Through physical and online platforms, it supports personal development and promote international cooperation is encouraged.
JoHo concept:
- As a JoHo donor, member or insured, you provide support to the JoHo objectives. JoHo then supports you with tools, coaching and benefits in the areas of personal development and international activities.
- JoHo's core services include: study support, competence development, coaching and insurance mediation when departure abroad.
Join JoHo WorldSupporter!
for a modest and sustainable investment in yourself, and a valued contribution to what JoHo stands for
- Login of registreer om te kunnen reageren
- 1585 keer gelezen
Applying spearman's correlation - Theme
- Login of registreer om te kunnen reageren
- 8558 keer gelezen
Work for JoHo WorldSupporter?
Volunteering: WorldSupporter moderators and Summary Supporters
Volunteering: Share your summaries or study notes
Student jobs: Part-time work as study assistant in Leiden

Contributions: posts
The Spearman's Correlation Bundle: all questions and answers
Spearman's Correlation Bundle:
- Login of registreer om te kunnen reageren
- 63296 keer gelezen
WorldSupporter insurances for backpackers, digital nomads, interns, students, volunteers or working abroad:
Search only via club, country, goal, study, topic or sector
Select any filter and click on Search to see results








Prif. Reza contributed on 11-01-2021 18:24
Azad university
Statistics Nwosu Chijioke Peter contributed on 04-06-2023 22:22
It added to my knowledge of statistics