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

Linear Models | 线性模型

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

📚 Linear Models | 线性模型

In IB Mathematics, linear models offer a systematic way to describe relationships between two variables using a straight-line equation. These models appear across the syllabus, from simple linear functions to the more applied topics of bivariate statistics and least squares regression. Mastering linear models means understanding how to construct them from data, interpret key statistics like the correlation coefficient and residuals, and recognise their power and limitations in making predictions.

在 IB 数学中,线性模型用一种直线方程系统性地描述两变量之间的关系。从简单的线性函数到二元统计和最小二乘回归的应用专题,这些模型贯穿整个课程。掌握线性模型意味着学会如何从数据中构建模型、解读相关系数和残差等关键统计量,并认清它们在预测中的能力与局限。


1. Understanding Linear Functions and Linear Models | 理解线性函数与线性模型

emphasise that a is the intercept and b is the slope. A linear model assumes that the change in the response variable is proportional to the change in the explanatory variable.

线性函数描述的是形如 y = mx + c(或 y = ax + b)的关系,其中 m 为梯度,c 为 y 轴截距。在统计学背景下,我们常将模型写为 y = a + bx,以突出 a 为截距、b 为斜率。线性模型假设响应变量的变化与解释变量的变化成比例。

While the mathematical form is simple, a linear model becomes powerful when it is fitted to real data. The goal is to find the line that best summarises the pattern in a scatter plot, allowing us to make predictions, test relationships, and quantify uncertainty. In IB exams, you may be asked to identify from context whether a linear model is appropriate or to interpret slope and intercept in real-world terms.

尽管数学形式很简单,但线性模型一旦与真实数据拟合就会变得非常强大。我们的目标是找到一条最佳概括散点图规律的直线,从而能够进行预测、检验关系并量化不确定性。在 IB 考试中,你可能会被要求根据上下文判断线性模型是否合适,或者用现实情境解释斜率和截距。


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

f the squared vertical distances (residuals) between the observed points and the line. The resulting line is often called the regression line of y on x.

最常用的数据拟合线性模型方法是最小二乘法。该方法寻找一条直线 y = a + bx,使得所有观测点与直线之间竖直距离(残差)的平方和最小。得到的直线通常称为 y 对 x 的回归线。

We use the line of y on x when we treat x as the independent (explanatory) variable and y as the dependent (response) variable. If we swap the roles, we would obtain a different regression line of x on y. IB problems almost always focus on the y-on-x regression line, and you will be expected to calculate its equation from either raw data or summary statistics.

当我们把 x 当作独立(解释)变量、把 y 当作依存(响应)变量时,使用的就是 y 对 x 的回归线。如果交换两者的角色,就会得到不同的 x 对 y 回归线。IB 题目几乎总是聚焦于 y 对 x 回归线,你需要能够从原始数据或汇总统计量计算出它的方程。


3. Calculating Regression Coefficients a and b | 计算回归系数 a 与 b

For a set of n data pairs (xi, yi), the slope b is given by:

对于 n 组数据对 (xi, yi),斜率 b 的计算公式为:

b = Sxy / Sxx

where Sxy = Σ(xi − x)(yi − y) and Sxx = Σ(xi − x)². Equivalently, b can be expressed as b = r · (sy / sx), where r is the correlation coefficient and sx, sy are the sample standard deviations.

其中 Sxy = Σ(xi − x)(yi − y),Sxx = Σ(xi − x)²。等价地,b 也可以写成 b = r · (sy / sx),其中 r 为相关系数,sx、sy 是样本标准差。

The intercept a is then found using the means:

截距 a 则通过均值求得:

a = y − b x

This ensures the regression line passes through the point of means (x, y). In IB examinations, you may use your GDC to obtain a and b directly, but you must also know how to interpret these formulas and how changes in data affect the coefficients.

这保证了回归线通过均值点 (x, y)。在 IB 考试中,你可以使用图形计算器直接得到 a 和 b,但必须理解这些公式的含义,以及数据变化如何影响系数。


4. Pearson's Correlation Coefficient | 皮尔逊相关系数

Pearson's product-moment correlation coefficient, denoted by r, measures the strength and direction of a linear relationship between two variables. Its value lies in the interval [−1, 1]. An r close to 1 indicates a strong positive linear correlation; an r close to −1 indicates a strong negative linear correlation; and r near 0 suggests very weak or no linear correlation.

皮尔逊积矩相关系数,记作 r,衡量两个变量之间线性关系的强度和方向。它的取值在区间 [−1, 1] 内。r 接近 1 表示强正线性相关;r 接近 −1 表示强负线性相关;r 接近 0 则意味着线性相关性非常弱或不存在。

The formula for r is:

r 的公式为:

r = Sxy / √Sxx · Syy

where Syy = Σ(yi − y)². Using the standard deviations, we also have r = b · (sx / sy). It is crucial to remember that correlation does not imply causation. An observed correlation may be due to a lurking variable or pure chance, and IB questions often test this conceptual understanding.

其中 Syy = Σ(yi − y)²。利用标准差,我们也可以得到 r = b · (sx / sy)。必须牢记,相关关系并不意味着因果关系。观测到的相关可能是由于潜在变量或纯粹的随机性造成的,IB 题目常常会考查这一概念理解。


5. Coefficient of Determination r² | 决定系数 r²

nt variable through the linear model. For instance, if r = 0.9, then r² = 0.81, meaning 81% of the variability in y can be accounted for by the linear relationship with x.

决定系数 r² 告诉我们因变量的变异中有多大比例可以由自变量通过线性模型加以解释。例如,若 r = 0.9,则 r² = 0.81,意味着 y 中 81% 的变异可以归因于与 x 的线性关系。

This interpretation turns a dimensionless measure of correlation into a more tangible statement about model fit. A high r² does not necessarily mean the model is causal or appropriate; it simply quantifies the linear association in the sample. In IB exam responses, connecting r² to the percentage of explained variation is a common requirement.

这一解释将无量纲的相关度量转化为关于模型拟合的更加具体的陈述。高的 r² 并不一定意味着模型是因果性的或合适的,它只是量化了样本中的线性关联。在 IB 考试作答中,将 r² 与已解释变异百分比联系起来是常见的要求。


广告 / Sponsored

6. Residuals and Residual Plots | 残差与残差图

e between an observed y-value and the value predicted by the regression line: residual = yobs − ypred. Residuals are essential for checking whether a linear model is appropriate. If the model fits well, the residuals should be randomly scattered around zero with no obvious pattern.

残差是观测到的 y 值与回归线预测值之间的差:残差 = yobs − ypred。残差对于检查线性模型是否合适至关重要。如果模型拟合良好,残差应当随机散布在零附近,没有明显的规律。

A residual plot graphs residuals against the explanatory variable x or against predicted values. A curved pattern in a residual plot suggests a non-linear relationship, while a fan shape indicates non-constant variance. IB questions may present a residual plot and ask you to comment on the suitability of a linear model.

残差图将残差对解释变量 x 或预测值作图。残差图中出现弯曲的规律暗示非线性关系,而扇形形状则表示方差不恒定。IB 题目可能会给出残差图,要求你评论线性模型的适用性。


7. Interpolation and Extrapolation | 插值与外推

Interpolation means using the linear model to predict a y-value for an x that lies within the range of the original data. This is generally considered reliable, provided the model fits well and there is no evidence of a non-linear trend within that range.

插值是指用线性模型对位于原始数据范围内的 x 值预测 y 值。只要模型拟合良好且没有证据表明该范围内存在非线性趋势,这种预测通常被认为是可靠的。

Extrapolation, on the other hand, is predicting for x-values outside the data range. This is risky because the linear relationship may not hold beyond the observed domain. IB examinations stress that extrapolated predictions are unreliable and should be treated with caution.

另一方面,外推是指对数据范围之外的 x 值进行预测。这种做法风险较大,因为线性关系在观测域之外未必成立。IB 考试强调外推预测不可靠,应谨慎对待。


8. Hypothesis Testing for the Correlation Coefficient | 相关系数的假设检验

rho) can be conducted. The null hypothesis is H₀: ρ = 0, and the alternative is H₁: ρ ≠ 0.

在统计检验中,我们常常想确定样本相关系数 r 是否提供了足够证据表明总体中存在线性关系。可以对总体相关系数 ρ (rho) 进行双尾 t 检验。原假设为 H₀: ρ = 0,备择假设为 H₁: ρ ≠ 0。

The test statistic is:

检验统计量为:

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

with n − 2 degrees of freedom. Alternatively, you can compare the absolute value of r directly with a critical value from the product-moment correlation coefficient table. If |r| exceeds the critical value at a given significance level, the result is significant, and we conclude that evidence of a linear correlation exists.

自由度为 n − 2。也可以直接将 |r| 与积矩相关系数表中的临界值进行比较。如果 |r| 超过给定显著性水平下的临界值,结果即为显著,我们可以判定存在线性相关的证据。


9. Applications of Linear Models in IB Exam Contexts | IB 考试情境中的线性模型应用

IB questions often embed linear models in real-world settings: linking study hours to exam scores, modelling cooling temperatures, or relating economic indicators. You may be asked to write the regression equation, interpret the gradient and intercept, and use the model for prediction.

IB 题目常常将线性模型嵌入真实场景中:将学习时间与考试成绩联系起来、对降温过程建模,或者关联经济指标。你可能会被要求写出回归方程、解释梯度和截距,并使用模型进行预测。

Additionally, you must be comfortable using your GDC to find regression coefficients, r, and r² quickly, but always communicate your findings with clear contextual language.

此外,你必须能够熟练使用图形计算器快速求出回归系数、r 和 r²,但始终要用清晰的上下文语言传达你的发现。


10. Limitations and Considerations | 局限性与注意事项

Linear models are only appropriate when the underlying relationship is approximately linear. Always inspect a scatter plot and residual plot before trusting a regression line. Outliers can heavily influence the slope and intercept, making the model misleading. Sometimes a single influential point can dramatically change the line.

只有当变量间的内在关系近似呈线性时,线性模型才适用。在信任回归线之前,务必检查散点图和残差图。异常值会严重干扰斜率和截距,使模型产生误导。有时单个强影响点就能显著改变整条直线。

Moreover, correlation and regression describe association, not causation. Confounding variables may produce a high r² without any direct causal link. A classic example is the positive correlation between ice cream sales and drowning incidents; the lurking variable is temperature. IB assessments often reward students who highlight these limitations.

再者,相关和回归描述的是关联性而非因果性。混杂变量可能在没有直接因果联系的情况下产生很高的 r²。一个经典例子是冰淇淋销量与溺水事件的正相关关系;背后的潜在变量是气温。IB 评估往往会对指出这些局限性的学生给予嘉奖。


11. Summary of Key Formulas | 核心公式汇总

The table below collects the essential formulas you need for linear models in the IB course. Familiarity with these expressions will help you switch smoothly between calculator output and written reasoning.

下表汇集了 IB 课程线性模型中所需的核心公式。熟记这些表达式将有助于你在计算器输出和书面推理之间自如切换。

QuantityFormula
Slope (b)b = Sxy / Sxx = r · (sy / sx)
Intercept (a)a = y − b x
Correlation (r)r = Sxy / √Sxx · Syy
Sxy, Sxx, SyySxy = Σ(xi − x)(yi − y); Sxx = Σ(xi − x)²; Syy = Σ(yi − y)²
Test statistic for ρt = r √n − 2 / √1 − r², df = n − 2

12. Final Thoughts and IB Exam Tips | 总结与 IB 考试建议

Linear models are a cornerstone of the IB Mathematics syllabus, linking algebraic skills with statistical reasoning. To excel, practise constructing regression equations, interpreting r and r², evaluating residual plots, and performing hypothesis tests. Always ground your answers in the context of the problem, and never forget to mention limitations when a question asks for evaluation.

线性模型是 IB 数学大纲的基石,它将代数技能与统计推理联系在一起。要想表现出色,请练习构建回归方程、解读 r 和 r²、评估残差图以及进行假设检验。始终将答案置于问题情境之中,当题目要求评价时,切勿忘记提及模型的局限性。

Use your GDC efficiently, but also train yourself to explain what the numbers mean in everyday language. This dual fluency—numerical accuracy and conceptual commentary—is precisely what distinguishes top-level answers in the IB exam.

高效地运用图形计算器,同时也要训练自己用日常语言解释这些数字的含义。这种双重流利——数值准确与概念评论——正是 IB 考试中高水平答卷的鲜明特征。

Published by TutorHao | Mathematics Revision Series | aleveler.com

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

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

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