To calculate the coefficient of rank correlation between two variables, x and y, we use Spearman's Rank Correlation Coefficient. This statistical measure assesses the strength and direction of the association between the rankings of two variables.
Steps to calculate the Spearman's Rank Correlation Coefficient (ρ):
Rank the Data: First, we need to rank the data points for both x and y. Assign the rank of 1 to the smallest value.
Ranks for x:
x = 80, Rank = 4
x = 92, Rank = 1
x = 97, Rank = 1
x = 82, Rank = 4
x = 64, Rank = 7
x = 71, Rank = 6
x = 69, Rank = 7
x = 58, Rank = 8
Ranks for y:
y = 125, Rank = 4
y = 135, Rank = 1
y = 112, Rank = 7
y = 150, Rank = 1
y = 107, Rank = 8
y = 132, Rank = 2
y = 118, Rank = 6
y = 120, Rank = 5
Calculate the Difference (d) Between the Ranks for Each Pair and Square them (d^2):
Rank differences (d) and squared differences (d^2) for each pair:
d = 0, d^2 = 0
d = 0, d^2 = 0
d = 2, d^2 = 4
d = -3, d^2 = 9
d = -1, d^2 = 1
d = 4, d^2 = 16
d = 0, d^2 = 0
d = 3, d^2 = 9
Sum the Squared Differences (∑d^2):
∑ d 2 = 0 + 0 + 4 + 9 + 1 + 16 + 0 + 9 = 39
Calculate the Spearman's Rank Correlation Coefficient (ρ):
The formula for Spearman's rank correlation is:
ρ = 1 − n ( n 2 − 1 ) 6 ∑ d 2
Where n is the number of data points. Here, n = 8.
Substituting into the formula gives:
ρ = 1 − 8 ( 8 2 − 1 ) 6 × 39 ρ = 1 − 8 × 63 234 ρ = 1 − 504 234 ρ = 1 − 0.464 ρ ≈ 0.536
The Spearman's rank correlation coefficient between x and y is approximately 0.536, indicating a moderate positive correlation between the ranks of the two variables.