📚 Correlation in IB Mathematics: Pearson and Spearman | IB数学中的相关性:皮尔森与斯皮尔曼
Correlation is a fundamental concept in statistics that quantifies the strength and direction of a linear relationship between two variables. In the IB Mathematics curriculum, particularly in the Applications and Interpretation course, students learn to calculate, interpret, and test correlation coefficients using real-world data. Mastering correlation not only builds skills for internal assessments but also lays the groundwork for understanding regression, modelling, and critical data analysis.
相关性是统计学中的一个基本概念,用于量化两个变量之间线性关系的强度和方向。在IB数学课程中,尤其是应用与解释课程,学生将学习如何使用真实数据计算、解读和检验相关系数。掌握相关性不仅能培养内部评估所需的技能,也为理解回归、建模和批判性数据分析奠定了基础。
1. Introduction to Correlation | 相关性简介
Correlation measures the degree to which two variables move in relation to each other. When high values of one variable tend to be associated with high values of another, the correlation is positive. Conversely, if high values of one are linked with low values of the other, the correlation is negative. A correlation close to zero indicates no linear association.
相关性衡量的是两个变量共同变化的程度。当一个变量的高值往往与另一个变量的高值相关时,这种相关性就是正相关;反之,如果高值与低值相关,则为负相关。相关系数接近零表示不存在线性关系。
Correlation coefficients are standardised values, typically ranging from –1 to +1. The sign indicates direction, while the absolute value indicates strength. A perfect positive correlation (+1) means all data points lie exactly on an upward-sloping straight line; a perfect negative correlation (–1) lies on a downward-sloping line.
相关系数是标准化数值,通常介于–1到+1之间。符号表示方向,绝对值表示强度。完全正相关(+1)意味着所有数据点恰好落在一条向上倾斜的直线上;完全负相关(–1)则落在向下倾斜的直线上。
2. Scatter Plots and Association | 散点图与关联
Before calculating a correlation coefficient, it is essential to inspect a scatter plot. A scatter plot displays pairs of data (x, y) as points on a Cartesian plane. It reveals patterns, outliers, and the general shape of the relationship. Even if a correlation coefficient is moderate or high, a non-linear pattern can invalidate the use of a linear measure.
在计算相关系数之前,检查散点图至关重要。散点图将成对数据(x, y)以点的形式显示在笛卡尔平面上,能够揭示数据的分布模式、异常值以及关系的大致形状。即使相关系数处于中等或较高水平,非线性模式也会使线性测量失效。
IB exam questions often provide a scatter plot and ask students to describe the association. Key descriptors include direction (positive/negative), form (linear/non-linear), and strength (strong/moderate/weak). Mentioning outliers is also expected where relevant.
IB考试题目通常会给出散点图并要求学生描述关联性。关键描述词包括方向(正/负)、形式(线性/非线性)和强度(强/中等/弱)。如果存在异常值,也应予以说明。
3. Pearson’s Product-Moment Correlation Coefficient (r) | 皮尔森积矩相关系数 (r)
Pearson’s r is the most widely used measure of linear correlation. It is suitable for continuous numerical data that are approximately normally distributed and where the relationship is linear. The formula standardises the covariance of x and y by dividing it by the product of their standard deviations.
皮尔森相关系数 r 是使用最广泛的线性相关度量。它适用于近似正态分布的连续型数值数据,并且关系是线性的。该公式通过将 x 和 y 的协方差除以它们标准差的乘积来进行标准化。
The value of r is unaffected by linear transformations of the variables, meaning that changing units or adding a constant does not alter r. This property makes it a robust and comparable index across different studies.
r 的值不受变量线性变换的影响,即改变单位或加上常数不会改变 r。这一性质使其成为在不同研究间具有可比性的稳健指标。
4. Calculating Pearson’s r (Formula) | 皮尔森r的计算公式
In the IB formula booklet, Pearson’s r is given as:
在IB公式手册中,皮尔森 r 的公式为:
r = Sxy / √Sxx × Syy
where Sxx = Σ(x – x̄)² = Σx² – (Σx)²/n, Syy = Σ(y – ȳ)² = Σy² – (Σy)²/n, and Sxy = Σ(x – x̄)(y – ȳ) = Σxy – (Σx)(Σy)/n. Here n is the number of paired observations.
其中,Sxx = Σ(x – x̄)² = Σx² – (Σx)²/n,Syy = Σ(y – ȳ)² = Σy² – (Σy)²/n,Sxy = Σ(x – x̄)(y – ȳ) = Σxy – (Σx)(Σy)/n。n 为成对观测值的数量。
Calculating r manually involves building a table with columns for x, y, x², y², and xy. After finding the sums, substituting them into the formula yields r. Most IB problems allow the use of a GDC, but students should understand the underlying computation for exam-style questions that require showing steps.
手动计算 r 需要建立一个包含 x、y、x²、y² 和 xy 列的表格。求出各列总和后,代入公式即可得到 r。大多数IB题目允许使用图形计算器,但对于需要展示步骤的考题,学生仍应理解其背后的计算过程。
5. Interpreting Pearson’s r | 皮尔森r的解读
General guidelines for interpretation: |r| < 0.3 suggests a weak correlation; 0.3 ≤ |r| < 0.7 indicates a moderate correlation; and |r| lation. These thresholds are not rigid but serve as a useful rule of thumb in IB contexts.
一般的解读准则:|r| < 0.3 表示弱相关;0.3 ≤ |r| < 0.7 表示中等相关;|r| ≥ 0.7 表示强相关。这些阈值并非绝对,但在IB情境中是实用的经验法则。
ance in y that can be explained by x. For instance, if r = 0.8, then r² = 0.64, meaning 64% for by the linear relationship with x. IB questions may ask for the interpretation of r².
决定系数 r² 表示 y 的方差中可由 x 解释的比例。例如,若 r = 0.8,则 r² = 0.64,意味着 y 的总变异中有 64% 可由与 x 的线性关系解释。IB考题可能会要求解释 r²。
6. Limitations of Pearson’s r | 皮尔森r的局限性
Pearson’s r only captures linear relationships. A clear curved pattern (e.g., quadratic or exponential) may yield an r close to zero even though the variables are strongly associated in a non-linear way. Outliers can dramatically inflate or deflate r, so checking residuals and scatter plots is essential.
皮尔森 r 只能捕捉线性关系。明显的曲线模式(如二次或指数关系)可能会使 r 接近零,尽管变量之间存在很强的非线性关联。异常值会显著抬高或拉低 r,因此检查残差和散点图至关重要。
The correlation coefficient is also sensitive to restricted range. If data are collected only on a narrow range of x-values, r may underestimate the true correlation in the population. Furthermore, r assumes both variables are random and normally distributed; violating these assumptions weakens inferential statements.
相关系数还对受限范围敏感。如果仅在较窄的 x 值范围内收集数据,r 可能会低估总体中的真实相关性。此外,r 假设两个变量都是随机的且服从正态分布;违背这些假设会削弱推断结论。
7. Spearman’s Rank Correlation Coefficient (ρ) | 斯皮尔曼秩相关系数 (ρ)
Spearman’s rank correlation coefficient, often denoted by ρ or rs, measures the strength and direction of a monotonic relationship between two variables. It works by ranking the data and then applying a formula analogous to Pearson’s r on the ranks. Because it uses ranks, it is less sensitive to outliers and does not require normality.
斯皮尔曼秩相关系数,通常记为 ρ 或 rs,用于衡量两个变量之间单调关系的强度和方向。其原理是对数据排序,然后在秩次上应用类似于皮尔森 r 的公式。由于使用秩次,它对异常值不那么敏感,且不要求正态性。
Spearman’s ρ is particularly appropriate when the data are ordinal, when the relationship is non-linear but consistently increasing or decreasing, or when the sample size is small. IB questions often pair it with scatter plots that exhibit a curved but monotonic pattern.
当数据为顺序型、关系虽非线性但一致递增或递减,或样本量较小时,斯皮尔曼 ρ 尤其适用。IB考题常将它搭配表现出弯曲但单调模式的散点图一起出现。
8. Calculating Spearman’s ρ with Ranked Data | 利用排序数据计算斯皮尔曼ρ
To calculate Spearman’s ρ, first rank the x-values and y-values separately from 1 (smallest) to n (largest). Assign average ranks to tied values. Then compute the difference di between the rank of x and the rank of y for each pair. The formula with no ties is:
计算斯皮尔曼 ρ 的步骤:首先分别对 x 值和 y 值从1(最小)到 n(最大)排序,对并列值分配平均秩次。然后计算每对数据 x 的秩与 y 的秩之间的差值 di。无并列值时的公式为:
ρ = 1 – (6 Σ di²) / [n(n² – 1)]
This simple formula arises because the ranks are a permutation of the integers 1 to n, making the sum of squared ranks predictable. If there are ties, a modified version using the covariance of ranks is needed, which is often the Pearson formula applied directly to the ranks.
这个简洁的公式之所以成立,是因为秩次是1到 n 整数的一个排列,从而使得秩的平方和可以预测。如果有并列值,则需要使用秩的协方差修正公式,通常就是直接将皮尔森公式应用于秩次数据。
9. Spearman’s ρ Formula with Ties | 有并列值的斯皮尔曼ρ公式
When ties exist, the Spearman coefficient is best computed by applying Pearson’s r to the ranked data. That is, treat the ranks as x and y, find the means of the ranks (always (n+1)/2), and compute:
当存在并列值时,最好通过将皮尔森 r 应用于秩次数据来计算斯皮尔曼系数。即将秩次视为 x 和 y,求出秩的平均值(总是 (n+1)/2),然后计算:
ρ = Sxy(ranks) / √(Sxx(ranks) × Syy(ranks))
The IB formula booklet includes the Spearman formula only for the no-ties case. Students are expected to use their GDC for data with ties, or they may be given the sums of squared rank differences and a separate correction factor. Always check the instructions in the examination paper.
IB公式手册只包含了无并列值时的斯皮尔曼公式。对于有并列值的数据,学生应使用图形计算器,或者题目可能会给出秩差平方和以及单独的修正系数。务必仔细阅读试卷的答题指引。
10. Hypothesis Testing for Correlation (IB Context) | 相关性的假设检验(IB背景)
IB students are expected to perform a hypothesis test on the population correlation coefficient, ρ (or ρSpearman elation), with a two-tailed or one-tailed alternative H₁: ρ ≠ 0, ρ > 0, or ρ < 0. The test statistic for Pearson’s r uses the t-distribution:
IB学生需要针对总体相关系数 ρ(或斯皮尔曼 ρ)进行假设检验。原假设通常为 H₀: ρ = 0(无线性或单调相关),备择假设可以是双尾或单尾的 H₁: ρ ≠ 0,ρ > 0 或 ρ < 0。皮尔森 r 的检验统计量采用 t 分布:
t = r × √[(n – 2) / (1 – r²)]
The degrees of freedom are n – 2. Compare the calculated t-value with the critical value from the t-table, or use the p-value approach. For Spearman’s ρ, critical values tables specific to Spearman’s rank are provided in the formula booklet, and the test is non-parametric.
自由度为 n – 2。将计算得到的 t 值与 t 分布表中的临界值比较,或采用 p 值方法。对于斯皮尔曼 ρ,公式手册提供了专门针对斯皮尔曼秩的临界值表,该检验是非参数的。
When conducting the test, students should state hypotheses, compute the test statistic, compare with the critical value (or find p-value), and write a conclusion in context. The conclusion must relate back to the original variables, not just state “reject H₀.”
进行检验时,学生应陈述假设、计算检验统计量、与临界值比较(或求 p 值),并写出具有实际意义的结论。结论必须联系回原始变量,而不仅仅是说“拒绝 H₀”。
11. Correlation vs. Causation | 相关性与因果性
A high correlation between two variables does not imply that one causes the other. There may be a lurking variable that influences both, or the relationship could be coincidental. IB examiners frequently ask students to comment on whether a correlation implies causation, and a correct response is that correlation does not prove causation.
两个变量之间的高度相关并不意味着一个导致了另一个。可能存在一个同时影响两者的潜在变量,或者这种关系只是巧合。IB考官经常要求学生评论相关性是否意味着因果性,正确的回答是相关性不能证明因果关系。
To establish causation, a controlled experiment with randomisation is required, where all other factors are held constant. Observational studies can identify associations and generate hypotheses but cannot confirm cause-effect links. This critical thinking point is emphasised throughout the IB course.
要确定因果关系,需要进行随机化的对照实验,并控制所有其他因素保持不变。观察性研究可以识别关联并提出假设,但无法确认因果联系。这一批判性思维要点在IB课程中始终受到强调。
12. Summary and Key Points | 总结与要点
Correlation analysis is a powerful tool for exploring relationships between variables. Key takeaways include: always start with a scatter plot; choose Pearson’s r for linear, numerical data and Spearman’s ρ for monotonic or ordinal data; report both the coefficient and its interpretation (including r²); and apply hypothesis testing to determine statistical significance. Finally, remember that correlation does not imply causation — a mantra for the IB statistician.
相关性分析是探索变量间关系的有力工具。关键要点包括:始终从散点图入手;对于线性数值数据选择皮尔森 r,对于单调或顺序数据选择斯皮尔曼 ρ;报告系数及其解释(包括 r²);并运用假设检验判断统计显著性。最后,牢记相关性并不意味着因果关系——这是IB统计学者的箴言。
Published by TutorHao | 数学 Revision Series | aleveler.com
更多咨询请联系16621398022(同微信)

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