← 返回资讯屏轩教育 · 行业资讯

6D Correlation and Regression | 相关性与回归

2026-08-03 03:23 · 本文部分内容由AI辅助创作

📚 6D Correlation and Regression | 相关性与回归

In IB Mathematics, understanding the relationship between two numerical variables is a fundamental part of data analysis. The topics of correlation and regression equip you with the tools to measure the strength and direction of a linear association, and to model this relationship for making predictions. Whether you are studying Analysis & Approaches or Applications & Interpretation, mastering Pearson's r, the least squares regression line, and the underlying assumptions is crucial for both your internal assessment and final examinations.

在 IB 数学中,理解两个数值变量之间的关系是数据分析的基础部分。相关性与回归主题为你提供了衡量线性关联强度和方向的工具,并对这种关系进行建模以进行预测。无论你学习的是分析与方法还是应用与解释课程,掌握皮尔逊相关系数 r、最小二乘回归线及其基本假设,对于你的内部评估和期末考试都至关重要。

1. Introduction to Bivariate Data | 双变量数据简介

Bivariate data consists of paired observations (x, y) from a sample or population. We are interested in whether changes in one variable are associated with changes in the other. The explanatory variable (x) is the one that may explain or influence the response variable (y), though correlation does not imply causation. Recognising the study design and the role of each variable is the first step in any correlation-regression analysis.

双变量数据由来自样本或总体的成对观测值 (x, y) 组成。我们关心的是一个变量的变化是否与另一个变量的变化相关联。解释变量 (x) 是可能解释或影响响应变量 (y) 的变量,尽管相关性并不意味着因果关系。识别研究设计以及每个变量的作用是任何相关与回归分析的第一步。


2. Scatter Plots and Correlation | 散点图与相关性

A scatter plot is a visual display of bivariate data, with each point representing an (x, y) pair. The overall pattern reveals the direction (positive or negative), form (linear or non‑linear), strength, and any unusual features such as outliers. Correlation describes the linear relationship between two quantitative variables. A positive correlation means that as x increases, y tends to increase; a negative correlation means y tends to decrease as x increases.

散点图是双变量数据的可视化展示,每个点代表一对 (x, y) 值。整体图形显示了方向(正或负)、形式(线性或非线性)、强度以及任何异常特征(如离群值)。相关性描述了两个定量变量之间的线性关系。正相关意味着当 x 增加时,y 倾向于增加;负相关意味着当 x 增加时,y 倾向于减少。


3. Pearson's Product-Moment Correlation Coefficient | 皮尔逊积矩相关系数

Pearson's r is a numerical measure of the strength and direction of a linear association. Its value always lies between –1 and 1. An r of +1 indicates a perfect positive linear relationship; –1 indicates a perfect negative linear relationship; and 0 suggests no linear correlation. The formula for r uses standardised deviations from the mean, and it is extremely sensitive to outliers.

皮尔逊相关系数 r 是衡量线性关联强度和方向的数值指标。它的值始终介于 –1 和 1 之间。r 为 +1 表示完全正线性关系;–1 表示完全负线性关系;0 表示没有线性相关。r 的公式使用了与均值的标准化偏差,并且它对离群值极其敏感。


4. Calculating Pearson's r | 计算皮尔逊相关系数 r

On paper, r can be found using:

r = Σ (xi − x̄)(yi − ȳ) / √[ Σ(xi − x̄)2 Σ(yi − ȳ)2 ]

where x̄ and ȳ are the sample means. In the IB exam, you will normally use your GDC to compute r directly from lists of data. However, understanding the formula helps you see why r is unit‑free and why linear transformations of the variables do not change |r|. Always check that the variables are quantitative and the relationship appears linear before calculating r.

手工计算时,r 可用以下公式得出:

r = Σ (xi − x̄)(yi − ȳ) / √[ Σ(xi − x̄)2 Σ(yi − ȳ)2 ]

其中 x̄ 和 ȳ 是样本均值。在 IB 考试中,你通常会使用图形计算器直接从数据列表中计算 r。然而,理解这个公式有助于你明白为什么 r 是无单位的,以及为什么对变量进行线性变换不会改变 |r| 的值。在计算 r 之前,务必检查变量是定量的且关系呈线性。


5. Interpretation of r and Coefficient of Determination | 相关系数 r 与决定系数的解释

The square of Pearson's r, written R2 or r2, is called the coefficient of determination. It represents the proportion of the variance in y that is explained by x. For example, an r of 0.8 gives r2 = 0.64, meaning 64% h the explanatory variable. IB exam questions frequently ask you to interpret both r and r2 in context.

皮尔逊 r 的平方,记作 R2 或 r2,称为决定系数。它表示 y 的方差中由 x 解释的比例。例如,r = 0.8 时 r2 = 0.64,意味着响应变量 64% 的变异可以通过与解释变量的线性关系来解释。IB 考题经常要求你结合实际情境解释 r 和 r2。


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

When the data are not linearly related or when you are dealing with ordinal data, Spearman's rank correlation coefficient (rs) is an alternative. It is calculated by replacing the original values with their ranks and then applying the Pearson formula to the ranks. Spearman's rs measures the strength of a monotonic relationship and is less affected by outliers. A value of +1 indicates perfect agreement in ranking.

当数据不是线性相关或处理的是顺序数据时,斯皮尔曼等级相关系数 (rs) 是一种替代方法。它通过用秩次替换原始数值,然后对秩次应用皮尔逊公式来计算。斯皮尔曼 rs 衡量单调关系的强度,且较少受离群值影响。值为 +1 表示等级完全一致。


广告 / Sponsored

7. Introduction to Linear Regression | 线性回归简介

nges with x. The equation of the line is typically written as y = a + bx, where a is the y‑ept and b is the slope. This model allows us to make predictions for y given a value of x.

相关性衡量关联,而回归则对它进行建模。简单线性回归通过双变量数据拟合一条称为回归线的直线,以描述 y 如何随 x 变化。直线的方程通常写作 y = a + bx,其中 a 是 y 轴截距,b 是斜率。该模型使我们能够根据给定的 x 值对 y 进行预测。


8. The Least Squares Regression Line | 最小二乘回归线

The most common method for finding the line of best fit is least squares regression. It minimises the sum of the squared vertical distances (residuals) from the data points to the line. The slope b and intercept a can be calculated from summary statistics:

b = r (sy / sx),    a = ȳ − b·x̄

where sx and sy are the sample standard deviations. Your GDC can produce these values instantly. The line always passes through the point (x̄, ȳ), which provides a useful check.

找到最佳拟合线最常用的方法是最小二乘回归。它最小化数据点到直线的垂直距离(残差)的平方和。斜率 b 和截距 a 可通过汇总统计量计算:

b = r (sy / sx),    a = ȳ − b·x̄

其中 sx 和 sy 是样本标准差。你的图形计算器可以立即给出这些值。回归线总是经过点 (x̄, ȳ),这提供了一个有用的检验方法。


9. Interpreting the Regression Equation and Predictions | 回归方程解释与预测

The slope b tells us the predicted change in y for a one‑ lies within or near the observed data range. When using the regression line to predict, be cautious: interpolation (predicting within the data range) is generally reliable, whereas extrapolation (predicting outside the range) can lead to unrealistic estimates because the linear trend may not hold.

斜率 b 表示 x 每增加一个单位时 y 的预测变化量。截距 a 给出了当 x = 0 时 y 的预测值,但这仅在 x = 0 位于或接近观测数据范围内时才有意义。使用回归线进行预测时要谨慎:内插(在数据范围内预测)通常可靠,而外推(在范围外预测)可能导致不切实际的估计,因为线性趋势可能不成立。


10. Residuals and Assumptions | 残差与假设条件

A residual is the difference between an observed y‑value and the value predicted by the regression line: e = yobs − ypred. Residual plots (residuals versus x or versus fitted values) are essential for checking the assumptions of linear regression. The key assumptions are: linearity, independence, constant variance (homoscedasticity), and normally distributed residuals. A random scatter in the residual plot supports the model, while clear patterns suggest the linear model is inappropriate.

残差是观测 y 值与回归线预测值之间的差:e = yobs − ypred。残差图(残差对 x 或对拟合值)对于检验线性回归的假设至关重要。关键假设包括:线性、独立性、等方差性(同方差性)和残差的正态性。残差图中随机的散点支持模型,而明显的图案则表示线性模型不合适。


11. Hypothesis Testing for Correlation (t-test) | 相关系数的假设检验(t 检验)

In IB Mathematics, you may need to test whether a population correlation coefficient ρ is significantly different from zero. The null hypothesis H0: ρ = 0 is tested using the test statistic:

t = r √n − 2 / √1 − r2

with degrees of freedom df = n − 2. The p‑value can be found from the t‑distribution or directly from a GDC linear‑regression t‑test. If the p‑value is less than the significance level (commonly 0.05), we reject H0 and conclude there is evidence of a linear relationship.

在 IB 数学中,你可能需要检验总体相关系数 ρ 是否显著不同于零。原假设 H0: ρ = 0 使用以下检验统计量进行检验:

t = r √n − 2 / √1 − r2

自由度为 df = n − 2。p 值可从 t 分布中查表获得,或直接通过图形计算器的线性回归 t 检验得到。如果 p 值小于显著性水平(通常为 0.05),我们拒绝 H0,并得出结论认为有证据表明存在线性关系。


12. Common Mistakes and Pitfalls | 常见错误与陷阱

Many students confuse correlation with causation; a high r does not prove that x causes y. Forgetting to check linearity before applying Pearson's r can result in a misleading value (e.g., a perfect U‑shaped relationship could yield a very low r). Using the regression line for extrapolation without acknowledging the risks, or relying on r2 without noting the sample size, are further pitfalls. Finally, always be aware of outliers and influential points that can dramatically change both r and the regression line.

许多学生混淆了相关性与因果关系;高 r 值并不能证明 x 导致 y。在应用皮尔逊 r 之前忘记检查线性关系可能导致误导性的数值(例如,完美的 U 形关系可能得出很低的 r)。使用回归线进行外推却不承认风险,或依赖 r2 而不考虑样本量,都是进一步的陷阱。最后,要始终留意离群值和强影响点,它们可能显著改变 r 和回归线。


Published by TutorHao | Mathematics Revision Series | aleveler.com

广告 / Sponsored
IBDP国际文凭计算机科学学生用书 高级及标准水平 Computer Science for the IB Diplo…
计算机 备考教辅 · 正版现货 · 与本文内容相关
查看详情 / View on Taobao参考价 ¥524.0

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

备考资讯每日更新,关注不错过
考纲变化 · 科目分析 · 学习方法
扫码关注公众号 tutorhao
在微信里长按二维码识别关注
或截图后用「扫一扫 → 相册」选择本图
公众号:tutorhao