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

  1. Step 1: rank each student
HistoryRankAlgebraRank
353305
235333
471452
176236
10788
432491
98127
6949
284314
  1. step 2: calculate difference between the ranks (d) and square d
HistoryRankAlgebraRankdd2
35330524
23533324
47145211
17623600
1078811
43249111
9812711
694900
28431400
  1. step 3: sum (add up) all the d2 scores
  • Σ d2 = 4 + 4 + 1 + 0 + 1 + 1 + 1 + 0 + 0 = 12
  1. 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.

Connect & Continue
WorldSupporter Resources

Applying spearman's correlation

What does the Speaman Correlation measure?

  • The Spearman correlation (denoted as p (rho) or rs) measures the strength and direction of association between two ranked variables.
  • It is most commonly used to measure the degree and direction of a linear relation between two variables that are of the ordinal type.

What are the assumptions of the Spearman Correlation test?

  • two variables that are either ordinal, interval or ratio (note: if the data are interval or ratio, normally you would use a Pearson correlation test)
  • the relationship between the variables is monotonic, or (curvi)linear
Contributions, Comments & Kudos

Prif.

Azad university

Add new contribution

CAPTCHA
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Enter the characters shown in the image.
Summaries & Study Note of Statistics Supporter
Join World Supporter
Join World Supporter
Log in or create your free account

Why create an account?

  • Your WorldSupporter account gives you access to all functionalities of the platform
  • Once you are logged in, you can:
    • Save pages to your favorites
    • Give feedback or share contributions
    • participate in discussions
    • share your own contributions through the 11 WorldSupporter tools
Content
Access level of this page
  • Public
  • WorldSupporters only
  • JoHo members
  • Private
Statistics
20 1 1
Promotions
vacatures

JoHo kan jouw hulp goed gebruiken! Check hier de diverse bijbanen die aansluiten bij je studie, je competenties verbeteren, je cv versterken en je een bijdrage laten leveren aan een mooiere wereld