# Spearman’s Rank Correlation Coefficient Calculator

## Spearman's Rank correlation Coefficient

Let $(x_1, y_1), (x_2, y_2), \cdots , (x_n, y_n)$ be the ranks of $n$ individuals in two characteristics $A$ and $B$ respectively.

## Spearman's Rank Correlation Formula

Then the Spearman's rank correlation coefficient is denoted by $\varrho$ and is given by

### $\varrho = 1- \dfrac{6 \sum_{i=1}^{n}d_i^2}{n(n^2-1)}$

where,

• $d_i = x_i - y_i$ is the difference between the pairs of ranks of the $i^{th}$ individual in the two characteristics and
• $n$ is the number of pairs.

Rank correlation coefficient lies between -1 and +1. i.e. $-1 \leq \varrho \leq +1$.

• If $\varrho =0$, then there is no correlation between the ranks.
• If $\varrho >0$, then there is a positive correlation between the ranks.
• If $\varrho = 1$, then there is a perfect positive correlation between the ranks.
• If $0 <\varrho < 1$, then there is a partially positive correlation between the ranks.
• If $\varrho <0$, then there is a negative correlation between the ranks.
• If $\varrho = -1$, then there is a perfect negative correlation between the ranks.
• If $-1 <\varrho < 0$, then there is a partially negative correlation between the ranks.

## Spearman's Rank Correlation Coefficient Calculator

Spearman's Rank correlation coefficient is used to measure the strength of association or relationship between two variables.

Spearman's Rank Correlation Coefficient Calculator
Data 1 : X Data 2 : Y
Enter Data (Separated by comma ,)
Results
Number of Observations (n):
Ranks for X:
Ranks for Y:
Spearman's Rank Correlation Coefficient: ($\rho_{xy}$)

## How to calculate Spearman's Rank Correlation Coefficient?

Step 1 - Enter the $X$ values separated by commas

Step 2 - Enter the $Y$ values separated by commas

Step 3 - Click calculate button to find spearman rank correlation coefficient

Step 4 - Gives the number of pairs of observations

Step 5 - Gives the Rank for $X$

Step 6 - Gives the Rank for $Y$

Step 7 - Gives the sample Spearman's Rank correlation coefficient.

## Example 1 - Find Spearman's Rank correlation coefficient

The scores given by two judges to 10 participants in a competition are as follows:

Judge A 30 29 30 47 45 36 47 37 25 47
Judge B 31 32 29 46 43 32 46 34 26 45

Determine the spearman rank correlation coefficient.

#### Solution

Let $x$ denote the scores by Judge A and $y$ denote the scores by Judge B.

Let $R_x$ denote the rank of $x$ and $R_y$ denote the rank of $y$.

$x$ $y$ Rank of $x (R_x)$ Rank of $y (R_y)$ $d=R_x-R_y$ d^2
1 30 31 7.5 8 -0.5 0.25
2 29 32 9 6.5 2.5 6.25
3 30 29 7.5 9 -1.5 2.25
4 47 46 2 1.5 0.5 0.25
5 45 43 4 4 0 0
6 36 32 6 6.5 -0.5 0.25
7 47 46 2 1.5 0.5 0.25
8 37 34 5 5 0 0
9 25 26 10 10 0 0
10 47 45 2 3 -1 1
Total 10.5

The Spearman's Rank correlation coefficient between the ranks of $x$ and $y$ is

 \begin{aligned} \varrho &= 1- \frac{6 \sum_{i=1}^{n}d_i^2}{n(n^2-1)}\\ &= 1-\frac{6 \times 10.5}{10(10^2-1)}\\ &= 1-\frac{63}{990}\\ &= 1- 0.0636364\\ &= 0.9894 \end{aligned}

The correlation coefficient between scores by Judge A and scores by Judge B is $0.9894$. Since the value of correlation coefficient is positive, there is a strong positive relationship between scores by Judge A and scores by Judge B.

## Conclusion

In this tutorial, you learned to find Spearman's rank correlation coefficient with steps by steps example. You also learned about how to interpret the Spearman's rank correlation coefficient.