Correlation: PMCC and Spearman’s Rank | 相关性:积矩相关系数与斯皮尔曼等级相关系数

📚 Correlation: PMCC and Spearman’s Rank | 相关性:积矩相关系数与斯皮尔曼等级相关系数

In A-Level Mathematics, understanding correlation allows you to quantify the strength and direction of a linear (or monotonic) relationship between two variables. Edexcel requires you to be fluent with scatter diagrams, the product moment correlation coefficient (PMCC), and Spearman’s rank correlation coefficient, as well as the crucial distinction between correlation and causation.

在 A-Level 数学中,理解相关性意味着你可以量化两个变量之间线性(或单调)关系的强度和方向。Edexcel 考纲要求你熟练掌握散点图、积矩相关系数(PMCC)和斯皮尔曼等级相关系数,以及相关性不等于因果关系这一关键区别。


1. What is Correlation? | 什么是相关性?

Correlation measures the degree to which two variables move together in a data set. It is a statistical tool that helps us investigate whether larger values of one variable tend to occur with larger (or smaller) values of another. Correlation coefficients condense this relationship into a single number between -1 and +1.

相关性衡量的是数据集中两个变量共同变动的程度。它是一种统计工具,帮助我们探究一个变量取值较大时,另一个变量是否也倾向较大(或较小)。相关系数将这种关系浓缩为 -1 到 +1 之间的一个数字。


2. Scatter Diagrams and Types of Correlation | 散点图与相关性的类型

A scatter diagram is a first essential step. By plotting paired data (x, y) on a graph, you visually assess the pattern. Points sloping upward indicate positive correlation; points sloping downward indicate negative correlation. When the points follow a tight straight line, the correlation is strong; a loose cloud suggests weak correlation, and no discernible pattern means zero correlation.

散点图是至关重要的第一步。通过将成对数据 (x, y) 绘制在图上,你可以直观地评估分布模式。点向上倾斜表明正相关;向下倾斜表明负相关。当点紧密地沿一条直线分布时,相关性很强;分散的云雾状表明弱相关,没有明显模式则意味着零相关。

Formally, Edexcel expects you to recognise:

Edexcel 希望你能够准确识别:

  • Positive linear correlation: as x increases, y tends to increase.
  • 正线性相关:x 增加,y 也趋于增加。
  • Negative linear correlation: as x increases, y tends to decrease.
  • 负线性相关:x 增加,y 反而趋于减小。
  • Zero or no correlation: no linear pattern visible.
  • 零相关或无相关:观察不到任何线性模式。

3. The Product Moment Correlation Coefficient (PMCC) | 积矩相关系数 (PMCC)

The PMCC, denoted by r on a sample, is the most common measure of linear correlation. It was developed by Karl Pearson and is therefore often called Pearson’s r. For two variables x and y, r assesses how well a straight line summarises the data. It is invariant to changes of scale and origin, meaning you can add constants or multiply both variables by constants without changing r.

积矩相关系数(样本中用 r 表示)是衡量线性相关最常用的指标。它由卡尔·皮尔逊提出,所以常被称为皮尔逊的 r。对于两个变量 x 和 y,r 评估一条直线概括数据的效果有多好。它对尺度和原点的变化不敏感,意味着你可以加常数或乘以常数而不改变 r 的值。


4. Formula for PMCC | 积矩相关系数的公式

The PMCC formula given in the Edexcel formula booklet is

Edexcel 公式手册中给出的 PMCC 公式为

r = Sxy / √(Sxx Syy)

where the intermediate sums are defined as

其中中间和式定义为

Sxx = ∑ x² – (∑ x)² / n

Syy = ∑ y² – (∑ y)² / n

Sxy = ∑ xy – (∑ x ∑ y) / n

Here, n is the number of paired observations. You can either compute Sxx, Syy, Sxy directly from raw sums or use the equivalent forms with deviations from the mean. Calculators can produce r quickly, but you must demonstrate understanding of the formula in written papers.

这里 n 是成对观测值的数量。你可以用原始数值的总和直接计算 Sxx、Syy 和 Sxy,也可以使用均值离差的等价形式。尽管计算器可以快速给出 r,但书面考试中你必须展示对公式的理解。


5. Calculating PMCC: Step-by-Step Example | 计算 PMCC:分步示例

Consider a small dataset of six students: hours of revision (x) and test score (y). The pairs are (2, 50), (3, 55), (5, 65), (6, 70), (8, 78), (9, 82). We will compute r manually to illustrate the process.

考虑一个包含六名学生的小型数据集:复习小时数 (x) 和测试分数 (y)。数据对为 (2, 50), (3, 55), (5, 65), (6, 70), (8, 78), (9, 82)。我们将手动计算 r 以演示过程。

First, set up a table to organise the sums.

首先,建立表格以整理各项总和。

x y x² y² xy
2 50 4 2500 100
3 55 9 3025 165
5 65 25 4225 325
6 70 36 4900 420
8 78 64 6084 624
9 82 81 6724 738
∑x=33 ∑y=400 ∑x²=219 ∑y²=27458 ∑xy=2372

Now compute the components:

现在计算各个分量:

Sxx = 219 – (33)² / 6 = 219 – 1089/6 = 219 – 181.5 = 37.5

Syy = 27458 – (400)² / 6 = 27458 – 160000/6 ≈ 27458 – 26666.67 = 791.33

Sxy = 2372 – (33 × 400) / 6 = 2372 – 13200/6 = 2372 – 2200 = 172

Hence, r = 172 / √(37.5 × 791.33) ≈ 172 / √29674.875 ≈ 172 / 172.26 ≈ 0.9985. This extremely high positive r confirms a very strong linear relationship.

于是,r = 172 / √(37.5 × 791.33) ≈ 172 / √29674.875 ≈ 172 / 172.26 ≈ 0.9985。这个极高的正 r 值证实了很强的线性关系。


6. Interpreting the r Value | 解读 r 值

The value of r lies in the interval [-1, 1]. The sign indicates direction, the magnitude indicates strength. In Edexcel exams, typical interpretations are:

r 的值介于 [-1, 1] 之间。符号指示方向,绝对值大小指示强度。Edexcel 考试中常见的解读为:

  • r = 1: perfect positive correlation – all points lie exactly on a line with positive slope.
  • r = 1:完全正相关——所有点严格落在一条斜率为正的直线上。
  • r close to +1 (e.g., 0.8 to 0.99): strong positive correlation.
  • r 接近 +1(例如 0.8 到 0.99):强正相关。
  • r around 0: little or no linear correlation, even if a curve fits well.
  • r 在 0 附近:弱线性相关或无线性的相关,即使曲线拟合得很好。
  • r negative: same assessment as positive but with negative slope.
  • r 为负:与正数相同的评估方式,但斜率为负。
  • r = -1: perfect negative correlation.
  • r = -1:完全负相关。

Note: PMCC measures only linear association. A quadratic relationship may yield r close to zero despite a strong non-linear link.

注意:PMCC 只衡量线性关联。一个很强的二次关系可能使 r 接近零,尽管变量之间存在着紧密的非线性联系。


7. Spearman’s Rank Correlation Coefficient | 斯皮尔曼等级相关系数

When data is not linear but monotonic (consistently increasing or decreasing), or when dealing with ordinal data (ranks), Spearman’s rank correlation coefficient, rs, is more appropriate. It works by replacing raw values with their ranks and then applying a formula based on rank differences. Edexcel treats this as an essential alternative to PMCC.

当数据不是线性的但单调(持续增加或持续减少),或者处理有序(等级)数据时,斯皮尔曼等级相关系数 rs 更为合适。它的原理是将原始值替换为其排位,然后使用基于排位差的公式。Edexcel 将其视为 PMCC 的重要替代指标。

Spearman’s rs also lies between -1 and +1, with the same direction interpretation. A value close to +1 means high ranks correspond to high ranks; close to -1 means high ranks correspond to low ranks; close to zero means no monotonic association.

斯皮尔曼的 rs 同样介于 -1 与 +1 之间,方向的解读相同。接近 +1 意味着高排位对应高排位;接近 -1 意味着高排位对应低排位;接近零则表示不存在单调关联。


8. Formula for Spearman’s Rank | 斯皮尔曼等级相关系数的公式

Given n paired observations, rank each x and each y from 1 (smallest) to n (largest). Let di be the difference in ranks for the ith pair. The formula is

给定 n 对观测值,将 x 值和 y 值分别从 1(最小)排到 n(最大)。记 di 为第 i 对的排位差。公式为

rs = 1 – (6 ∑ di²) / (n(n² – 1))

When tied ranks exist, assign the average of the positions they would have occupied, but Edexcel often expects use of the simplified formula only after averaging ranks correctly; the approximation still holds for moderate ties. For exact tied-rank adjustments, a correlation formula akin to PMCC on ranks is used, but at A-Level the standard formula with averaged ranks is usually sufficient.

当存在并列排位时,分配它们原本占据位置的平均数。Edexcel 通常期望在正确分配平均排位后使用简化公式;该近似在少量并列时依然准确。若需精确处理并列排位,应采用类似基于排位数据的 PMCC 公式,但 A-Level 考试通常认为平均排位后的标准公式已足够。


9. Spearman’s Rank: Example with Tied Ranks | 斯皮尔曼等级相关:含有并列排名的示例

Suppose five athletes are judged by two referees on performance, giving scores out of 10:

假设两位裁判对五名运动员表现评分(满分10分):

Athlete Referee A (x) Referee B (y)
1 8 7
2 5 6
3 8 8
4 6 5
5 9 9

Rank the scores for each referee. For A: scores 5,6,8,8,9. Ranks: 5→1, 6→2, the two 8s occupy ranks 3 and 4, so each gets 3.5, 9→5. For B: scores 5,6,7,8,9. Ranks: 5→1, 6→2, 7→3, 8→4, 9→5. Compute di and di²:

为每位裁判的分数排位。裁判 A:分数 5,6,8,8,9。排位:5→1, 6→2,两个 8 占据第 3 和第 4 位,因此各得 3.5,9→5。裁判 B:分数 5,6,7,8,9。排位:5→1, 6→2, 7→3, 8→4, 9→5。计算 di 与 di²:

Athlete Rank A Rank B di di²
1 3.5 3 0.5 0.25
2 1 2 -1 1
3 3.5 4 -0.5 0.25
4 2 1 1 1
5 5 5 0 0
∑ di² 2.5

Now rs = 1 – (6 × 2.5) / (5 × (25 – 1)) = 1 – 15 / (5 × 24) = 1 – 15/120 = 1 – 0.125 = 0.875. This indicates strong positive agreement between the referees.

现在 rs = 1 – (6 × 2.5) / (5 × (25 – 1)) = 1 – 15 / (5 × 24) = 1 – 15/120 = 1 – 0.125 = 0.875。这表明裁判之间具有高度的正向一致性。


10. Choosing Between PMCC and Spearman’s Rank | 在 PMCC 和斯皮尔曼等级相关之间选择

Use PMCC (r) when the underlying relationship is believed to be linear and both variables are continuous and normally distributed. It detects only straight-line patterns, so a curved but perfect relationship will give a deceptively low r. Use Spearman’s rank (rs) when the relationship is monotonic but possibly non-linear, when outliers could distort r, or when data is ordinal (e.g., preference rankings). Spearman’s coefficient is less sensitive to extreme values because it uses ranks.

当底层关系被认为是线性的,并且两个变量都是连续且正态分布时,使用 PMCC (r)。它只能检测直线形态,因此一条完美的曲线关系可能会得出具有欺骗性的低 r 值。当关系单调但不一定是线性时,当异常值可能扭曲 r 时,或当数据为有序数据(如偏好排名)时,使用斯皮尔曼等级相关系数 (rs)。斯皮尔曼系数对极端值不那么敏感,因为它使用的是排位。

Edexcel questions often give you a scatter diagram and ask which correlation coefficient is more suitable. Look for a curved pattern, a clear outlier, or data presented as ranks – these are strong hints to choose Spearman.

Edexcel 试题通常会给出散点图并要求你判断哪种相关系数更合适。若看到曲线形态、明显的异常值或以排位形式呈现的数据——这些是选择斯皮尔曼系数的强烈提示。


11. Correlation Does Not Imply Causation | 相关性不意味着因果关系

A fundamental principle that examiners love to test is that a high correlation coefficient does not prove that changes in one variable cause changes in the other. There could be a confounding third variable, a reverse causation, or pure coincidence. For instance, ice cream sales and drowning incidents are positively correlated, not because ice cream causes drowning, but because both are influenced by hot weather.

考官热衷考察的一条基本原则是:较高的相关系数并不能证明一个变量的变化导致了另一个变量的变化。可能存在混杂的第三变量、反向因果,或纯属巧合。例如,冰淇淋销量与溺水事件正相关,不是因为冰淇淋导致溺水,而是两者都受到炎热天气的影响。

In exam explanations, always state: ‘

Published by TutorHao | A-Level Mathematics Revision Series | aleveler.com

Find Edexcel A Level Maths Textbooks on eBay UK

New, used and second-hand copies of textbooks and revision guides are often much cheaper than retail — check current listings and prices before you buy.

Browse on eBay UK →

更多咨询请联系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