Spearman’s Rank Correlation Coefficient Explained | 斯皮尔曼秩相关系数详解

📚 Spearman’s Rank Correlation Coefficient Explained | 斯皮尔曼秩相关系数详解

Spearman’s rank correlation coefficient is a non-parametric measure of statistical dependence between two variables. It assesses how well the relationship between two variables can be described by a monotonic function, making it an essential tool in Edexcel A-Level Further Mathematics statistics modules.

斯皮尔曼秩相关系数是衡量两个变量之间统计依赖性的非参数指标。它评估两个变量之间的关系在多大程度上可以用单调函数来描述,是 Edexcel 进阶数学统计模块中的核心工具。


1. What Is Spearman’s Rank Correlation Coefficient | 什么是斯皮尔曼秩相关系数

The Spearman rank correlation coefficient, denoted by rₛ (or sometimes ρ), measures the strength and direction of association between two ranked variables. Unlike Pearson’s correlation coefficient, which requires linear relationships and normally distributed data, Spearman’s coefficient works with ordinal data or data that has been converted to ranks.

斯皮尔曼秩相关系数用 rₛ(有时也用 ρ)表示,衡量两个排序变量之间关联的强度和方向。与要求线性关系和正态分布数据的皮尔逊相关系数不同,斯皮尔曼系数适用于顺序数据或已转换为秩的数据。

The coefficient ranges from −1 to +1, where:

该系数的取值范围为 −1 到 +1,其中:

  • rₛ = +1 indicates a perfect positive monotonic relationship — as one variable increases, the other always increases.
  • rₛ = −1 indicates a perfect negative monotonic relationship — as one variable increases, the other always decreases.
  • rₛ = 0 suggests no monotonic relationship between the variables.
  • rₛ = +1 表示完全正单调关系——一个变量增加时,另一个总是增加。
  • rₛ = −1 表示完全负单调关系——一个变量增加时,另一个总是减少。
  • rₛ = 0 表示变量之间不存在单调关系。

2. When to Use Spearman’s Coefficient | 何时使用斯皮尔曼系数

In Edexcel A-Level Further Mathematics, you should choose Spearman’s rank correlation coefficient over Pearson’s product-moment correlation coefficient in the following situations:

在 Edexcel 进阶数学考试中,在以下情况下应选择斯皮尔曼秩相关系数而非皮尔逊积矩相关系数:

  • The data is ordinal (ranked) rather than interval or ratio scale.
  • The relationship between variables is monotonic but not necessarily linear.
  • The data contains outliers that would severely affect Pearson’s coefficient.
  • The underlying population cannot be assumed to follow a normal distribution.
  • 数据是顺序尺度(秩)而非间隔或比率尺度。
  • 变量之间的关系是单调的但不一定是线性的。
  • 数据包含会严重影响皮尔逊系数的异常值。
  • 不能假设总体服从正态分布。

A key advantage of Spearman’s coefficient is that it is based solely on the ranks of the data, making it robust to extreme values and non-normal distributions.

斯皮尔曼系数的一个关键优势在于它完全基于数据的秩,因此对极端值和非正态分布具有稳健性。


3. The Formula | 公式

When there are no tied ranks, the Spearman rank correlation coefficient is calculated using the formula:

当不存在并列排名时,斯皮尔曼秩相关系数使用以下公式计算:

rₛ = 1 − (6 Σd²) / (n(n² − 1))

where d represents the difference between the ranks of each pair of observations, and n is the number of pairs of observations.

其中 d 表示每对观测值秩之间的差值,n 为观测值对的数量。

The value of Σd² is found by first ranking each dataset separately, then computing the difference between the two ranks for each observation pair, squaring these differences, and summing them.

Σd² 的值通过先对每个数据集分别排序,然后计算每对观测值两个秩之间的差值,将这些差值平方并求和得到。


4. Tied Ranks | 并列秩的处理

When two or more observations share the same value, they receive the same rank. The convention is to assign each tied value the average of the ranks they would have occupied if they had been different.

当两个或多个观测值相同时,它们获得相同的秩。约定是将每个并列值分配为它们本来占据的秩的平均值。

For example, if the third and fourth values are equal, both receive the average rank of 3.5. If three consecutive values are tied, they all receive the average of their positions.

例如,如果第 3 和第 4 个值相等,两者均获得平均秩 3.5。如果三个连续值并列,它们都获得对应位置的平均值。

Tied rank = (sum of positions occupied) / (number of tied values)

When tied ranks exist, the simplified formula above becomes slightly inaccurate. A modified formula involving correction factors is required, though in many Edexcel exam questions, you will be told to use the simpler version unless the number of ties is substantial.

当存在并列秩时,上述简化公式会略有偏差。需要包含修正因子的修正公式,不过在多数 Edexcel 考题中,除非并列数量较多,通常使用简化版本。


5. Worked Example: Step by Step | 计算实例:分步详解

Consider the following data showing the marks of 8 students in two tests, Mathematics (x) and Physics (y):

考虑以下 8 名学生在数学测试(x)和物理测试(y)中的成绩数据:

Student A B C D E F G H
Maths (x) 45 62 58 70 39 81 53 66
Physics (y) 52 58 61 74 41 85 49 60

Step 1: Rank the Mathematics scores. The highest score receives rank 1. Maths scores in descending order: 81 (F), 70 (D), 66 (H), 62 (B), 58 (C), 53 (G), 45 (A), 39 (E).

步骤 1:对数学成绩排序。最高分数获得秩 1。数学成绩降序排列:81(F)、70(D)、66(H)、62(B)、58(C)、53(G)、45(A)、39(E)。

Step 2: Rank the Physics scores. Physics scores in descending order: 85 (F), 74 (D), 61 (C), 60 (H), 58 (B), 52 (A), 49 (G), 41 (E).

步骤 2:对物理成绩排序。物理成绩降序排列:85(F)、74(D)、61(C)、60(H)、58(B)、52(A)、49(G)、41(E)。

Step 3: Construct a table of ranks and differences:

步骤 3:构建秩和差值表:

Student Rank x Rank y d = x-rank − y-rank
A 7 6 1 1
B 4 5 −1 1
C 5 3 2 4
D 2 2 0 0
E 8 8 0 0
F 1 1 0 0
G 6 7 −1 1
H 3 4 −1 1

Step 4: Calculate the sum of squared differences:

步骤 4:计算平方差之和:

Σd² = 1 + 1 + 4 + 0 + 0 + 0 + 1 + 1 = 8

Step 5: Substitute into the formula with n = 8:

步骤 5:将 n = 8 代入公式:

rₛ = 1 − (6 × 8) / (8 × (8² − 1)) = 1 − 48 / (8 × 63) = 1 − 48/504 = 1 − 0.0952 = 0.9048

The result rₛ = 0.905 indicates a very strong positive monotonic relationship between Mathematics and Physics scores among these 8 students.

结果 rₛ = 0.905 表明这 8 名学生的数学和物理成绩之间存在非常强的正单调关系。


6. Tied Ranks in the Worked Example | 实例中的并列秩

Suppose two students had the same Mathematics score. Let us modify the example so that Student A and Student E both score 45 in Mathematics. The original ranks would have been 7 and 8; both now receive the average rank:

假设两名学生的数学成绩相同。让我们修改实例,使 A 和 E 学生的数学成绩均为 45。原有的秩 7 和 8 现在都取平均值:

Average rank = (7 + 8) / 2 = 7.5

Both students receive rank 7.5 for Mathematics. The remaining ranks 1 through 6 stay unchanged, and the next rank used after the tie is 9 (skipping 8), maintaining a total sum of ranks equal to n(n + 1)/2 = 36.

两名学生在数学上均获得秩 7.5。其余秩 1 至 6 保持不变,并列后的下一个秩为 9(跳过 8),以保持秩的总和等于 n(n + 1)/2 = 36。

When ties are present, the exam may instruct you to use a correction formula. The general formula is:

当存在并列秩时,考试可能要求使用修正公式。一般公式为:

rₛ = ( (n³ − n) / 6 − Σd² − Tₓ − Tᵧ ) / √( ( (n³ − n) / 6 − 2Tₓ ) × ( (n³ − n) / 6 − 2Tᵧ ) )

where Tₓ and Tᵧ are tie correction factors for each variable, calculated as Σ(t³ − t)/12 for each group of t tied ranks.

其中 Tₓ 和 Tᵧ 分别是每个变量的并列修正因子,对每组 t 个并列秩计算 Σ(t³ − t)/12。


7. Hypothesis Testing | 假设检验

In Edexcel A-Level Further Mathematics, you are often required to perform a hypothesis test on the Spearman rank correlation coefficient. The procedure follows the standard framework:

在 Edexcel 进阶数学中,常需要对斯皮尔曼秩相关系数进行假设检验。过程遵循标准框架:

Null hypothesis H₀: There is no association between the two variables. In terms of the population Spearman coefficient, H₀: ρ = 0.

原假设 H₀:两个变量之间不存在关联。就总体斯皮尔曼系数而言,H₀: ρ = 0。

Alternative hypothesis H₁: There is an association (two-tailed: ρ ≠ 0), or a positive association (one-tailed: ρ > 0), or a negative association (one-tailed: ρ < 0).

备择假设 H₁:存在关联(双尾:ρ ≠ 0),或正关联(单尾:ρ > 0),或负关联(单尾:ρ < 0)。

The test statistic is the calculated value of rₛ. This is compared against critical values from the Spearman rank correlation coefficient table, which depend on the sample size n and the significance level.

检验统计量是计算得到的 rₛ 值。将其与斯皮尔曼秩相关系数表中的临界值进行比较,临界值取决于样本量 n 和显著性水平。


8. Using Critical Value Tables | 使用临界值表

For a two-tailed test at the 5% significance level with n = 8, the critical value is typically 0.738. The decision rule is:

对于 n = 8、显著性水平为 5% 的双尾检验,临界值通常为 0.738。决策规则是:

  • If |rₛ| > critical value, reject H₀ and conclude there is evidence of a significant association.
  • If |rₛ| ≤ critical value, do not reject H₀ and conclude there is insufficient evidence of an association.
  • 如果 |rₛ| > 临界值,拒绝 H₀,得出结论:有证据表明存在显著关联。
  • 如果 |rₛ| ≤ 临界值,不拒绝 H₀,得出结论:没有足够证据表明存在关联。

Applying this to our worked example, rₛ = 0.905 exceeds 0.738, so we reject H₀ at the 5% significance level. There is sufficient evidence to conclude that there is a positive association between Mathematics and Physics scores.

将此应用于我们的实例,rₛ = 0.905 大于 0.738,因此在 5% 的显著性水平下拒绝 H₀。有充分证据表明数学和物理成绩之间存在正关联。

For a one-tailed test at 5% significance with n = 8, the critical value is 0.643 (smaller, because all the probability is in one tail). Always check whether the question specifies one-tailed or two-tailed.

对于 n = 8、显著性水平 5% 的单尾检验,临界值为 0.643(更小,因为所有概率都在一个尾端)。务必检查题目指定的是单尾还是双尾。


9. Exam Points and Common Mistakes | 考试要点与常见错误

Students frequently lose marks on Spearman’s rank correlation questions due to avoidable errors. The most common mistakes include:

学生在斯皮尔曼秩相关题目中经常因可避免的错误而失分。最常见的错误包括:

  • Forgetting to rank each variable separately before computing differences.
  • Ranking in the wrong direction — always clarify whether rank 1 means largest or smallest, and state your convention clearly.
  • Failing to use average ranks when ties occur.
  • Using the wrong critical value (one-tailed vs two-tailed, or wrong significance level).
  • Misstating the conclusion — remember that rₛ measures monotonic association, not causation.
  • 忘记先分别对每个变量排序再计算差值。
  • 排序方向错误——务必明确秩 1 表示最大还是最小,并清楚说明你的约定。
  • 出现并列时未使用平均秩。
  • 使用了错误的临界值(单尾与双尾混淆,或显著性水平错误)。
  • 结论表述错误——记住 rₛ 衡量的是单调关联,而非因果关系。

Another common error is computing Σd² incorrectly by forgetting to square the differences before summation. Additionally, always verify that the ranks you assign sum to n(n + 1)/2; this is a quick check for arithmetic accuracy.

另一个常见错误是在求和之前忘记对差值进行平方而算错 Σd²。此外,始终验证所分配秩的总和等于 n(n + 1)/2,这是快速检查算术准确性的方法。


10. Comparing Spearman and Pearson Coefficients | 斯皮尔曼与皮尔逊系数的比较

Understanding the distinction between Spearman’s and Pearson’s coefficients is crucial for selecting the correct method in exam questions. The following table summarises the key differences:

理解斯皮尔曼系数与皮尔逊系数之间的区别对于在考题中选择正确的方法至关重要。下表总结了关键差异:

Feature Pearson’s r Spearman’s rₛ
Data type Interval / ratio Ordinal or any ranked data
Relationship measured Linear Monotonic
Distribution assumption Bivariate normal None
Outlier sensitivity High Low

In the Edexcel syllabus, both coefficients appear in the Statistics section of Further Mathematics. Examiners often include a question asking you to justify your choice of coefficient — mentioning that the data may not be normally distributed or may contain outliers is usually sufficient.

在 Edexcel 考纲中,两个系数都出现在进阶数学的统计部分。考官经常设置问题要求你说明选择系数的理由——指出数据可能不服从正态分布或可能包含异常值通常就足够了。


11. Worked Exam Style Question | 考试风格例题

A teacher investigates whether students who rank highly in music also rank highly in art. Ten students are ranked in both subjects as follows:

一位老师调查在音乐方面排名靠前的学生是否也在艺术方面排名靠前。十名学生在两个科目中的秩如下:

Student 1 2 3 4 5 6 7 8 9 10
Music rank 2 5 1 8 4 7 6 3 10 9
Art rank 3 4 2 7 5 8 9 1 6 10

Calculate the Spearman rank correlation coefficient and test at the 5% significance level whether there is evidence of a positive association.

计算斯皮尔曼秩相关系数,并在 5% 显著性水平下检验是否存在正关联的证据。

Solution: Compute d and d² for each student:

解答:计算每名学生的 d 和 d²:

d values: −1, 1, −1, 1, −1, −1, −3, 2, 4, −1

d² values: 1, 1, 1, 1, 1, 1, 9, 4, 16, 1

Σd² = 36

With n = 10:

代入 n = 10:

rₛ = 1 − (6 × 36) / (10 × (10² − 1)) = 1 − 216 / 990 = 1 − 0.2182 = 0.7818

For a one-tailed test at 5% significance with n = 10, the critical value is 0.564. Since rₛ = 0.782 > 0.564, we reject H₀ and conclude there is sufficient evidence of a positive association between music and art rankings.

对于 n = 10、5% 显著性水平的单尾检验,临界值为 0.564。由于 rₛ = 0.782 > 0.564,我们拒绝 H₀,并得出结论:有充分证据表明音乐与艺术排名之间存在正关联。


12. Summary and Revision Tips | 总结与复习建议

Spearman’s rank correlation coefficient is a versatile and frequently examined topic in Edexcel A-Level Further Mathematics. The key steps to remember are: rank each dataset separately, handle ties using average ranks, compute the differences, square and sum them, and apply the formula correctly.

斯皮尔曼秩相关系数是 Edexcel 进阶数学中灵活多变且经常考查的主题。需要记住的关键步骤是:分别对每个数据集排序,使用平均秩处理并列,计算差值,平方求和,并正确套用公式。

For hypothesis testing, always state H₀ and H₁ clearly, identify whether the test is one-tailed or two-tailed, use the correct critical value for your sample size, and phrase your conclusion in the context of the question.

对于假设检验,始终清楚说明 H₀ 和 H₁,确定检验是单尾还是双尾,根据样本量使用正确的临界值,并结合题目情境表述结论。

Finally, practice with past paper questions, paying attention to marking schemes that expect specific wording in conclusions — phrases such as “there is evidence of a positive correlation” rather than merely “reject H₀” will earn full marks.

最后,用历年真题练习,注意评分标准对结论表述的具体要求——例如使用”有证据表明存在正相关”而非仅仅”拒绝 H₀”才能获得满分。

Published by TutorHao | Further Mathematics Revision Series | aleveler.com

更多咨询请联系16621398022(同微信)

Comments

屏轩国际教育cambridge primary/secondary checkpoint, cat4, ukiset,ukcat,igcse,alevel,PAT,STEP,MAT, ibdp,ap,ssat,sat,sat2课程辅导,国外大学本科硕士研究生博士课程论文辅导

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Discover more from aleveler.com

Subscribe now to keep reading and get access to the full archive.

Continue reading