FS2 3.2 - Spearman's rank correlation

FS2 3.2 - Spearman's rank correlation

Ranks compare ordering without treating score differences as equally meaningful. You will calculate Spearman's coefficient with and without ties, keep objects correctly paired and interpret what agreement in rank does and does not establish.

Compare the ranks of the same objects

Could every score change while the rank correlation stays exactly the same?

Yes. If the ordering stays unchanged, the ranks stay unchanged. Squaring a set of positive scores, for example, changes their gaps but preserves their order and therefore their Spearman coefficient.

You already know

PMCC measures linear association between quantitative values. It can also be applied to numerical ranks. Correlation is a description of association, rather than proof of causation, and both lists must refer to the same paired objects.

Spearman's coefficient is useful for ordinal data and for investigating a monotonic association: larger values of one variable tend to accompany larger, or consistently smaller, values of the other.

Spearman's rank correlation coefficient

Spearman's sample coefficient rsr_s is the product moment correlation coefficient of the two sets of ranks. Positive values indicate similar ordering; negative values indicate opposing ordering.

Rank consistently in both variables. Here rank 11 is the smallest value; reversing both ranking directions gives the same coefficient.

When there are no ties, a shorter equivalent formula uses the differences between paired ranks.

Spearman's formula without ties

For n≥2n\ge2 objects with no tied values in either list, let Ri,SiR_i,S_i be the two ranks of object ii, and di=Ri−Sid_i=R_i-S_i. Then

rs=1−6∑di2n(n2−1)r_s=1-\frac{6\sum d_i^2}{n(n^2-1)}

Each rank list is a permutation of 1,2,…,n1,2,\ldots,n. With ties, use average ranks and their PMCC instead of this untied shortcut. In the formula booklet.

Do not match the first item in one sorted list to the first item in another: keep each object's two ranks together.

Worked example 1: ranking paired scores

Question. Two judges score six designs. Find Spearman's coefficient to three significant figures.

DesignABCDEF
Judge 1 score12121818991515212166
Judge 2 score1414202088171723231111

Plan. Rank each score row from smallest to largest, retaining design labels, then square paired rank differences.

DesignABCDEF
RR335522446611
SS335511446622
dd0000110000−1-1
d2d^2000011000011
rs=1−6(2)6(62−1)=3335=0.942857…r_s=1-\frac{6(2)}{6(6^2-1)} =\frac{33}{35}=0.942857\ldots

Why this step? Design F must retain its own two ranks, even though it occupies different positions in the two sorted score lists.

Answer. rs=0.943r_s=0.943, showing strong agreement in ordering.

Check. Only C and F exchange adjacent rank positions; the coefficient should be close to, but below, 11.

Worked example 2 changes only one feature: exchange Judge 2's scores for A and D.

Worked example 2: one additional rank exchange

Question. Recalculate the coefficient after this exchange.

Plan. Judge 1's ranks stay fixed. Judge 2's revised score row is 17,20,8,14,23,1117,20,8,14,23,11.

DesignABCDEF
RR335522446611
Revised SS445511336622
d2d^2110011110011
rs=1−6(4)6(35)=3135=0.885714…r_s=1-\frac{6(4)}{6(35)} =\frac{31}{35}=0.885714\ldots

Why this step? The extra disagreement changes ∑d2\sum d^2, while the number of paired designs remains 66.

Answer. rs=0.886r_s=0.886, to three significant figures.

Check. The coefficient has decreased because the rank disagreement increased.

An object's letter is a label, not a rank. If rankings are supplied as ordered lists of names, first write each object's position in each list before forming differences.

Watch out

Wrong: treat A as rank 11, pair objects by their sorted positions, or omit the initial 1−1- in the formula. Right: rank each variable, align the same objects and square their differences.

Make one further exchange in Judge 2's scores.

Average tied ranks, then calculate their PMCC

A tie occupies several positions without deciding an order inside them. Give each tied observation the average of the positions it occupies. Two observations sharing positions 22 and 33 both receive rank 2.52.5; the next rank is 44.

This average-rank convention is not separately printed in the booklet. For tied data, calculate PMCC on the rank pairs. Do not apply the untied ∑d2\sum d^2 shortcut as though every row still contained distinct ranks.

[DIAGRAM: asset_name: Tied observations share the mean of their rank positions; asset_slug: 9fm0-fs2-125-average-ranks; caption: A tied group uses all its occupied positions and gives their average to every member; description: A clear six-row table shows ordered scores ten,twenty,twenty,thirty,forty,forty. Their occupied-position groups are one; two and three for each twenty; four; five and six for each forty. Assigned ranks are one,2.5,2.5,four,5.5,5.5. The two tied groups are highlighted in pale blue and pale clay. Side notes give the averages of positions two and three and of positions five and six, and note that the following rank is not compressed]
A tied group uses all its occupied positions and gives their average to every member

Continue this lesson.

You’re previewing NovaLearn without an account. Create a free account to read the rest.

Create free account