📚 IB Mathematics: Pearson Correlation Coefficient — Calculation & Interpretation | IB数学:皮尔逊相关系数的计算与解读
In IB Mathematics, the Pearson product-moment correlation coefficient, denoted by r, is a fundamental tool for quantifying the strength and direction of a linear relationship between two quantitative variables. This article provides a comprehensive guide to its definition, calculation, interpretation, and common pitfalls, aligned with IB AI and AA syllabus requirements.
在IB数学课程中,皮尔逊积矩相关系数(记作 r)是量化两个定量变量之间线性关系强度和方向的基本工具。本文将系统讲解其定义、计算方法、解读方式以及常见易错点,完全对齐IB数学AA与AI课程大纲的要求。
1. What Is the Pearson Correlation Coefficient? | 什么是皮尔逊相关系数?
The Pearson correlation coefficient measures the degree to which two variables move linearly together. It ranges from -1 to +1, where -1 indicates a perfect negative linear relationship, +1 indicates a perfect positive linear relationship, and 0 indicates no linear relationship.
皮尔逊相关系数衡量两个变量线性同向变动的程度。其取值范围为-1到+1,其中-1表示完全负线性相关,+1表示完全正线性相关,0表示不存在线性相关。
Mathematically, for a sample of n paired observations (x₁, y₁), (x₂, y₂), ..., (xₙ, yₙ), the coefficient is defined as:
在数学上,对于n对样本观测值(x₁, y₁), (x₂, y₂), ..., (xₙ, yₙ),其定义为:
r = Sₓᵧ / √Sₓₓ × Sᵧᵧ
where Sₓᵧ = Σ(xᵢ − x̄)(yᵢ − ȳ) is the covariance sum, Sₓₓ = Σ(xᵢ − x̄)², and Sᵧᵧ = Σ(yᵢ − ȳ)².
其中 Sₓᵧ = Σ(xᵢ − x̄)(yᵢ − ȳ) 为协方差和,Sₓₓ = Σ(xᵢ − x̄)²,Sᵧᵧ = Σ(yᵢ − ȳ)²。
Equivalently, using the mean-centred formula, we can write r as the average product of standardised scores:
等价地,利用中心化公式,r可以写作标准化分数的平均乘积:
r = (1/(n−1)) Σ [(xᵢ − x̄)/sₓ] × [(yᵢ − ȳ)/sᵧ]
Here sₓ and sᵧ are the sample standard deviations of x and y respectively. This standardised view reveals why r is unit-free and invariant under linear transformations of the variables (except sign changes).
这里 sₓ 和 sᵧ 分别是x和y的样本标准差。这种标准化视角揭示了r为何无量纲,并且在变量的线性变换下保持不变(除符号变化外)。
2. Step-by-Step Calculation with a Worked Example | 分步计算与实际案例
Let us compute r manually using a small dataset. Suppose we have five students' hours of study (x) and their test scores (y):
让我们用一个小数据集手动计算r。假设有五名学生的学习时长(x)与考试成绩(y):
| x (hours) | y (score) |
| 2 | 50 |
| 4 | 60 |
| 6 | 70 |
| 8 | 85 |
| 10 | 95 |
Step 1: Calculate the means. x̄ = (2+4+6+8+10)/5 = 6. ȳ = (50+60+70+85+95)/5 = 72.
第一步:计算均值。x̄ = (2+4+6+8+10)/5 = 6。ȳ = (50+60+70+85+95)/5 = 72。
Step 2: Compute deviations from the mean for each variable.
第二步:计算每个变量相对于均值的离差。
| xᵢ−x̄ | yᵢ−ȳ | (xᵢ−x̄)(yᵢ−ȳ) | (xᵢ−x̄)² | (yᵢ−ȳ)² |
| −4 | −22 | 88 | 16 | 484 |
| −2 | −12 | 24 | 4 | 144 |
| 0 | −2 | 0 | 0 | 4 |
| 2 | 13 | 26 | 4 | 169 |
| 4 | 23 | 92 | 16 | 529 |
| Total | — | Sₓᵧ = 230 | Sₓₓ = 40 | Sᵧᵧ = 1330 |
Step 3: Substitute into the formula. r = 230 / √40 × 1330 = 230 / √53200 ≈ 230 / 230.65 ≈ 0.997.
第三步:代入公式。r = 230 / √40 × 1330 = 230 / √53200 ≈ 230 / 230.65 ≈ 0.997。
This very high positive value confirms a strong positive linear relationship between study hours and test scores — which the scatter plot would also visually suggest.
这个非常高的正值证实了学习时长与考试成绩之间存在强烈的正线性关系——散点图也会直观地显示这一点。
3. Using Your GDC: The IB Examiner's Shortcut | 使用图形计算器:IB考官的快捷方式
In the IB examination, you are expected to use a GDC (e.g., Casio fx-9860G or TI-84 Plus) to compute r efficiently. The typical steps are: enter the data into two lists (List 1 and List 2), select the two-variable statistics menu, and choose the linear regression option (ax+b). The calculator will output both a and b along with r (and r² if enabled).
在IB考试中,你应当使用图形计算器(例如卡西欧fx-9860G或德州仪器TI-84 Plus)高效地计算r。典型步骤是:将数据输入两个列表(List 1和List 2),进入双变量统计菜单,再选择线性回归选项(ax+b)。计算器会同时输出a、b以及r(若开启则还有r²)。
Important: On some calculators, the correlation coefficient is hidden unless the "DiagnosticOn" (TI) or "r" display (Casio) is activated. Practise enabling this before the exam.
重要提示:某些计算器默认不显示相关系数,除非开启“诊断模式DiagnosticOn”(TI)或激活“r”(Casio)。考前务必练习如何开启。
When presenting your solution, always show the command you use, e.g., "Using GDC, r = 0.997" calculation component, but a written interpretation is needed for the communication marks.
在书写解题过程时,务必写明所使用的指令,例如“使用GDC,r = 0.997”。在计算部分,这样写即可得满分,但口头或书面解读是获得沟通分所必需的。
4. Interpreting the Value of r | 解释r数值的含义
The sign of r tells us the direction: positive r means that as x increases, y tends to increase; negative r means that as x increases, y tends to decrease. The magnitude |r| indicates strength: |r| near 1 implies a strong linear relationship, while |r| near 0 implies a weak one.
r的符号告诉我们方向:r为正表示随着x增大,y趋于增大;r为负表示随着x增大,y趋于减小。|r|的大小表示强度:|r|接近1意味着强线性关系,而|r|接近0意味着弱线性关系。
As a rough interpretive guide, often used in IB mark schemes:
作为IB评分方案中常用的粗略解释指南:
|r| ≥ 0.8 : Very strong / strong linear correlation.
|r| ≥ 0.8:非常强/强的线性相关。
0.5 ≤ |r| < 0.8 : Moderate linear correlation.
0.5 ≤ |r| < 0.8:中等线性相关。
0.2 ≤ |r| < 0.5 : Weak linear correlation.
0.2 ≤ |r| < 0.5:弱线性相关。
|r| < 0.2 : Very weak or negligible linear correlation.
|r| < 0.2:非常弱或可忽略的线性相关。
However, these thresholds are not universal; IB questions often expect you to use your own contextual judgement. Always mention both strength and direction explicitly in your answer.
然而,这些阈值并非绝对;IB题目通常期望你结合上下文自行判断。回答时必须明确同时描述强度和方向。
5. r²: The Coefficient of Determination | r²:决定系数
y the linear regression model using x. For example, if r = 0.8, then r² = 0.64, meaning 64% of the variability in y is accounted for by its linear relationship with x.
一个重要延伸是决定系数r²。它表示y的总变异中能够被x的线性回归模型解释的比例。例如,若r = 0.8,则r² = 0.64,意味着y变异的64%可以由其与x的线性关系来解释。
This concept is particularly useful when comparing models. A higher r² indicates a better fit. Note that r² is always between 0 and 1, regardless of the direction of the relationship, because squaring removes the sign.
这个概念在比较不同模型时尤其有用。r²越高,拟合越好。注意r²始终在0到1之间,无论关系方向如何,因为平方消除了符号。
r² = Explained variation / Total variation = (r)²
In IB AI (Applications and Interpretation) papers, you may be asked to comment on r² in the context of a regression model — e.g., "82% of the variation in sales can be explained by the variation in advertising spend."
在IB AI(应用与解释)试卷中,你可能会被要求在回归模型的背景下评述r²——例如:“销售额变异的82%可以由广告支出的变异来解释。”
6. Correlation vs. Causation: The Central Warning | 相关性与因果性:核心警示
aper 2 or Paper 3 comprehension tasks. A high correlation coefficient, even r = 0.99, does not prove that x causes y. Both variables might be influenced by a third confounding variable, or the relationship might be coincidental.
这或许是IB第2卷或第3卷理解题中最常考的概念点。即使r = 0.99,高的相关系数也并不证明x导致y。两个变量可能都受第三个混淆变量影响,或者这种关系纯属巧合。
Classic example: Ice cream sales and drowning incidents are strongly positively correlated. But eating ice cream does not cause drowning; both are driven by hot summer weather. Such a variable is called a lurking or confounding variable.
经典例子:冰淇淋销量与溺水事件呈强正相关。但吃冰淇淋并不会导致溺水;两者都是炎热夏季天气驱动的。这类变量称为潜在变量或混淆变量。
In your exam answers, use precise language: say "there is evidence of a linear association" rather than "x causes y". If asked to comment on causality, state explicitly that correlation does not imply causation without further experimental or subject-matter evidence.
在考试作答中,使用精确的语言:说“存在线性关联的证据”而不是“x导致y”。如果被要求评述因果关系,请明确说明——在没有进一步实验或学科背景证据的情况下,相关不蕴含因果。
7. Outliers and Their Impact on r | 异常值及其对r的影响
Pearson's r is highly sensitive to outliers. A single extreme point can dramatically inflate or deflate the correlation, or even change its sign. This is why it is essential to plot a scatter graph before calculating r.
皮尔逊r对异常值高度敏感。一个极端点就能显著增大或减小相关系数,甚至改变其符号。这就是为什么在计算r之前必须先绘制散点图。
Consider the following scenario: the five points from our worked example, plus an outlier at (20, 20). The original r was 0.997. Adding this point, the new r drops to approximately −0.19 (you can verify this with your GDC), completely changing the interpretation.
考虑以下情景:在之前例子的五个点基础上,加上一个异常点(20, 20)。原本r为0.997。加入这个点后,新的r降至约−0.19(你可以用GDC验证),完全改变了结论。
Therefore, when interpreting r, always consider whether the data contains influential outliers. If an outlier is identified, you may need to investigate its cause — a data entry error, an exceptional case, or a valid but unusual observation — and decide whether to exclude it from the analysis.
因此,在解读r时,始终要考虑数据中是否含有有影响力的异常值。若发现异常值,你需要调查其原因——录入错误、特殊个案、或有效但罕见的观测——并决定是否将其排除出分析。
8. The Linearity Assumption: r and Curved Relationships | 线性假设:r与曲线关系
Pearson's r measures only linear relationships. If the true relationship between x and y is curved (e.g., quadratic or exponential), r may be close to zero, which incorrectly suggests no association.
皮尔逊r仅衡量线性关系。如果x与y的真实关系是弯曲的(例如二次或指数关系),r可能接近零,从而错误地暗示没有关联。
ing y = x² for x ranging from −3 to 3. The scatter plot shows a clear U-shape, but Pearson' y close to 0 because the linear fit is a horizontal line. A zero correlation does not mean "no relationship" — it means "no linear relationship".
例如,考虑x从−3到3时满足y = x²的数据。散点图呈现清晰的U形,但皮尔逊r将非常接近0,因为线性拟合是条水平线。零相关不意味着“无关系”——而是“无线性关系”。
IB exam questions sometimes provide a scatter diagram with a non-linear pattern and ask whether r is a suitable measure. The correct answer is that r is not appropriate because the assumption of linearity is violated. In such cases, a non-linear regression or a transformation of variables may be considered.
IB考题有时会给出具有非线性模式的散点图,并询问r是否适用。正确答案是r不适合,因为线性假设被违反。这种情况下,可考虑非线性回归或变量变换。
9. Hypothesis Testing for ρ (Rho) | 总体相关系数ρ的假设检验
ion in the population), and the alternative is H₁: ρ ≠ 0 (two-tailed) or ρ > 0 / ρ < 0 (one-tailed).
在IB数学AA HL(分析与方法高级水平)中,学生可能需要对总体相关系数ρ(rho)进行假设检验。原假设为H₀: ρ = 0(总体中不存在线性相关),备择假设为H₁: ρ ≠ 0(双尾)或ρ > 0 / ρ < 0(单尾)。
The test statistic is based on the sample correlation r with n − 2 degrees of freedom:
检验统计量基于样本相关系数r,自由度为n − 2:
t = r × √[(n − 2)/(1 − r²)]
For a given significance level (commonly α = 5% and conclude that there is significant evidence of a linear correlation in the population.
对于给定的显著性水平(通常α = 5%),将计算得到的t值与t分布中的临界值比较,或直接将p值与α比较。若p < α,则拒绝H₀,并得出结论:有显著证据表明总体中存在线性相关。
For our five-point dataset, with r = 0.997 and n = 5, t = 0.997 × √(3/(1−0.994)) ≈ 0.997 × √3/0.006 ≈ 0.997 × 22.36 ≈ 22.3. The p-value is far below 0.05, so we reject H₀ — the correlation is statistically significant.
计算洞察:对于我们的五组数据,r = 0.997,n = 5,则t = 0.997 × √(3/(1−0.994)) ≈ 0.997 × √3/0.006 ≈ 0.997 × 22.36 ≈ 22.3。p值远小于0.05,因此拒绝H₀——该相关性具有统计显著性。
10. Common Examiner Mistakes and Exam Tips | 常见考官陷阱与应考建议
Below are common pitfalls students make, along with actionable strategies to avoid them:
以下是学生常见的错误,以及避免它们的实用策略:
Mistake 1: Forgetting to specify "linear" when describing correlation. Always say "linear correlation".
错误一:描述相关性时忘记说明“线性”。务必说“线性相关”。
Mistake 2: Writing r = −0.5 and claiming it is "strong negative". |−0.5| = 0.5 indicates moderate strength, not strong.
错误二:写出r = −0.5却说“强负相关”。|−0.5| = 0.5表示中等强度,而非强。
Mistake 3: Using r to describe a non-linear relationship without comment. Check the scatter plot first.
错误三:未加说明就使用r描述非线性关系。先检查散点图。
Mistake 4: Interpreting r = 0 as "no relationship". It only means no linear relationship.
错误四:将r = 0解释为“没有关系”。它仅表示没有线性关系。
Exam tip: Always include units-free description, e.g., " 85, indicating a strong negative linear relationship between temperature and heating cost."
应考建议:始终给出不带单位的定性描述,例如“r = −0.85,表示气温与取暖费用之间存在强负线性关系。”
Additionally, when using a GDC, make sure your lists are correctly paired and that no empty or erroneous entries distort the computation. Double-check that the displayed r matches the scatter plot shown.
此外,使用GDC时,确保两个列表正确配对,且没有空项或错项扭曲计算。仔细核对显示的r与散点图形式一致。
11. Worked IB-Style Exam Question | 一道IB真题风格的练习题
Problem: 7.5. (a) Calculate r. (b) Interpret the value in context. (c) State what r² tells us here.
题目:一名生物学家记录了8株幼苗的天数(x)和高度(y cm)。汇总统计量如下:Σx = 56,Σy = 148,Sₓₓ = 42,Sᵧᵧ = 310,Sₓᵧ = 97.5。(a) 计算r。(b) 结合背景解读该值。(c) 说明r²在这里告诉我们什么。
Solution (a): r = 97.5 / √42 × 310 = 97.5 / √13020 ≈ 97.5 / 114.1 ≈ 0.855 (give to 3 s.f.).
解答(a): r = 97.5 / √42 × 310 = 97.5 / √13020 ≈ 97.5 / 114.1 ≈ 0.855(保留3位有效数字)。
Solution (b): There is a strong positive linear correlation between the number of days and plant height — taller plants tend to correspond to a greater number of days.
解答(b): 生长天数与植物高度之间存在强正线性相关——天数越多,植物通常越高。
Solution (c): r² = 0.855² ≈ 0.731, so approximately 73.1% on in plant height is explained by the variation in the number of days. The remaining 26.9% is due to other factors such as genetics, soil quality, or measurement error.
解答(c): r² = 0.855² ≈ 0.731,所以植物高度的变异中约有73.1%可以由生长天数的变异解释。其余26.9%归因于遗传、土壤质量或测量误差等其他因素。
12. Final Summary and Exam Strategy | 总结与应试策略
Remember the five pillars of mastering Pearson's r for IB Mathematics:
记住掌握IB数学皮尔逊r的五大支柱:
1. Define correctly: r ∈ [−1, 1], dimensionless, measures linear association.
1. 准确定义: r ∈ [−1, 1],无量纲,衡量线性关联。
2. Calculate efficiently: Use the formula or GDC; show key substitutions.
2. 高效计算: 使用公式或GDC;展示关键代入。
3. Interpret contextually: Mention direction (positive/negative) and strength (strong/moderate/weak).
3. 结合语境解读: 提到方向(正/负)和强度(强/中/弱)。
4. Look out for traps: Outliers, non-linearity, and confounding variables.
4. 警惕陷阱: 异常值、非线性和混淆变量。
5. Use r² wisely: It gives the explained variation percentage, which enriches your analysis.
5. 善用r²: 它给出可解释变异百分比,使你的分析更加丰满。
In the exam, allocate time to verify your GDC's output with a rough mental check. A quick scatter plot sketch can catch absurd r values early. Practise past-paper questions on bivariate analysis to become fluent in the language of correlation — you will see the same question styles repeated across sessions.
考试时,留出时间用粗略心算核对GDC的输出。快速画一张散点图草图可以尽早发现离谱的r值。多加练习历年真题中的双变量分析题,熟悉相关性的表述语言——你会发现同类题型在历年考试中反复出现。
Correlation does not imply causation, but mastering it implies exam success.
相关不蕴含因果,但掌握它却意味着考试成功。
Published by TutorHao | Mathematics Revision Series | aleveler.com
更多咨询请联系16621398022(同微信)

或截图后用「扫一扫 → 相册」选择本图