• NEET
      • Class 11th
      • Class 12th
      • Class 12th Plus
    • JEE
      • Class 11th
      • Class 12th
      • Class 12th Plus
    • Class 6-10
      • Class 6th
      • Class 7th
      • Class 8th
      • Class 9th
      • Class 10th
    • View All Options
      • Online Courses
      • Offline Courses
      • Distance Learning
      • Hindi Medium Courses
      • International Olympiad
    • NEET
      • Class 11th
      • Class 12th
      • Class 12th Plus
    • JEE (Main+Advanced)
      • Class 11th
      • Class 12th
      • Class 12th Plus
    • JEE Main
      • Class 11th
      • Class 12th
      • Class 12th Plus
  • NEW
    • NEET
      • 2025
      • 2024
      • 2023
      • 2022
    • JEE 2025
    • Class 6-10
    • JEE Main
      • Previous Year Papers
      • Sample Papers
      • Result
      • Analysis
      • Syllabus
      • Exam Date
    • JEE Advanced
      • Previous Year Papers
      • Sample Papers
      • Mock Test
      • Result
      • Analysis
      • Syllabus
      • Exam Date
    • NEET
      • Previous Year Papers
      • Sample Papers
      • Mock Test
      • Result
      • Analysis
      • Syllabus
      • Exam Date
    • NCERT Solutions
      • Class 6
      • Class 7
      • Class 8
      • Class 9
      • Class 10
      • Class 11
      • Class 12
    • CBSE
      • Notes
      • Sample Papers
      • Question Papers
    • Olympiad
      • NSO
      • IMO
      • NMTC
    • TALLENTEX
    • AOSAT
    • ALLEN e-Store
    • ALLEN for Schools
    • About ALLEN
    • Blogs
    • News
    • Careers
    • Request a call back
    • Book home demo
JEE PhysicsJEE Chemistry
Home
JEE Maths
Spearman’s Rank Correlation

Spearman’s Rank Correlation 

Spearman’s rank correlation is a non-parametric measure of the strength and direction of association that exists between two ranked variables. Unlike Pearson’s correlation, Spearman correlation does not assume a linear relationship or normal distribution. It is ideal when data is ordinal or not normally distributed.

1.0What is Spearman’s Rank Correlation?

Spearman's rank correlation coefficient (denoted by ρ or rₛ) measures the monotonic relationship between two sets of data. It evaluates how well the relationship between two variables can be described by a monotonic function—where values move in the same or opposite direction without necessarily forming a straight line.

It is commonly used in cases involving ranked data, and where Pearson’s correlation may not be suitable.

2.0Formula for Spearman’s Rank Correlation

The formula for Spearman's rank correlation coefficient is: 

rs​=1−n(n2−1)6∑di2​​ 

Where:

  • rs​ = Spearman coefficient
  • di​ = difference between the ranks of corresponding values of X and Y
  • n = number of observations

This formula is used when there are no tied ranks.

3.0Handling Tied Ranks

When data has tied ranks (i.e., two or more items have the same value), average ranks are assigned. Adjustments are made to account for these ties using a more advanced version of the Spearman correlation formula that involves correction factors.

Steps to Calculate Spearman’s Rank Coefficient

  1. Rank the data: Assign ranks to both variables.
  2. Compute differences (d) between the two ranks.
  3. Square the differences: Find d2d^2 for each pair.
  4. Apply the formula for Spearman's rank correlation coefficient.
  5. Interpret the result.

4.0Interpretation of Spearman Coefficient of Correlation

Value of ρ (rₛ)

Interpretation

+1

Perfect positive correlation

0

No correlation

–1

Perfect negative correlation

5.0Applications of Spearman’s Rank Correlation

  • Psychology and social sciences (e.g., ranking test scores)
  • Market research (e.g., preference rankings)
  • Biology (e.g., ranking of traits)
  • Any scenario with ordinal data

6.0Solved Example on Spearman’s Rank Correlation

Example 1: A teacher wants to find the relationship between students’ ranks in Math and Science.

Student

Math Rank (X)

Science Rank (Y)

A

1

2

B

2

1

C

3

4

D

4

3

E

5

5

Solution:

∑d2=(1−2)2+(2−1)2+(3−4)2+(4−3)2+(5−5)2 =1+1+1+1+0=4rs​=1−5(52−1)6(4)​=1−12024​=1−0.2=0.8

Interpretation:

There is a strong positive Spearman rank correlation (rₛ = 0.8) between the Math and Science ranks.

Example 2: Find the Spearman’s rank correlation coefficient for the following data:

Student

Rank in English (X)

Rank in History (Y)

A

1

2

B

2

1

C

3

4

D

4

3

E

5

5

Solution:

Student

X

Y

d = X–Y

d²

A

1

2

-1

1

B

2

1

1

1

C

3

4

-1

1

D

4

3

1

1

E

5

5

0

0

∑d2=1+1+1+1+0=4rs​=1−5(52−1)6×4​=1−12024​=0.80

Interpretation: Strong positive correlation.

Example 3: Calculate the Spearman coefficient for:

Person

Music Rank (X)

Painting Rank (Y)

P1

3

1

P2

1

2

P3

2

3

P4

4

5

P5

5

4

Solution: 

Person

X

Y

d = X–Y

d²

P1

3

1

2

4

P2

1

2

-1

1

P3

2

3

-1

1

P4

4

5

-1

1

P5

5

4

1

1

∑d2=4+1+1+1+1=8rs​=1−5(25−1)6×8​=1−12048​=0.60

Interpretation: Moderate positive correlation.

Example 4: Two teachers rank five students based on Class Participation and Homework.

Student

Participation (X)

Homework (Y)

A

1

3

B

3

1

C

2

2

D

4

4

E

5

5

Solution: 

Student

X

Y

d = X–Y

d²

A

1

3

-2

4

B

3

1

2

4

C

2

2

0

0

D

4

4

0

0

E

5

5

0

0

∑d2=4+4+0+0+0=8rs​=1−5(25−1)6×8​=1−12048​=0.60

Interpretation: Moderate positive correlation.

Example 5: Calculate Spearman’s rank coefficient for ranks in Math and Science.

Student

Math (X)

Science (Y)

A

1

1

B

2

2

C

3

3

D

4

4

E

5

5

Solution: 

Student

X

Y

d = X–Y

d²

A

1

1

0

0

B

2

2

0

0

C

3

3

0

0

D

4

4

0

0

E

5

5

0

0

∑d2=0⇒rs​=1−5(25−1)6⋅0​=1

Interpretation: Perfect positive correlation.

Example 6: Ranks of students in two subjects are opposite. Find Spearman correlation.

Student

Economics (X)

Psychology (Y)

A

1

5

B

2

4

C

3

3

D

4

2

E

5

1

Solution: 

Student

X

Y

d = X–Y

d²

A

1

5

-4

16

B

2

4

-2

4

C

3

3

0

0

D

4

2

2

4

E

5

1

4

16

∑d2=16+4+0+4+16=40rs​=1−5(25−1)6⋅40​=1−120240​=−1

Interpretation: Perfect negative correlation.

Example 7: The following table shows the ranks of 6 students in Mathematics and Physics. Calculate Spearman's rank correlation coefficient.

Student

Math Rank (X)

Physics Rank (Y)

A

1

2

B

2

1

C

4

3

D

3

4

E

5

6

F

6

5

Solutions:

Step 1: Compute differences and squares

Student

X

Y

d = X - Y

d^2

A

1

2

–1

1

B

2

1

1

1

C

4

3

1

1

D

3

4

–1

1

E

5

6

–1

1

F

6

5

1

1

Total




6

Step 2: Apply Spearman’s rank correlation formula 

rs​=1−n(n2−1)6∑d2​=1−6(36−1)6×6​ =1−21036​=1−0.1714=0.8286

Answer:
There is a strong positive Spearman correlation between the Math and Physics ranks (rₛ ≈ 0.83).

7.0Practice Questions on Spearman’s Rank Correlation

Question 1: Calculate the Spearman coefficient of correlation for the ranks given below:

Student

Rank in History (X)

Rank in Civics (Y)

A

1

2

B

3

1

C

2

3

D

4

5

E

5

4

Question 2: A teacher recorded the following ranks for five students in Chemistry and Biology. Find Spearman's rank coefficient.

Student

Chemistry (X)

Biology (Y)

A

3

1

B

2

2

C

1

3

D

5

4

E

4

5

Question 3: The following data is collected from a class. Are the rankings of Maths and English scores positively correlated?

Student

Maths Rank

English Rank

A

1

3

B

2

1

C

3

2

D

4

5

E

5

4

Question 4: What is the Spearman rank correlation when the ranks of two variables are exactly opposite?

Question 5: Two variables X and Y have identical ranks for each item. What is the Spearman's rank correlation coefficient?

Table of Contents


  • 1.0What is Spearman’s Rank Correlation?
  • 2.0Formula for Spearman’s Rank Correlation
  • 3.0Handling Tied Ranks
  • 4.0Interpretation of Spearman Coefficient of Correlation
  • 5.0Applications of Spearman’s Rank Correlation
  • 6.0Solved Example on Spearman’s Rank Correlation
  • 7.0Practice Questions on Spearman’s Rank Correlation

Frequently Asked Questions

It is used to measure the strength and direction of the monotonic relationship between two ranked variables, especially when the data is ordinal or not normally distributed.

Pearson measures linear correlation between actual values; Spearman measures monotonic correlation between ranks of the data.

The Spearman coefficient of correlation ranges from –1 to +1, where: +1 indicates perfect positive correlation 0 indicates no correlation –1 indicates perfect negative correlation

When data points are tied, average ranks are used. A more complex version of the Spearman correlation formula with correction terms may be applied.

Yes! As long as the data can be ranked (ordinal), even if non-numeric, the Spearman rank method can be applied.

Join ALLEN!

(Session 2025 - 26)


Choose class
Choose your goal
Preferred Mode
Choose State
  • About
    • About us
    • Blog
    • News
    • MyExam EduBlogs
    • Privacy policy
    • Public notice
    • Careers
    • Dhoni Inspires NEET Aspirants
    • Dhoni Inspires JEE Aspirants
  • Help & Support
    • Refund policy
    • Transfer policy
    • Terms & Conditions
    • Contact us
  • Popular goals
    • NEET Coaching
    • JEE Coaching
    • 6th to 10th
  • Courses
    • Online Courses
    • Distance Learning
    • Online Test Series
    • International Olympiads Online Course
    • NEET Test Series
    • JEE Test Series
    • JEE Main Test Series
  • Centers
    • Kota
    • Bangalore
    • Indore
    • Delhi
    • More centres
  • Exam information
    • JEE Main
    • JEE Advanced
    • NEET UG
    • CBSE
    • NCERT Solutions
    • Olympiad
    • NEET 2025 Results
    • NEET 2025 Answer Key
    • NEET College Predictor

ALLEN Career Institute Pvt. Ltd. © All Rights Reserved.

ISO