ArticleslgStudy

mathematics

Spearman's rank correlation coefficient

Spearman's rank correlation coefficient is a mathematics topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Spearman's rank correlation coefficient rather than just read about it. In short: In statistics, Spearman's rank correlation coefficient or Spearman's ρ is a number ranging from -1 to 1 that indicates how strongly two sets of ranks are correlated. It is used in situations where the ranking of a dataset is important, for instance in sports.

Spearman's rank correlation coefficient — main illustration
Spearman's rank correlation coefficient — illustration

Key takeaways

  • Spearman's rank correlation coefficient belongs to mathematics; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Spearman's rank correlation coefficient to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Spearman's rank correlation coefficient from memory before moving on to harder problems.

Reference excerpt

In statistics, Spearman's rank correlation coefficient or Spearman's ρ is a number ranging from -1 to 1 that indicates how strongly two sets of ranks are correlated. It is used in situations where the ranking of a dataset is important, for instance in sports. If a statistician wanted to know whether people who are high ranking in sprinting are also high ranking in long-distance running, they would use a Spearman rank correlation coefficient. The coefficient is named after Charles Spearman and often denoted by the Greek letter ρ {\displaystyle \rho } (rho) or as r s {\displaystyle r_{s}} . It is a nonparametric measure of rank correlation (statistical dependence between the rankings of two variables). It assesses how well the relationship between two variables can be described using a monotonic function. The Spearman correlation between two variables is equal to the Pearson correlation between the rank values of those two variables; while Pearson's correlation assesses linear relationships, Spearman's correlation assesses monotonic relationships (whether linear or not). If there are no repeated data values, a perfect Spearman correlation of +1 or −1 occurs when each of the variables is a perfect monotone function of the other. Intuitively, the Spearman correlation between two variables will be high when observations have a similar (or identical for a correlation of 1) rank (i.e., relative position label of the observations within the variable: 1st, 2nd, 3rd, etc.) between the two variables, and low when observations have a dissimilar (or fully opposed for a correlation of −1) rank between the two variables. Spearman's coefficient is appropriate for both continuous and discrete ordinal variables. Both Spearman's ρ {\displaystyle \rho } and Kendall's τ {\displaystyle \tau } can be formulated as special cases of a more general correlation coefficient.

Applications The coefficient can be used to determine how well data fits a model, like when determining the similarity of text documents.

Definition and calculation The Spearman correlation coefficient is defined as the Pearson correlation coefficient between the rank variables. For a sample of size n , {\displaystyle \ n\ ,} the n {\displaystyle \ n\ } pairs of raw scores ( X i , Y i ) {\displaystyle \ \left(X_{i},Y_{i}\right)\ } are converted to ranks R ⁡ [ X i ] , R ⁡ [ Y i ] , {\displaystyle \ \operatorname {R} [X_{i}],\operatorname {R} [Y_{i}]\ ,} and r s {\displaystyle \ r_{s}\ } is computed as

r s = ρ ⁡ [ R ⁡ [ X ] , R ⁡ [ Y ] ] = cov ⁡ [ R ⁡ [ X ] , R ⁡ [ Y ] ] σ R ⁡ [ X ] σ R ⁡ [ Y ] , {\displaystyle r_{s}=\operatorname {\rho } {\bigl [}\ \operatorname {R} [X],\operatorname {R} [Y]\ {\bigr ]}={\frac {\ \operatorname {cov} {\bigl [}\ \operatorname {R} [X],\operatorname {R} [Y]\ {\bigr ]}\ }{\ \sigma _{\operatorname {R} [X]}\ \sigma _{\operatorname {R} [Y]}\ }},}

where

ρ ⁡ {\displaystyle \operatorname {\rho } \ } denotes the conventional Pearson correlation coefficient operator, but applied to the rank variables,

cov ⁡ [ R ⁡ [ X ] , R ⁡ [ Y ] ] {\displaystyle \operatorname {cov} {\bigl [}\ \operatorname {R} [X],\operatorname {R} [Y]\ {\bigr ]}\ } is the covariance of the rank variables,

… excerpt ends here. Continue reading the full article.

Illustrations

Spearman's rank correlation coefficient: A Spearman correlation of 
  
    
      
        1
      
    
    {\textstyle 1}
  
 results when the two variables being compared are monotonically related, even if their relationship is not linear. This means that all data points with greater 
  
    
      
        x
      
    
    {\textstyle x}
  
 values than that of a given data point will have greater 
  
    
      
        y
      
    
    {\textstyle y}
  
 values as well. In contrast, this does not give a perfect Pearson correlation.
A Spearman correlation of 1 {\textstyle 1} results when the two variables being compared are monotonically related, even if their relationship is not linear. This means that all data points with greater x {\textstyle x} values than that of a given data point will have greater y {\textstyle y} values as well. In contrast, this does not give a perfect Pearson correlation.
Spearman's rank correlation coefficient: When the data are roughly elliptically distributed and there are no prominent outliers, the Spearman correlation and Pearson correlation give similar values.
When the data are roughly elliptically distributed and there are no prominent outliers, the Spearman correlation and Pearson correlation give similar values.
Spearman's rank correlation coefficient: The Spearman correlation is less sensitive than the Pearson correlation to strong outliers that are in the tails of both samples. That is because Spearman's ρ limits the outlier to the value of its rank.
The Spearman correlation is less sensitive than the Pearson correlation to strong outliers that are in the tails of both samples. That is because Spearman's ρ limits the outlier to the value of its rank.
Spearman's rank correlation coefficient illustration
Spearman's rank correlation coefficient illustration

Worked examples

Example 1 — a first encounter with Spearman's rank correlation coefficient

Start with the simplest possible case. Write down what Spearman's rank correlation coefficient claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In mathematics, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Spearman's rank correlation coefficient before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Spearman's rank correlation coefficient ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Spearman's rank correlation coefficient

In research
Spearman's rank correlation coefficient appears in mathematics research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Spearman's rank correlation coefficient in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Spearman's rank correlation coefficient is common in secondary-school and first-year university syllabi. It links to neighbouring topics Covariance and correlation, Information retrieval evaluation, Nonparametric statistics, so understanding it makes those chapters shorter.
In everyday life
Look for Spearman's rank correlation coefficient outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Spearman's rank correlation coefficient” →

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study Spearman's rank correlation coefficient in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Spearman's rank correlation coefficient means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Spearman's rank correlation coefficient out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Spearman's rank correlation coefficient in simple terms?

In statistics, Spearman's rank correlation coefficient or Spearman's ρ is a number ranging from -1 to 1 that indicates how strongly two sets of ranks are correlated. It is used in situations where the ranking of a dataset is important, for instance in sports.

Why does Spearman's rank correlation coefficient matter?

Because it connects several mathematics ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Spearman's rank correlation coefficient?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Spearman's rank correlation coefficient.

Tags

  • Covariance and correlation
  • Information retrieval evaluation
  • Nonparametric statistics
  • Statistical tests

Keep exploring