Line of Best Fit: Determination and Applications | 最佳拟合线的确定与应用

📚 Line of Best Fit: Determination and Applications | 最佳拟合线的确定与应用

In IB Mathematics, the line of best fit is a fundamental tool for modelling bivariate data. It allows us to summarise the relationship between two variables and make predictions. This article explains how to determine the line of best fit using the least squares method, interpret its components, and apply it appropriately in real-world contexts.

在IB数学中,最佳拟合线是对双变量数据进行建模的基本工具。它使我们能够概括两个变量之间的关系并进行预测。本文解释如何使用最小二乘法确定最佳拟合线,解读其组成部分,并在现实情境中恰当应用。

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

A scatter plot displays paired data (x, y) as points on a coordinate plane. The overall pattern reveals the type and strength of the relationship between the variables.

散点图将成对数据(x, y)作为坐标平面上的点显示。整体模式揭示了变量之间关系的类型和强度。

  • Strong positive correlation: points rise steeply from left to right. 强正相关:点从左到右急剧上升。
  • Weak negative correlation: points fall gently from left to right, with considerable scatter. 弱负相关:点从左到右缓慢下降,且具有相当大的离散度。
  • No correlation: points show no clear pattern. 无相关:点没有明显的模式。

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

Even if two variables are strongly correlated, it does not mean that one causes the other. There may be a third lurking variable or pure coincidence.

即使两个变量高度相关,也不意味着一个导致另一个。可能存在隐藏的第三个变量或纯属巧合。

For example, ice cream sales and drowning incidents both rise in summer, but eating ice cream does not cause drowning. The common cause is hot weather.

例如,冰淇淋销量和溺水事件都在夏季上升,但吃冰淇淋并不会导致溺水。共同原因是炎热的天气。


3. What is the Line of Best Fit? | 什么是最佳拟合线

A line of best fit is a straight line that best represents the trend of the data in a scatter plot. It minimises the overall distance between the line and all data points.

最佳拟合线是能够最好地代表散点图中数据趋势的一条直线。它使直线与所有数据点之间的总体距离最小化。

In IB, the line of best fit is usually obtained by the least squares regression method.

在IB中,最佳拟合线通常通过最小二乘回归法获得。


4. The Method of Least Squares | 最小二乘法

The least squares method chooses the line that minimises the sum of the squares of the vertical deviations (residuals) from each data point to the line.

最小二乘法选择使每个数据点到直线的垂直偏差(残差)平方和最小的直线。

For data points (xᵢ, yᵢ) and a candidate line y = a + bx, the residual for point i is yᵢ − (a + b xᵢ). The sum of squared residuals is:

对于数据点(xᵢ, yᵢ)和候选直线 y = a + bx,第 i 个点的残差为 yᵢ − (a + b xᵢ)。残差平方和为:

S = Σ(yᵢ − (a + b xᵢ))²

The values of a and b that make S as small as possible give the least squares regression line.

使 S 尽可能小的 a 和 b 的值即为最小二乘回归线。


5. The Regression Equation | 回归方程

The least squares regression line is written as y = a + bx, where b is the slope and a is the y-intercept. The slope can be calculated from the correlation coefficient r and the standard deviations:

最小二乘回归线写作 y = a + bx,其中 b 是斜率,a 是 y 截距。斜率可由相关系数 r 和标准差计算:

b = r × (s_y / s_x)

And the intercept is:

截距为:

a = ȳ − b x̄

Here x̄ and ȳ are the means of the x and y values.

这里 x̄ 和 ȳ 分别是 x 和 y 值的平均数。


6. Interpreting the Slope and Intercept | 斜率和截距的解释

The slope b represents the average change in y when x increases by one unit. The intercept a is the predicted value of y when x equals zero, if that value is meaningful in context.

斜率 b 表示当 x 增加一个单位时,y 的平均变化量。截距 a 是当 x 等于零时 y 的预测值,前提是该值在情境中有意义。

Example: If y = 3 + 2x, then for each extra hour of study (x), the exam score (y) increases by an average of 2 marks. The intercept 3 is the predicted score for zero hours of study.

例如:如果 y = 3 + 2x,那么每额外学习一小时(x),考试分数(y)平均增加2分。截距3是零小时学习时的预测分数。


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

Pearson’s r measures the strength and direction of a linear relationship between two variables. Its value always lies between −1 and 1.

皮尔逊r衡量两个变量之间线性关系的强度和方向。其值始终介于 −1 和 1 之间。

r = 1 means perfect positive correlation, r = −1 means perfect negative correlation, and r = 0 means no linear correlation.

r = 1 表示完全正相关,r = −1 表示完全负相关,r = 0 表示无线性相关。

r = Σ((xᵢ − x̄)(yᵢ − ȳ)) / √(Σ(xᵢ − x̄)² × Σ(yᵢ − ȳ)²)

This formula is built into your calculator; you are not expected to compute it by hand in the exam.

这个公式已内置在计算器中;考试中不需要手工计算。


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

The coefficient of determination is the square of Pearson’s r. It represents the proportion of the variance in y that is explained by the regression model.

决定系数是皮尔逊r的平方。它表示回归模型所解释的 y 的方差比例。

For example, if r² = 0.81, then 81% of the variation in y is explained by the linear relationship with x; the remaining 19% is due to other factors.

例如,如果 r² = 0.81,则 y 的变异的81%可由与 x 的线性关系解释;其余19%归因于其他因素。


9. Residual Analysis | 残差分析

A residual is the vertical difference between an observed y value and the predicted y value on the regression line: residual = yᵢ − (a + b xᵢ).

残差是观测到的 y 值与回归线上预测 y 值之间的垂直差异:残差 = yᵢ − (a + b xᵢ)。

Plotting residuals against x helps assess whether a linear model is appropriate. If no obvious pattern appears, the linear model is suitable; if a curved pattern appears, a non-linear model may be better.

绘制残差对 x 的图有助于评估线性模型是否合适。如果没有明显模式,则线性模型合适;如果出现弯曲模式,则非线性模型可能更好。


10. Using Technology | 使用技术工具

In IB exams, a graphics display calculator (GDC) can be used to compute the regression line and correlation coefficient quickly. Enter the data into a table, run the linear regression command, and record the values of a, b, and r.

在IB考试中,可使用图形计算器(GDC)快速计算回归线和相关系数。将数据输入表格,执行线性回归命令,并记录 a、b 和 r 的值。

Steps on a typical GDC:

典型GDC上的步骤:

  • Enter x and y lists. 输入x和y列表。
  • Choose “LinReg(ax+b)”. 选择”LinReg(ax+b)”。
  • Read a, b, r and r². 读取a、b、r和r²。

11. Interpolation and Extrapolation | 内插与外推

Interpolation means predicting y for an x value within the observed data range. Extrapolation means predicting outside this range.

内插是指在观测数据范围内对 x 值预测 y。外推是指在该范围之外进行预测。

Interpolation is generally reliable, while extrapolation can be unreliable because the linear trend may not continue beyond the data.

内插通常可靠,而外推可能不可靠,因为线性趋势可能不会在数据范围之外延续。


12. Applications and Common Pitfalls | 应用与常见错误

The line of best fit is used in economics, biology, physics, and social sciences to estimate relationships. For example, predicting a student’s final exam score from their mock exam score.

最佳拟合线用于经济学、生物学、物理学和社会科学中估计关系。例如,根据模拟考试分数预测学生期末考试分数。

Common pitfalls include: using extrapolation too far outside the data range, confusing correlation with causation, ignoring influential outliers, and using the model for x values far from the mean.

常见错误包括:在数据范围之外过度使用外推,混淆相关与因果,忽略有影响力的离群值,以及将模型用于远离平均值的 x 值。

Published by TutorHao | Mathematics Revision Series | aleveler.com

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

Comments

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

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