Learning Objectives

By the end of this chapter, you will know when Spearman replaces Pearson, compute Spearman $\rho$ without and with tied ranks, handle ties by averaging, and interpret $\rho$ and $\rho^2$ for ordinal administrative data.

When Rank Correlation Fits

Pearson measures linear links between continuous variables. When data is ordinal, monotonic but curved, heavily skewed, or marked by outliers, Pearson loses ground. Spearman measures monotonic association by working with ranks, not raw values. It asks whether order is preserved: does a higher rank in $X$ tend to bring a higher rank in $Y$?

Choose Spearman for ordered categories, Likert scales, performance grades, priority rankings, and any sample where a few extreme values would dominate Pearson. It needs no normality assumption and tolerates outliers better because ranking compresses distance.

Feature Pearson $r$ Spearman $\rho$
Data Continuous, interval or ratio Ordinal or ranked, or continuous converted to ranks
Pattern Linear Monotonic (consistently rising or falling, not necessarily straight)
Distribution Approximate normality for inference No distributional assumption
Sensitivity to outliers High Low
Calculation Raw values Ranks $R_X$, $R_Y$

Use ranks whenever the scale itself does not support equal intervals. A Likert difference between 2 and 3 is not proven equal to the difference between 4 and 5. Ranks respect order without pretending equal gaps.

Spearman’s Formula

Rank each variable separately from lowest to highest. Let $d = R_X - R_Y$ for each pair. Let $n$ be the number of pairs.

\[\rho = 1 - \frac{6\sum d^2}{n(n^2-1)}\]

Range is $-1 \le \rho \le 1$. Positive $\rho$ means high ranks track high ranks. Negative means high tracks low. Absolute value gauges strength on the same scale as Pearson: negligible below 0.20, weak 0.20 to 0.39, moderate 0.40 to 0.59, strong 0.60 to 0.79, very strong 0.80 to 1.00.

$\rho^2$ serves like $r^2$, the proportion of variation in rank explained monotonically.

Calculation Without Ties

Example 1: Two Evaluators Rank Eight Employees

Employee Evaluator 1 $R_1$ Evaluator 2 $R_2$ $d$ $d^2$
A 1 2 -1 1
B 2 1 1 1
C 3 4 -1 1
D 4 3 1 1
E 5 6 -1 1
F 6 5 1 1
G 7 8 -1 1
H 8 7 1 1
Total     0 8

$n=8$, $\sum d^2=8$.

\[\rho = 1 - \frac{6\times 8}{8(64-1)}=1-\frac{48}{504}=1-0.0952\approx 0.905\]

Very strong agreement. The evaluators largely preserve order.

Example 2: Convert Raw Scores to Ranks

Six officers with experience $X$ years and performance $Y$ scores.

Officer $X$ $Y$ $R_X$ $R_Y$ $d$ $d^2$
E 2 60 1 1 0 0
B 3 65 2 2 0 0
A 5 78 3 3 0 0
D 6 80 4 4 0 0
C 8 85 5 5 0 0
F 10 90 6 6 0 0
Total           0
\[\rho = 1 - \frac{0}{6(35)}=1\]

Perfect monotonic preservation. Every higher experience rank pairs with the same performance rank. Pearson $r$ on the raw values would also be high, but $\rho$ signals that order alone is sufficient here.

Handling Tied Ranks

When values repeat, tied observations share the average of the ranks they would occupy.

Values 10, 15, 15, 20 would normally take ranks 1, 2, 3, 4. The two 15s would occupy 2 and 3, so each receives $(2+3)/2=2.5$. Ranks become 1, 2.5, 2.5, 4.

Example 3: Likert Ratings With Ties

Six respondents rate two services on a five point scale.

Respondent Survey 1 $X$ Survey 2 $Y$ $R_X$ $R_Y$ $d$ $d^2$
6 2 1 1 1 0 0
2 3 3 2.5 3.5 -1.0 1.00
4 3 2 2.5 2 0.5 0.25
1 4 3 4.5 3.5 1.0 1.00
5 4 5 4.5 6 -1.5 2.25
3 5 4 6 5 1.0 1.00
Total           5.50

Survey 1 ranking: 2 takes rank 1, the two 3s share 2.5, the two 4s share 4.5, 5 takes 6. Survey 2 ranking: 1 takes 1, 2 takes 2, the two 3s share 3.5, 4 takes 5, 5 takes 6.

\[n=6,\quad \rho = 1 - \frac{6\times 5.5}{6(35)}=1-\frac{33}{210}\approx 0.843\]

Strong positive monotonic link. Respondents who rank one service higher tend to rank the other higher.

Adjustment When Ties Are Many

When ties are extensive, the simple formula slightly biases $\rho$ toward zero. The tie corrected form adjusts the rank variances.

For each group of $t$ tied observations, compute $T=\frac{t^3-t}{12}$. Sum these within $X$ to get $\sum T_X$ and within $Y$ to get $\sum T_Y$. Then

\[\sum R_X^2 = \frac{n(n^2-1)}{12}-\sum T_X,\quad \sum R_Y^2 = \frac{n(n^2-1)}{12}-\sum T_Y\] \[\rho = \frac{\sum R_X^2 + \sum R_Y^2 - \sum d^2}{2\sqrt{\sum R_X^2\sum R_Y^2}}\]

In TU MPA exams, the unadjusted $1-6\sum d^2/n(n^2-1)$ is accepted unless the question explicitly demands tie correction. When many ties appear, mention the correction and its effect.

Worked Example: Palika Priority Ranks in BS 2081

Context: In Asar 2081, Karnali Province asks two groups to rank development priorities for the BS 2082 budget: officials from the Ministry of Federal Affairs and a citizen panel. Seven priorities are ranked 1 for most urgent.

Raw ranks (1 is highest priority):

Priority Officials $R_X$ Citizens $R_Y$
Drinking water 1 2
Road maintenance 2 1
Health post upgrade 3 3
School repair 5 4
Irrigation canal 4 6
Waste management 6 5
Digital services 7 7

Note two near swaps. Check ties: none, each rank 1 to 7 appears once per column, so the simple formula applies.

Priority $R_X$ $R_Y$ $d$ $d^2$
Water 1 2 -1 1
Road 2 1 1 1
Health 3 3 0 0
School 5 4 1 1
Irrigation 4 6 -2 4
Waste 6 5 1 1
Digital 7 7 0 0
Total       8
\[n=7,\quad \rho = 1 - \frac{6\times 8}{7(49-1)}=1-\frac{48}{336}=1-0.1429\approx 0.857\] \[\rho^2\approx 0.735\]

Strong positive rank agreement. Officials and citizens largely share the same order of urgency. About 73.5 percent of rank variation is shared monotonically. The largest disagreement is irrigation, where officials rank it 4th and citizens rank it 6th. That single $d^2=4$ drives half the total $\sum d^2$. Budget negotiations can therefore focus on irrigation rather than on a wholesale mismatch.

Currency and calendar anchoring: the province allocated NPR 420 million across these seven priorities for BS 2081/82. Rank agreement at $\rho=0.857$ suggests allocations aligned with both bureaucratic and citizen ordering still leave room to justify the irrigation share in NPR terms to citizens who placed it lower.

Policy use: When $\rho$ is strong but not perfect, read the $d$ column. The priority with the largest $ d $ signals where deliberation, not formula, must resolve values.

Now consider a tie case. Suppose two priorities tie in the citizen ranking at rank 3. Citizens grade both health and school as 4 on a five point Likert, so both occupy ranks 3 and 4. Each receives 3.5. $\sum d^2$ and the correction $T=(2^3-2)/12=0.5$ for that group would slightly lower the adjusted denominator. For $n=7$ with one tie of two, $\sum T_Y=0.5$, $\sum R_Y^2=28-0.5=27.5$ versus $28$ unadjusted. The adjusted $\rho$ shifts by about one to two hundredths, a footnote in a memo but worth showing in an exam if asked.

Self-check

Try this (calculable): Two judges rank six Palika proposals for the BS 2082 capital grant. Judge A: 1, 2, 3, 4, 5, 6. Judge B: 2, 3, 1, 5, 4, 6. Compute $\rho$.

Answer: Pairs: (1,2) $d=-1$ $d^2=1$, (2,3) $d=-1$ $1$, (3,1) $d=2$ $4$, (4,5) $d=-1$ $1$, (5,4) $d=1$ $1$, (6,6) $d=0$ $0$. $\sum d^2=8$, $n=6$. $\rho=1-6(8)/6(35)=1-48/210=1-0.2286\approx 0.771$. Strong agreement with one notable swap on proposal 3.

Extension: introduce a tie. Judge B gives proposals 2 and 3 equal rank. Assign both 2.5, recompute $\rho$ with and without the tie correction and compare.

Summary

Spearman $\rho = 1 - 6\sum d^2/n(n^2-1)$ measures monotonic association between ranks. It replaces raw values with order, which suits ordinal scales, curved monotonic patterns, and outlier prone samples. Ties receive averaged ranks; many ties call for the $T=(t^3-t)/12$ correction. Range remains $-1$ to $+1$. Interpretation of strength mirrors Pearson, while $rho^2$ expresses shared rank variation.

Key Takeaways

  • Use Spearman when data is ordinal, monotonic but not linear, or contaminated by outliers. Use Pearson when continuous measurement, linearity, and approximate normality hold.
  • Ranking rule: lowest value gets rank 1, highest gets $n$. Equal values share the mean of their positions.
  • $\rho = 1 - 6\sum d^2/n(n^2-1)$. $d=R_X-R_Y$. Strength bands match Pearson.
  • One tie of two adds $T=0.5$ to the correction. Many ties require the adjusted denominator. Mention it when ties are common.
  • Read the $d$ column for policy. The largest $ d $ isolates where stakeholder views diverge.

Discussion

  • A Palika reports mean Likert satisfaction 3.9 and Pearson $r=0.82$ between satisfaction and wait time. Why does the choice of Pearson over Spearman weaken the statistical defense, and how would you reframe the test?
  • Two ministries rank 10 training providers. Their $\rho$ is 0.91 yet the top ranked provider differs. How can $\rho$ be high while top choice disagrees, and what decision step does that demand?
  • You convert a continuous NPR budget variable to ranks to compute $\rho$. What information is lost, and when is that loss worthwhile to limit outlier influence?

Exercises

  1. Two judges rank six contestants: A(1,2), B(2,3), C(3,1), D(4,5), E(5,4), F(6,6). Compute $\rho$ and interpret.
  2. Staff size $X$ 50, 30, 45, 30, 60, 25 and complaints $Y$ 25, 15, 20, 18, 30, 12. Rank with tie at 30 for B and D. Compute $\rho$. Tie at 30 gives ranks 2.5 each. Check $\sum d^2$ and $\rho$.
  3. Citizen panel and official panel rank seven priorities as in the worked example. Identify the priority with maximum $ d $ and propose a deliberative step to close that gap before the BS 2082 allocation of NPR 420 million.
  4. Explain in three sentences why Spearman is less sensitive to a single extreme NPR contract value than Pearson, using the logic of ranks versus raw distances.
  5. A question asks for tie correction for ranks 4, 4, 4 on one variable. Compute $T=(3^3-3)/12$ and show how $\sum R^2$ adjusts for $n=6$.