📚 PDF资源导航

IB Mathematics: Linear Regression Analysis | IB数学:线性回归分析

📚 IB Mathematics: Linear Regression Analysis | IB数学:线性回归分析

In the IB Mathematics curriculum, linear regression is one of the most powerful tools for describing and predicting relationships between two numerical variables. This article explains the core ideas, formulas, and interpretation skills you need for both analysis and application examinations.

在IB数学课程中,线性回归是描述和预测两个数值变量之间关系的最有力工具之一。本文将讲解你在分析与应用类考试中所需的核心概念、公式和解释技巧。


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

We begin with paired observations (x₁, y₁), (x₂, y₂), …, (xₙ, yₙ). The variable x is often called the explanatory variable or independent variable, while y is called the response variable or dependent variable.

我们首先考察一组成对观测 (x₁, y₁), (x₂, y₂), …, (xₙ, yₙ)。通常称 x 为解释变量或自变量,y 为响应变量或因变量。

For example, x could be the number of hours a student studies and y could be the test score. Each student provides one pair of values, and together these pairs form bivariate data.

例如,x 可以是学生学习的小时数,y 可以是考试成绩。每名学生提供一对数值,这些成对数值合在一起就构成了双变量数据。

When we plot the pairs on a coordinate plane, the graph is called a scatter diagram. The overall shape of the scatter diagram tells us whether a straight-line model is appropriate.

当我们在坐标平面上绘制这些成对数据时,得到的图称为散点图。散点图的整体形态可以告诉我们直线模型是否合适。


2. Correlation and Causation | 相关性与因果关系

Correlation measures the strength and direction of a linear association between two variables. A positive correlation means that as x increases, y tends to increase; a negative correlation means that as x increases, y tends to decrease.

相关性度量两个变量之间线性关联的强度和方向。正相关意味着随着 x 增大,y 趋于增大;负相关意味着随着 x 增大,y 趋于减小。

A common mistake is to interpret a strong correlation as proof that one variable causes the other. Correlation does not imply causation. A hidden third variable, often called a confounding variable, may be responsible for both x and y.

一个常见错误是将强相关理解为某个变量引起另一个变量的证据。相关并不意味着因果。一个隐藏的第三变量,通常称为混杂变量,可能同时导致了 x 和 y 的变化。

For instance, ice-cream sales and drowning incidents are positively correlated, but eating ice cream does not cause drowning. The confounding variable is warm weather, which increases both behaviours.

例如,冰淇淋销量与溺水事件呈正相关,但吃冰淇淋并不会导致溺水。混杂变量是炎热天气,它同时增加了这两种行为的发生。


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

The least squares regression line of y on x is the line that makes the sum of squared vertical distances from the data points to the line as small as possible.

y 对 x 的最小二乘回归线,是使各数据点到直线的垂直距离的平方和尽可能小的直线。

The regression line is written in the form:

ŷ = a + bx

Here ŷ is the predicted value of y, a is the y-intercept, and b is the slope. The slope b tells us the average change in y when x increases by one unit.

这里 ŷ 是 y 的预测值,a 是 y 轴截距,b 是斜率。斜率 b 告诉我们 x 每增加一个单位时,y 的平均变化量。

The vertical distance between an observed value and its predicted value is called a residual:

eᵢ = yᵢ – ŷᵢ

The phrase “least squares” refers to minimising the sum Σ eᵢ² = Σ(yᵢ – ŷᵢ)². This criterion gives a unique line for any set of data with at least two distinct x-values.

“最小二乘”指的是使 Σ eᵢ² = Σ(yᵢ – ŷᵢ)² 达到最小。对于任何一组至少包含两个不同 x 值的数据,这个准则都能给出唯一的一条直线。


4. Computing the Regression Coefficients | 回归系数的计算

To find the values of a and b, we first define three useful sums. Let x̄ be the mean of the x-values and ȳ the mean of the y-values.

为了求出 a 和 b,我们首先定义三个常用的和。设 x̄ 为 x 值的平均数,ȳ 为 y 值的平均数。

Sxx = Σ(xᵢ – x̄)², Syy = Σ(yᵢ – ȳ)², Sxy = Σ(xᵢ – x̄)(yᵢ – ȳ)

Then the slope b and intercept a are given by:

b = Sxy / Sxx, a = ȳ – bx̄

In IB examinations you are usually not required to calculate these by hand every time, because the graphic display calculator gives the values directly. However, you should understand the formulas so that you can interpret what the calculator produces.

在IB考试中,通常不需要每一步都手算这些公式,因为图形计算器可以直接给出结果。但是,你应当理解这些公式,以便解读计算器输出的内容。

Notice that the regression line always passes through the mean point (x̄, ȳ). This is a useful check when drawing or estimating the line.

请注意,回归直线总是经过平均数点 (x̄, ȳ)。在作图或估算直线时,这是一个有用的检验条件。


5. Pearson’s Correlation Coefficient r | 皮尔逊相关系数 r

Pearson’s correlation coefficient r measures the strength and direction of a linear relationship. Its formula is:

r = Sxy / √(Sxx × Syy)

The value of r always lies between -1 and 1. If r = 1, the points lie exactly on a line with positive slope. If r = -1, the points lie exactly on a line with negative slope. If r = 0, there is no linear relationship.

r 的值总是介于 -1 与 1 之间。若 r = 1,则点完全落在一条斜率为正的直线上;若 r = -1,则点完全落在一条斜率为负的直线上;若 r = 0,则不存在线性关系。

The following table gives a common interpretation scale for the strength of correlation.

下表给出了相关性强弱的常用解释标准。

Value of |r| Strength of Linear Relationship 线性关系强度
|r| = 1 Perfect linear relationship 完全线性关系
0.7 ≤ |r| < 1 Strong linear relationship 强线性关系
0.4 ≤ |r| < 0.7 Moderate linear relationship 中等线性关系
0.1 ≤ |r| < 0.4 Weak linear relationship 弱线性关系
|r| = 0 No linear relationship 无线性关系

Remember that a large value of |r| does not mean the relationship is exactly linear. Always look at the scatter diagram to confirm the shape.

请记住,|r| 较大并不意味着关系恰好是线性的。一定要结合散点图来确认其形态。


6. The Coefficient of Determination r² | 决定系数 r²

The coefficient of determination r² is the square of the correlation coefficient. It represents the proportion of the variation in y that is explained by the linear relationship with x.

决定系数 r² 是相关系数的平方。它表示 y 的变化中可以被 x 与 y 的线性关系所解释的比例。

For example, if r = 0.6, then r² = 0.36, meaning 36% of the variation in y is explained by the regression model. The remaining 64% is due to other factors or random variation.

例如,若 r = 0.6,则 r² = 0.36,意味着 y 的变化中有36%可由回归模型解释,其余64%来自其他因素或随机变化。

Because r is squared, the direction of the correlation does not affect r². Both r = 0.8 and r = -0.8 give r² = 0.64.

由于 r 被平方,相关方向不会影响 r²。r = 0.8 和 r = -0.8 都会给出 r² = 0.64。

In IB applications, r² is often used to compare different models. A model with a larger r² usually fits the data better, although other checks such as residual plots are also important.

在IB应用类题目中,r² 常被用来比较不同模型。r² 较大的模型通常拟合更好,但残差图等其他检验也同样重要。


7. Residuals and Model Fit | 残差与模型拟合

A residual is the difference between the observed value and the value predicted by the regression line:

eᵢ = yᵢ – ŷᵢ

Positive residuals occur when the actual y is above the line; negative residuals occur when the actual y is below the line. For a well-fitting line, the residuals should appear random with no obvious pattern.

当实际 y 值位于回归线上方时,残差为正;当实际 y 值位于回归线下方时,残差为负。对于拟合良好的直线,残差应当呈现随机分布,没有明显的规律。

The residual plot is a graph of residuals against x (or against predicted values ŷ). A residual plot with points randomly scattered around zero supports the use of a linear model.

残差图是以 x(或预测值 ŷ)为横轴、残差为纵轴绘制的图。如果残差图中的点围绕零线随机分布,则支持使用线性模型。

If the residual plot shows a curved pattern, the data may be better modelled by a non-linear function. If the spread of residuals increases as x increases, the assumption of constant variance may be violated.

如果残差图呈现弯曲形态,则数据可能更适合用非线性函数建模。如果残差的分布随 x 增大而变宽,则等方差假设可能被违反。


8. Interpolation and Extrapolation | 内插与外推

The regression line can be used to make predictions. If we predict a value of y for an x-value within the observed range of the data, this is called interpolation.

回归线可以用来进行预测。如果我们在数据观测范围内取一个 x 值来预测 y,则称为内插。

If we predict for an x-value outside the observed range, this is called extrapolation. Extrapolation is risky because we do not know whether the linear trend continues outside the data range.

如果我们在观测范围之外取一个 x 值来预测,则称为外推。外推风险很大,因为我们不知道线性趋势在数据范围之外是否仍然成立。

For example, suppose a regression line models height against age for children aged 5 to 14. Using it to predict height at age 15 is extrapolation, and the prediction may be inaccurate. Using it to predict height at age 8 is interpolation, so it is generally more reliable.

例如,假设一条回归线用儿童5至14岁的身高与年龄建立关系。用它预测15岁的身高属于外推,预测可能不准确。用它预测8岁的身高属于内插,因此通常更可靠。

Never use a regression line to predict far outside the observed x-range, especially when other factors may change the relationship.

切勿使用回归线在观测 x 范围之外很远的地方进行预测,尤其是在其他因素可能改变这种关系的情况下。


9. Assumptions and Limitations | 假设与局限

Linear regression and correlation rely on several assumptions. The most important is that the relationship between x and y is approximately linear on a scatter diagram.

线性回归和相关分析依赖若干假设。最重要的一点是,x 与 y 之间的关系在散点图上近似线性。

We also assume that the residuals are independent, have constant variance, and are normally distributed if we wish to perform statistical inference such as confidence intervals. In IB exams, you are usually only expected to comment on linearity and constant spread.

我们还需要假设残差相互独立、方差恒定,并且若要进行置信区间等统计推断,则残差应服从正态分布。在IB考试中,通常只需要你评论线性和分布宽度是否恒定。

Outliers can strongly affect the regression line. An outlier in the x-direction with great leverage may pull the line towards itself and change the slope dramatically.

异常值会强烈影响回归直线。在 x 方向上影响力较大的异常值可能将直线拉向自己,从而显著改变斜率。

Finally, a regression model describes association only. It does not prove causation, and it cannot be safely extended beyond the observed range of x.

最后,回归模型只描述关联,并不证明因果关系,也不能安全地推广到观测 x 范围之外。


10. Using Your GDC for Linear Regression | 用图形计算器进行线性回归

In the IB examinations, you may use a graphic display calculator, or GDC, to perform linear regression quickly. The exact menu names differ by calculator model, but the general procedure is the same.

在IB考试中,你可以使用图形计算器(GDC)快速进行线性回归。具体菜单名称因计算器型号不同而略有差异,但基本步骤相同。

First, enter the x-values into one list and the y-values into another list. The lists are often called L1 and L2 on a TI calculator.

首先,将 x 值输入一个列表,将 y 值输入另一个列表。在TI计算器上,这些列表通常称为 L1 和 L2。

Next, choose the linear regression command from the statistics menu. The command is often called “LinReg(a+bx)” or “Linear Regression”. The calculator will output values for a, b, r and r².

然后,在统计菜单中进入线性回归命令,通常称为 LinReg(a+bx) 或 Linear Regression。计算器会输出 a、b、r 和 r² 的值。

Many calculators can also display a residual plot. Check the plot to see whether there is any pattern or curvature that would make the linear model unsuitable.

许多计算器还可以显示残差图。请检查残差图,看是否存在会使线性模型不合适的规律或弯曲。

Although the GDC does the arithmetic, you must clearly define your variables and write down the regression equation in your answer. For example:

y = 33 + 7.5x


11. Worked Example | 例题精讲

A teacher records the number of hours x that five students spent preparing for a test and their test scores y.

一位老师记录了五名学生备考某测试的小时数 x 以及他们的成绩 y。

x (hours) 2 3 4 5 6
y (score) 50 55 60 70 80

First calculate the means. Here x̄ = 4 and ȳ = 63.

首先计算平均数。这里 x̄ = 4,ȳ = 63。

Then compute the sums. You should find that Sxx = 10 and Sxy = 75. Therefore the slope is:

b = 75 / 10 = 7.5

The intercept is:

a = 63 – 7.5 × 4 = 33

So the regression line is:

ŷ = 33 + 7.5x

This model suggests that each additional hour of study is associated with an average score increase of 7.5 points.

这个模型表明,每多学习1小时,平均成绩预计提高7.5分。

Using interpolation, the predicted score for x = 4.5 hours is:

ŷ = 33 + 7.5 × 4.5 = 66.75

For the student who studied 4 hours, the actual score was 60, while the predicted score is 33 + 7.5 × 4 = 63. The residual is 60 – 63 =

Published by TutorHao | IB Mathematics Revision Series | aleveler.com

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

Comments

屏轩国际教育cambridge primary/secondary checkpoint, cat4, ukiset,ukcat,igcse,alevel,PAT,STEP,MAT, ibdp,ap,ssat,sat,sat2课程辅导,国外大学本科硕士研究生博士课程论文辅导Cancel reply

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

Exit mobile version