All datasets, summary values and scenarios in this guide are synthetic illustrative teaching examples, not reports of actual research.本指南所有数据、汇总值及情境均为合成教学示例,不是真实研究报告。
AP Statistics

Unit 3: Examining Relationships

Describe the relationship between two quantitative variables: scatterplots, correlation, least-squares regression, residuals, unusual points and transformations.

Topics 3.1 to 3.6Bilingual edition
AP 统计学

单元 3:考察变量间的关系

描述两个定量变量之间的关系:散点图、相关系数、最小二乘回归、残差、异常点与数据变换。

主题 3.1 至 3.6中英双语版
Read me first

Each topic gives objectives, an explanation, worked examples, an exam tip, common mistakes and check questions with answers. Use the contents list to jump to a topic, then finish with the unit quiz. All data are synthetic illustrations.

阅读提示

每个主题含学习目标、讲解、例题、考试提示、常见错误与带答案的自测题。可用目录跳转到任一主题,最后完成单元自测。所有数据均为合成示例。

Representing Two Quantitative Variables: Scatterplots表示两个定量变量:散点图

Learning objectives学习目标
  • Identify the explanatory and response variables and place them on the correct axes.
  • Construct a scatterplot of paired quantitative data.
  • Describe a scatterplot completely and in context: form, direction, strength, and unusual features.
  • Justify a claim about a relationship using a scatterplot.
  • 识别解释变量与响应变量,并放在正确的坐标轴上。
  • 为成对的定量数据作散点图。
  • 结合情境完整描述散点图:形式、方向、强度和异常特征。
  • 用散点图为关于变量关系的说法提供依据。

Bivariate quantitative data consist of ordered pairs $(x,y)$ recorded on the same individuals. The explanatory variable $x$ is the variable used to explain or predict; the response variable $y$ is the outcome being explained. A scatterplot puts the explanatory variable on the horizontal axis and the response on the vertical axis, with one point per individual. Which variable is which depends on the question asked, not on the data alone.

二元定量数据由同一批个体上记录的有序数对 $(x,y)$ 组成。解释变量 $x$ 用来解释或预测;响应变量 $y$ 是被解释的结果。散点图把解释变量放在横轴、响应变量放在纵轴,每个个体对应一个点。哪个是解释变量取决于所问的问题,而不只取决于数据本身。

Describe every scatterplot with four features用四个特征描述每张散点图
  • Form: linear or nonlinear (curved). A relationship is linear if the points follow a straight band, that is, the rate of change is roughly constant.
  • Direction: positive if $y$ tends to increase as $x$ increases, negative if $y$ tends to decrease.
  • Strength: how closely the points follow the form: strong, moderate or weak.
  • Unusual features: outliers (points far from the pattern), clusters, and gaps.

Write in context with "tends to" language, naming both variables with units.

  • 形式:线性或非线性(弯曲)。点沿一条直带分布,即变化率大致恒定,则为线性。
  • 方向:$x$ 增大时 $y$ 倾向增大为正向,倾向减小为负向。
  • 强度:点与该形式的贴合程度:强、中等或弱。
  • 异常特征:离群点(远离整体模式的点)、聚类与间隙。

要结合情境,用“倾向于”的措辞,并写明两个变量及单位。

Student学生12345678910
Hours per week, $x$每周学习小时 $x$1223455678
Exam score, $y$考试成绩 $y$55526360706676728077

Table 2.2. Weekly study time and exam score for 10 students (synthetic). We want to predict score from study time, so $x$ = hours and $y$ = score.

表 2.2. 10 名学生的每周学习时间与考试成绩(合成数据)。我们想由学习时间预测成绩,所以 $x$ 为小时数,$y$ 为成绩。

4050607080900123456789Exam score (points)考试成绩(分)Weekly study time (hours)每周学习时间(小时)Positive, roughly linear, fairly strong正向、大致线性、较强
Figure 2.2. Scatterplot of exam score (response, vertical axis) against weekly study time (explanatory, horizontal axis) for the 10 students in Table 2.2.图 2.2. 表 2.2 中 10 名学生的散点图:考试成绩(响应变量,纵轴)对每周学习时间(解释变量,横轴)。
Worked Example 2.6: Describe a scatterplot in context例题 2.6:结合情境描述散点图

Describe the association between weekly study time and exam score shown in Figure 2.2.

  1. Form: the points follow a straight band with no visible curvature, so the form is linear.
  2. Direction: positive. Students who study more hours per week tend to have higher exam scores.
  3. Strength: fairly strong: the points stay close to a line, though not perfectly (for example, two students who study 2 hours scored 52 and 63).
  4. Unusual features: no clear outliers, clusters or gaps.
  5. Full sentence. "There is a fairly strong, positive, linear association between weekly study time and exam score: students who study more hours per week tend to score higher, with no unusual points."

描述图 2.2 中每周学习时间与考试成绩之间的关联。

  1. 形式:点沿一条直带分布,没有明显弯曲,所以是线性。
  2. 方向:正向。每周学习小时数多的学生,考试成绩倾向更高。
  3. 强度:较强:点紧靠一条直线,但并不完全贴合(例如学习 2 小时的两名学生得分分别为 52 和 63)。
  4. 异常特征:没有明显的离群点、聚类或间隙。
  5. 完整句子。“每周学习时间与考试成绩之间存在较强的正向线性关联:每周学习小时数多的学生倾向得分更高,没有异常点。”
Worked Example 2.7: A strong association need not be linear例题 2.7:强关联不一定是线性的

Illustrative data. A driving-school study records speed $x$ and braking distance $y$ for one car.

Speed (km/h)车速(km/h)20406080100
Braking distance (m)制动距离(m)6204169105
  1. Roles. We predict distance from speed, so speed is explanatory ($x$) and distance is the response ($y$).
  2. Form. The distance rises by 14, 21, 28, then 36 m for each additional 20 km/h. The increases themselves grow, so the points curve upward: nonlinear.
  3. Direction and strength. Positive, and strong (the points lie on a smooth curve with almost no scatter).
  4. Conclusion. "Braking distance tends to increase with speed in a strong, positive, nonlinear (curved upward) pattern; a straight line would understate distances at high speeds."

示例数据。驾校研究记录一辆车的车速 $x$ 与制动距离 $y$。

Speed (km/h)车速(km/h)20406080100
Braking distance (m)制动距离(m)6204169105
  1. 变量角色。由车速预测距离,所以车速是解释变量($x$),距离是响应变量($y$)。
  2. 形式。车速每增加 20 km/h,距离依次增加 14、21、28、36 m。增量本身在增大,所以点向上弯曲:非线性。
  3. 方向与强度。正向,且很强(点落在光滑曲线上,几乎没有散布)。
  4. 结论。“制动距离倾向随车速增大,呈强的正向非线性(向上弯曲)模式;直线会低估高速时的距离。”
Positive linear正向线性Negative linear负向线性Nonlinear (curved)非线性(弯曲)No pattern无明显模式
Figure 2.3. Four common scatterplot patterns: positive linear, negative linear, nonlinear and no pattern.图 2.3. 四种常见散点图模式:正向线性、负向线性、非线性、无明显模式。
Worked Example: Describe a scatterplot and judge a causal claim例题:描述散点图并判断因果说法

Illustrative data. A counselor records daily screen time $x$ (hours) and nightly sleep $y$ (hours) for nine students: $(1,9.0),\allowbreak(2,8.6),\allowbreak(2,8.8),\allowbreak(3,8.1),\allowbreak(4,9.4),\allowbreak(4,7.6),\allowbreak(5,7.4),\allowbreak(6,6.6),\allowbreak(7,6.2)$. Describe the association, then decide whether the data support the claim "more screen time causes less sleep".

  1. Roles. We want to explain sleep by screen time, so screen time is explanatory ($x$) and sleep is the response ($y$).
  2. Form and direction. From 1 hour to 7 hours of screen time the sleep falls from 9.0 to 6.2 hours along a straight band: linear and negative. Joining the two end points gives $(6.2-9.0)/(7-1)\approx-0.47$ hours of sleep per extra hour of screen time, a roughly constant rate.
  3. Strength. Eight of the nine points stay close to one line, so the association is strong. A line fitted to those eight gives $\hat{y}=9.59-0.480x$ with $r=-0.993$.
  4. Unusual feature. The student at $(4,9.4)$ sleeps about $9.4-7.7=1.7$ hours more than that line predicts at 4 hours ($\hat{y}=9.59-0.480(4)=7.67$). It is an outlier. Investigate it (a data-entry error? a shift worker's schedule?) rather than deleting it. With this point included, $r$ drops to $-0.845$.
  5. The causal claim. Students chose their own screen time, so this is an observational study. The plot shows an association only: a third variable such as bedtime or homework load could drive both. Only a randomized experiment could support "causes".
  6. Full answer. A complete answer states: "There is a strong, negative, roughly linear association between daily screen time and nightly sleep: students with more screen time tend to sleep less, about half an hour less for each extra hour. The student with 4 hours of screen time and 9.4 hours of sleep is an outlier far above the pattern. Because the data are observational, they show an association but do not show that screen time causes the loss of sleep."

示例数据。一位辅导员记录九名学生的每日屏幕时间 $x$(小时)与夜间睡眠 $y$(小时):$(1,9.0),\allowbreak(2,8.6),\allowbreak(2,8.8),\allowbreak(3,8.1),\allowbreak(4,9.4),\allowbreak(4,7.6),\allowbreak(5,7.4),\allowbreak(6,6.6),\allowbreak(7,6.2)$。描述这一关联,并判断数据是否支持“屏幕时间越多导致睡眠越少”的说法。

  1. 变量角色。我们想用屏幕时间解释睡眠,所以屏幕时间是解释变量($x$),睡眠是响应变量($y$)。
  2. 形式与方向。屏幕时间从 1 小时增加到 7 小时,睡眠从 9.0 小时降到 6.2 小时,点沿一条直带分布:线性、负向。连接两个端点得 $(6.2-9.0)/(7-1)\approx-0.47$,即屏幕时间每多 1 小时,睡眠约少 0.47 小时,变化率大致恒定。
  3. 强度。九个点中有八个紧靠同一条直线,所以关联较强。对这八个点拟合的直线为 $\hat{y}=9.59-0.480x$,$r=-0.993$。
  4. 异常特征。$(4,9.4)$ 这名学生的睡眠比该直线在 4 小时处的预测多约 $9.4-7.7=1.7$ 小时($\hat{y}=9.59-0.480(4)=7.67$)。它是离群点。应先调查原因(录入错误?轮班作息?)而不是直接删除。把它包括在内时,$r$ 降为 $-0.845$。
  5. 因果说法。屏幕时间由学生自己选择,所以这是观察研究。散点图只能说明关联:就寝时间或作业量等第三个变量可能同时影响两者。只有随机化实验才能支持“导致”。
  6. 完整答案。完整答案要点:“每日屏幕时间与夜间睡眠之间存在较强的负向、大致线性的关联:屏幕时间更多的学生倾向睡得更少,每多一小时约少半小时。屏幕时间 4 小时、睡眠 9.4 小时的学生是远高于整体模式的离群点。由于数据来自观察,只能说明关联,不能说明屏幕时间导致睡眠减少。”
Also on the 2027 exam对应 2027 考试新增内容
The revised course lists the same four features (form, direction, strength, unusual features) and adds a claim-justification skill: use a scatterplot to support a claim about the two variables in context. It also stresses precise language. For a model predicting a wolf's weight from its length, a positive association should be written as "longer wolves tend to have higher weights", not just "positive". Say "tend to" or "on average" for statistical uncertainty.
修订课程列出同样的四个特征(形式、方向、强度、异常特征),并增加“用散点图为关于两个变量的说法提供依据”的要求,同时强调措辞精确。例如预测狼的体重与体长时,正向关联应写成“体长更长的狼倾向有更大的体重”,而不能只写“正向”。表达统计不确定性要用“倾向于”或“平均而言”。
AP exam tipAP 考试提示

Never write only "positive linear". Always add the context ("students who study more hours tend to score higher") and mention outliers, clusters or gaps, or say there are none. Use the word "association", not "correlation", unless you are discussing the number $r$.

不要只写“正向线性”。要加上情境(“每周学习更久的学生倾向得分更高”),并说明有无离群点、聚类或间隙。除非讨论数值 $r$,否则用“关联”而不是“相关”。

Common Mistake: Writing the trend as if it held for every individual常见错误:把趋势写成对每个个体都成立

A student writes "every student who studies more hours scores higher". Table 2.2 contradicts this: student 5 studied 4 hours and scored 70, but student 6 studied 5 hours and scored 66; student 9 studied 7 hours and scored 80, but student 10 studied 8 hours and scored 77. A scatterplot shows a tendency across many individuals, so the points do not rise one pair at a time.

Fix. Write "students who study more hours per week tend to score higher" or "on average".

一名学生写道“每个学习小时数更多的学生成绩都更高”。表 2.2 与此矛盾:学生 5 学习 4 小时得 70 分,学生 6 学习 5 小时却只得 66 分;学生 9 学习 7 小时得 80 分,学生 10 学习 8 小时却只得 77 分。散点图显示的是许多个体之间的倾向,所以点并不是一对一对地逐个上升。

改正。写成“每周学习小时数更多的学生倾向得分更高”或“平均而言”。

Common mistakes常见错误
  • Putting the response variable on the horizontal axis (it is the explanatory variable that goes on $x$).
  • Calling a tight curved pattern "weak". Strength measures how closely points follow the stated form, so a tight curve is a strong nonlinear association.
  • Describing direction for a U-shaped pattern as "positive" or "negative". Say the form is nonlinear and describe where it decreases and increases.
  • Using the word "line" as the reason for linearity (for example "it is linear because it makes a line"). Say that the rate of change is roughly constant.
  • 把响应变量放在横轴(应由解释变量作 $x$)。
  • 把紧密的弯曲模式叫作“弱”。强度度量点与所述形式的贴合程度,紧密的曲线是强的非线性关联。
  • 对 U 形模式说“正向”或“负向”。应指出形式是非线性,并说明在哪里下降、在哪里上升。
  • 用“line”本身来解释线性(如“因为它形成一条线所以是线性”)。应说明变化率大致恒定。
Calculator steps计算器操作

TI-84 Plus

  1. Enter data: STAT → 1:Edit; put $x$ in L1 and $y$ in L2 (clear old lists first with STAT → 4:ClrList).
  2. 2nd Y= (STAT PLOT) → 1:Plot1 → turn On, choose the first (scatter) type, Xlist = L1, Ylist = L2.
  3. Press ZOOM → 9:ZoomStat. Label axes and units on your paper copy.

TI-Nspire

  1. Open a Lists & Spreadsheet page, name column A hours and column B score, and enter the data.
  2. Add a Data & Statistics page; click the bottom axis prompt and choose hours, then the left axis prompt and choose score.
  3. The scatterplot appears; use Menu → Analyze to add a regression line later.

TI-84 Plus

  1. 输入数据:STAT → 1:Edit,$x$ 放入 L1,$y$ 放入 L2(先用 STAT → 4:ClrList 清除旧列表)。
  2. 2nd Y=(STAT PLOT)→ 1:Plot1 → 选择 On,选第一种(散点)类型,Xlist = L1,Ylist = L2。
  3. 按 ZOOM → 9:ZoomStat。在答卷上要自己标注坐标轴及单位。

TI-Nspire

  1. 新建 Lists & Spreadsheet 页面,A 列命名为 hours,B 列命名为 score,输入数据。
  2. 添加 Data & Statistics 页面;点击底部坐标轴提示并选择 hours,再点击左侧坐标轴提示并选择 score。
  3. 散点图随即出现;稍后可用 Menu → Analyze 添加回归线。
Check your understanding自我检测
A researcher wants to predict the resale price of a used car from its mileage. Which variable is the explanatory variable, which axis does it go on, and what does a negative association mean here?研究者想由里程预测二手车的转售价格。哪个是解释变量,它放在哪个轴上?在这里负向关联是什么意思?

Answer. Mileage is explanatory (horizontal axis); price is the response (vertical axis). A negative association means cars with more mileage tend to have lower resale prices.

答案。里程是解释变量(横轴),价格是响应变量(纵轴)。负向关联表示里程更多的车倾向有更低的转售价格。

A scatterplot shows points forming a tight upward-curving pattern. A student writes "weak positive". Correct the description.一张散点图中的点形成紧密的向上弯曲的模式。一名学生写“弱正向”。请更正这一描述。

Answer. The points follow the curve closely, so the association is strong, positive and nonlinear (curved upward). Strength refers to closeness to the pattern, not to whether the pattern is straight.

答案。点紧贴曲线,所以关联强、正向、非线性(向上弯曲)。强度指点与模式的贴合程度,而不是模式是否为直线。

A scatterplot of daily temperature (x) and daily ice cream sales (y) has one day with very high sales on a cool day. Which of the four features does this point illustrate, and what should you do before deleting it?日气温(x)与日冰淇淋销量(y)的散点图中,有一天气温较低但销量很高。这个点体现了四个特征中的哪一个?删除它之前应先做什么?

Answer. It is an unusual feature: an outlier (a point far from the overall pattern). Investigate it first (data entry error? a special event?) and report it; do not delete a point just because it does not fit.

答案。它是异常特征:离群点(远离整体模式的点)。先调查原因(录入错误?特殊事件?)并加以说明;不能仅因为不符合就删除。

AP FRQ-style model response: Describing a scatterplotAP 简答题示范答案:描述散点图

Prompt. Figure 2.2 plots exam score against weekly study time for 10 students. Describe the association.

What a complete answer statesModel wording
FormThe pattern is linear (no curvature).
Direction in contextPositive: students who study more hours per week tend to have higher exam scores.
StrengthFairly strong: the points are close to a straight line.
Unusual featuresThere are no outliers, clusters or gaps.

题目。图 2.2 画出了 10 名学生考试成绩对每周学习时间的散点图。描述这一关联。

完整答案要点示范表述
形式模式为线性(无弯曲)。
结合情境的方向正向:每周学习小时数更多的学生倾向有更高的考试成绩。
强度较强:点靠近一条直线。
异常特征没有离群点、聚类或间隙。

Correlation相关系数

Learning objectives学习目标
  • Interpret the correlation coefficient $r$ as the strength and direction of a linear association.
  • Calculate $r$ from standardized values and with technology, and state its properties.
  • Explain why $r$ does not describe nonlinear patterns, is affected by outliers, and does not prove causation.
  • Describe how changing units or switching $x$ and $y$ affects $r$.
  • 把相关系数 $r$ 解释为线性关联的强度与方向。
  • 用标准化值和技术手段计算 $r$,并说出它的性质。
  • 解释为什么 $r$ 不能描述非线性模式、受离群点影响、且不能证明因果。
  • 说明改变单位或交换 $x$、$y$ 对 $r$ 的影响。

The correlation coefficient $r$ measures the direction and strength of the linear association between two quantitative variables. It is the average of the products of the standardized values, using $n-1$ in the denominator:

相关系数 $r$ 度量两个定量变量之间线性关联的方向与强度。它是标准化值乘积的平均(分母用 $n-1$):

$$r=\frac{1}{n-1}\sum_{i=1}^{n}\left(\frac{x_i-\bar{x}}{s_x}\right)\left(\frac{y_i-\bar{y}}{s_y}\right)$$
Property of $r$$r$ 的性质What it means含义
$-1\le r\le1$; the sign gives direction$-1\le r\le1$;符号表示方向Positive $r$: positive association. Negative $r$: negative association.$r>0$ 为正向关联,$r<0$ 为负向关联。
$|r|$ near 1 means strong linear association$|r|$ 接近 1 表示线性关联强$r=\pm1$ only when all points lie exactly on a line; $r=0$ means no linear association.只有所有点恰好在一条直线上时 $r=\pm1$;$r=0$ 表示无线性关联。
Unit-free无单位Changing units (feet to meters, dollars to thousands of dollars) or adding a constant does not change $r$.改变单位(英尺换成米,元换成千元)或加常数,$r$ 不变。
Symmetric in $x$ and $y$$x$ 与 $y$ 对称Swapping the variables gives the same $r$ (but a different regression line).交换两个变量,$r$ 不变(但回归线会变)。
Measures only linear association只度量线性关联A strong curved pattern can have $r$ near 0.很强的弯曲模式也可能 $r$ 接近 0。
Not resistant不具有抗性One outlier can raise or lower $r$ sharply (see Topic 3.6).一个离群点就能使 $r$ 大幅升降(见主题 3.6)。
Strong positive强正相关r = 0.96Moderate positive中等正相关r = 0.84Curved: r is 0弯曲:r 为 0r = 0.00Strong negative强负相关r = −0.94
Figure 2.4. Four scatterplots and their correlations. The curved set follows an exact parabola yet has $r=0$ because r measures only straight-line association.图 2.4. 四组散点图及其相关系数。弯曲的一组严格落在抛物线上,但 r 只度量直线关联,所以 $r=0$。
Worked Example 2.8: Calculate $r$ from standardized values例题 2.8:由标准化值计算 $r$

Illustrative data. A dealer records age $x$ (years) and asking price $y$ (thousands of dollars) for five used cars: $(1,23),(3,21),(4,17),(6,16),(8,12)$.

  1. Summary statistics: $\bar{x}=4.4$, $s_x=2.702$; $\bar{y}=17.8$, $s_y=4.324$.
  2. Standardize each value, $z_x=(x-\bar{x})/s_x$ and $z_y=(y-\bar{y})/s_y$, then multiply (table below).
  3. Add the products and divide by $n-1=4$: $r=\dfrac{-3.903}{4}=-0.976$.
  4. Interpretation. There is a very strong negative linear association between a used car's age and its asking price: older cars in this sample tend to have lower asking prices.
$x$$y$$z_x$$z_y$$z_xz_y$
123−1.2581.202−1.513
321−0.5180.740−0.383
417−0.148−0.1850.027
6160.592−0.416−0.246
8121.332−1.341−1.787
sum合计−3.903

示例数据。一家车行记录五辆二手车的车龄 $x$(年)与标价 $y$(千美元):$(1,23),(3,21),(4,17),(6,16),(8,12)$。

  1. 汇总统计量:$\bar{x}=4.4$,$s_x=2.702$;$\bar{y}=17.8$,$s_y=4.324$。
  2. 分别标准化:$z_x=(x-\bar{x})/s_x$,$z_y=(y-\bar{y})/s_y$,再相乘(见下表)。
  3. 乘积求和后除以 $n-1=4$:$r=\dfrac{-3.903}{4}=-0.976$。
  4. 解释。二手车车龄与标价之间存在很强的负向线性关联:在这份样本中,车龄越大的车倾向标价越低。
$x$$y$$z_x$$z_y$$z_xz_y$
123−1.2581.202−1.513
321−0.5180.740−0.383
417−0.148−0.1850.027
6160.592−0.416−0.246
8121.332−1.341−1.787
sum合计−3.903
Worked Example 2.9: r near 0 does not mean no relationship; r does not depend on units例题 2.9:$r$ 接近 0 不代表没有关系;$r$ 与单位无关

Part A. The five points $(-2,4),(-1,1),(0,0),(1,1),(2,4)$ lie exactly on $y=x^2$.

  1. $\bar{x}=0$ and $\bar{y}=2$. The products $(x-\bar{x})(y-\bar{y})$ are $(-2)(2)=-4$, $(-1)(-1)=1$, $(0)(-2)=0$, $(1)(-1)=-1$, $(2)(2)=4$.
  2. They sum to $-4+1+0-1+4=0$, so $r=0$ exactly.
  3. Yet $y$ is perfectly determined by $x$. Zero correlation rules out a linear association only. Always look at the scatterplot first.

Part B. The asking prices in Example 2.8 are converted from thousands of dollars to dollars ($y^*=1000y$), and ages from years to months ($x^*=12x$).

  1. Multiplying by positive constants rescales $s_x$ and $s_y$ by the same factors, so every standardized value $z$ is unchanged.
  2. Therefore $r$ is still $-0.976$. If the price were measured as a discount below a list price, so that the sign of $y$ flips ($y^*=-y$), then $r$ would change sign to $+0.976$.

甲部分。五个点 $(-2,4),(-1,1),(0,0),(1,1),(2,4)$ 恰好落在 $y=x^2$ 上。

  1. $\bar{x}=0$,$\bar{y}=2$。乘积 $(x-\bar{x})(y-\bar{y})$ 依次为 $(-2)(2)=-4$,$(-1)(-1)=1$,$(0)(-2)=0$,$(1)(-1)=-1$,$(2)(2)=4$。
  2. 它们之和为 $-4+1+0-1+4=0$,所以 $r=0$。
  3. 但 $y$ 完全由 $x$ 决定。零相关只排除了线性关联。一定要先看散点图。

乙部分。把例题 2.8 中的标价由千美元换成美元($y^*=1000y$),车龄由年换成月($x^*=12x$)。

  1. 乘以正常数后,$s_x$ 与 $s_y$ 按相同倍数缩放,所以每个标准化值 $z$ 都不变。
  2. 因此 $r$ 仍为 $-0.976$。如果把价格改为低于标价的折扣,使 $y$ 变号($y^*=-y$),则 $r$ 变号为 $+0.976$。
Correlation does not imply causation相关不等于因果

A strong association can come from a third variable. Across coastal towns, ice cream sales and sunburn cases may have a high positive correlation because hot, sunny weather increases both. This variable is a confounding (lurking) variable. Only a well-designed randomized experiment can support a cause-and-effect conclusion; an observational correlation cannot, however large $|r|$ is. Reserve the word "correlation" for two quantitative variables.

很强的关联可能来自第三个变量。在沿海城镇中,冰淇淋销量与晒伤人数可能高度正相关,因为炎热晴朗的天气同时增加两者。这个变量是混杂(潜在)变量。只有设计良好的随机化实验才能支持因果结论;无论 $|r|$ 多大,观察性相关都不能。“相关”一词只用于两个定量变量。

Worked Example: One far-off point can collapse $r$例题:一个远离的点可使 $r$ 骤降

Illustrative data. Six basketball players record practice hours per week $x$ and free throws made out of 20, $y$: $(1,8),(2,10),(3,9),(4,13),(5,14),(6,16)$. Technology gives $r=0.953$, $r^2=0.908$ and the line $\hat{y}=6.07+1.600x$. A seventh player practised 12 hours but made only 10 free throws: $(12,10)$.

  1. Before. $r=0.953$ describes a very strong positive linear association: players who practise more tend to make more free throws, and about 90.8% of the variation in free throws is explained by the line.
  2. After. With all seven players, technology gives $r=0.247$, $r^2=0.061$ and slope $0.200$. One point moved $r$ from 0.95 to 0.25 and cut the slope from 1.60 to 0.20.
  3. Why. $r$ is built from means and standard deviations, and a point with $x=12$ lies far from the other $x$-values (high leverage) and far below the trend. The correlation is not resistant to such a point.
  4. Check the old line. Extending the first line to $x=12$ predicts $6.07+1.600(12)=25.3$ free throws, more than the 20 attempted, so the straight-line trend cannot hold that far. The new point is a warning about extrapolation as well as an outlier.
  5. What to do. Look at the scatterplot first. Investigate the point (fatigue? injury?), then report the analysis with and without it and say that the weak $r=0.247$ is caused by one player. Do not delete the point only to restore a high $r$.
  6. Full answer. A complete answer states: "Without the seventh player there is a very strong positive linear association ($r=0.953$). Including the player who practised 12 hours and made 10 shots lowers $r$ to 0.247, because $r$ is sensitive to a point far from the others in $x$ and far from the trend. The weak positive association for the seven players is due to that one point."

示例数据。六名篮球运动员记录每周练习小时数 $x$ 与 20 次罚球的命中数 $y$:$(1,8),(2,10),(3,9),(4,13),(5,14),(6,16)$。技术工具给出 $r=0.953$,$r^2=0.908$,直线为 $\hat{y}=6.07+1.600x$。第七名运动员练习了 12 小时,却只命中 10 次:$(12,10)$。

  1. 加点之前。$r=0.953$ 表示很强的正向线性关联:练习更多的运动员倾向命中更多罚球,直线解释了罚球命中数约 90.8% 的变异。
  2. 加点之后。七名运动员全部计入时,技术工具给出 $r=0.247$,$r^2=0.061$,斜率为 $0.200$。一个点就使 $r$ 从 0.95 降到 0.25,并使斜率从 1.60 降到 0.20。
  3. 原因。$r$ 由均值和标准差构成,而 $x=12$ 的点离其他 $x$ 值很远(高杠杆),又远低于趋势。相关系数对这样的点不具有抗干扰性。
  4. 检验旧直线。把第一条直线延伸到 $x=12$,预测为 $6.07+1.600(12)=25.3$ 次,超过了 20 次的投篮总数,所以直线趋势不可能延伸那么远。这个新点既是离群点,也是外推的警示。
  5. 怎么做。先看散点图。调查这个点(疲劳?受伤?),再分别报告包括和不包括它的分析,并说明较弱的 $r=0.247$ 是由一名运动员造成的。不要仅仅为了恢复较大的 $r$ 而删除该点。
  6. 完整答案。完整答案要点:“不含第七名运动员时,存在很强的正向线性关联($r=0.953$)。加入练习 12 小时、命中 10 次的运动员后,$r$ 降到 0.247,因为 $r$ 对在 $x$ 方向远离其他点、又远离趋势的点很敏感。七名运动员的弱正向关联是由这一个点造成的。”
Also on the 2027 exam对应 2027 考试新增内容
The revised course states that $r$ is unit-free and always between $-1$ and $1$ inclusive; that strength depends on how close $r$ is to $-1$ or $1$; and that $r=\pm1$ means a perfect linear association. It also states that an $r$ close to $-1$ or $1$ does not necessarily mean a linear model is appropriate (check the residual plot, Topic 3.4), and that correlation does not necessarily imply causation. In the revised course $r$ is obtained with technology.
修订课程指出:$r$ 无单位,且总在 $-1$ 到 $1$ 之间(含端点);强度取决于 $r$ 与 $-1$ 或 $1$ 的接近程度;$r=\pm1$ 表示完全线性关联。同时指出,$r$ 接近 $-1$ 或 $1$ 并不一定说明线性模型合适(应查看残差图,见主题 3.4),而且相关不一定意味着因果。修订课程中 $r$ 用技术手段求得。
AP exam tipAP 考试提示

Interpret $r$ with direction, strength and the word "linear" in context: "There is a strong negative linear association between a used car's age and its asking price." Never say "$r=-0.976$ means $97.6\%$ of the data fit the line", and never say $r$ proves one variable causes the other.

解释 $r$ 时要写出方向、强度和“线性”,并结合情境:“二手车车龄与标价之间存在很强的负向线性关联。”不要说“$r=-0.976$ 表示 $97.6\%$ 的数据在直线上”,也不要说 $r$ 证明了一个变量导致另一个变量。

Common Mistake: Treating $r$ as a percentage scale常见错误:把 $r$ 当作百分比刻度

A student says "$r=0.6$ is twice as strong as $r=0.3$", or that $r=0.6$ means the variables are "60% correlated". Strength does not scale in proportion to $r$. Squaring gives the variation explained: $r^2=0.36$ for $r=0.6$ and $r^2=0.09$ for $r=0.3$, so the first explains four times as much variation as the second.

Fix. Compare $|r|$ by its closeness to 1, compare variation explained with $r^2$, and describe each association in words.

一名学生说“$r=0.6$ 的关联强度是 $r=0.3$ 的两倍”,或说 $r=0.6$ 表示两个变量“60% 相关”。关联的强度并不与 $r$ 成比例。平方后才是被解释的变异:$r=0.6$ 时 $r^2=0.36$,$r=0.3$ 时 $r^2=0.09$,所以前者解释的变异是后者的四倍。

改正。用 $|r|$ 与 1 的接近程度来比较,用 $r^2$ 比较被解释的变异,并用文字描述每个关联。

Common mistakes常见错误
  • Reading $r=-0.9$ as "weaker" than $r=0.5$ because it is negative. Strength depends on $|r|$.
  • Saying $r=0.8$ means "80% of the points are on the line" or "80% of the variation is explained". The latter is $r^2=64\%$.
  • Using $r$ for a curved pattern, or quoting a high $r$ without checking the scatterplot.
  • Computing a correlation for a categorical variable (such as coded categories 1, 2, 3).
  • Concluding causation from a high $r$ in an observational study.
  • 因为 $r=-0.9$ 是负数就认为它比 $r=0.5$“弱”。强度取决于 $|r|$。
  • 说 $r=0.8$ 表示“80% 的点在直线上”或“80% 的变异被解释”。后者对应 $r^2=64\%$。
  • 对弯曲模式使用 $r$,或不看散点图就引用较大的 $r$。
  • 对分类变量(如编码为 1、2、3 的类别)计算相关系数。
  • 根据观察研究中较大的 $r$ 得出因果结论。
Calculator steps计算器操作

TI-84 Plus

  1. Turn diagnostics on once: 2nd 0 (CATALOG) → scroll to DiagnosticOn → ENTER twice.
  2. Enter $x$ in L1 and $y$ in L2. Press STAT → CALC → 8:LinReg(a+bx) → L1,L2 → ENTER.
  3. Read $r$ (and $r^2$) from the output. For the car data, $r=-0.9757$ and $r^2=0.9520$.

TI-Nspire

  1. In a Lists & Spreadsheet page, enter $x$ and $y$ in columns A and B.
  2. Menu → Statistics → Stat Calculations → Linear Regression (mx+b). Set X List and Y List and press OK.
  3. The output lists $m$, $b$, $r^2$ and $r$ (the Nspire shows $r$ here without a separate diagnostics switch).

TI-84 Plus

  1. 先打开诊断功能(只需一次):2nd 0(CATALOG)→ 找到 DiagnosticOn → 按两次 ENTER。
  2. 把 $x$ 输入 L1、$y$ 输入 L2。按 STAT → CALC → 8:LinReg(a+bx) → L1,L2 → ENTER。
  3. 从输出读取 $r$(和 $r^2$)。对二手车数据,$r=-0.9757$,$r^2=0.9520$。

TI-Nspire

  1. 在 Lists & Spreadsheet 页面的 A、B 两列输入 $x$ 和 $y$。
  2. Menu → Statistics → Stat Calculations → Linear Regression (mx+b)。设置 X List 和 Y List,按 OK。
  3. 输出包含 $m$、$b$、$r^2$ 和 $r$(Nspire 在此直接显示 $r$,没有单独的诊断开关)。
Check your understanding自我检测
For a sample of trees, $r=-0.84$ between age and yearly growth. Interpret $r$ in context.一批树木的年龄与年生长量的相关系数为 $r=-0.84$。结合情境解释 $r$。

Answer. There is a strong negative linear association between a tree's age and its yearly growth: older trees in the sample tend to have less yearly growth.

答案。树的年龄与年生长量之间存在较强的负向线性关联:样本中年龄更大的树倾向有更少的年生长量。

Heights (in cm) and weights (in kg) of students have $r=0.72$. The heights are converted to inches. What is the new $r$? What if you plot weight on the horizontal axis instead?学生身高(cm)与体重(kg)的 $r=0.72$。把身高换算成英寸后新的 $r$ 是多少?如果改把体重放在横轴上呢?

Answer. $r$ stays $0.72$ in both cases: it is unit-free and symmetric in $x$ and $y$.

答案。两种情况下 $r$ 都仍为 $0.72$:它无单位,且对 $x$、$y$ 对称。

Which shows the stronger linear association: $r=-0.91$ or $r=0.78$? Explain.$r=-0.91$ 与 $r=0.78$ 哪个表示更强的线性关联?说明理由。

Answer. $r=-0.91$, because $|{-0.91}|=0.91>0.78$. The sign shows only direction.

答案。$r=-0.91$,因为 $|-0.91|=0.91>0.78$。符号只表示方向。

Across 40 cities, the correlation between the number of ice cream shops and the number of drownings is $r=0.82$. Does opening more ice cream shops cause more drownings? Give a better explanation.在 40 个城市中,冰淇淋店数量与溺水人数的相关系数为 $r=0.82$。多开冰淇淋店会导致更多溺水吗?给出更好的解释。

Answer. No. This is observational data, so it shows association only. A confounding variable such as warm weather or population size probably increases both.

答案。不会。这是观察数据,只能说明关联。天气温暖或城市人口规模等混杂变量很可能同时使两者增加。

AP FRQ-style model response: Interpreting the correlationAP 简答题示范答案:解释相关系数

Prompt. For the used-car data of Example 2.8 the correlation between age and asking price is $r=-0.976$. (a) Interpret $r$. (b) A student says that age causes the price to fall by 97.6%. Evaluate the statement.

What a complete answer statesModel wording
(a) Direction, strength, linear, contextThere is a very strong negative linear association: older cars in this sample tend to have lower asking prices.
(b) Identifies the misinterpretation of $r$$r$ is not a percentage of change or of data. $-0.976$ describes the closeness to a line, not a percent decrease.
(b) No causation from correlationThis is an observational association. Age is related to mileage and condition, so other variables are also involved. $r$ alone cannot show that age causes a price drop.

题目。对例题 2.8 的二手车数据,车龄与标价的相关系数为 $r=-0.976$。(a) 解释 $r$。(b) 一名学生说车龄使价格下降 97.6%。评价这一说法。

完整答案要点示范表述
(a) 方向、强度、线性、情境存在很强的负向线性关联:样本中车龄越大的车倾向标价越低。
(b) 指出对 $r$ 的误解$r$ 不是变化百分比,也不是数据所占百分比。$-0.976$ 描述与直线的贴合程度,而不是降价百分比。
(b) 不能由相关推出因果这是观察性关联。车龄与里程、车况相关,其他变量也在起作用。仅凭 $r$ 不能说明车龄导致价格下降。

Linear Regression Models线性回归模型

Learning objectives学习目标
  • Write a linear regression model $\hat{y}=a+bx$ and identify $a$ (intercept) and $b$ (slope).
  • Interpret the slope and the y-intercept in context, using "predicted".
  • Predict a response value, and distinguish interpolation from extrapolation.
  • Explain why the intercept sometimes has no sensible interpretation.
  • 写出线性回归模型 $\hat{y}=a+bx$,并指出 $a$(截距)与 $b$(斜率)。
  • 结合情境解释斜率与 $y$ 截距,并使用“预测”一词。
  • 预测响应变量的值,并区分内插与外推。
  • 解释截距为什么有时没有合理的含义。

If a scatterplot is roughly linear, we can use a linear regression model to predict the response from the explanatory variable:

如果散点图大致呈线性,就可以用线性回归模型由解释变量预测响应变量:

$$\hat{y}=a+bx$$

Here $\hat{y}$ ("y-hat") is the predicted value of the response, $x$ is the explanatory value, $b$ is the slope (the predicted change in $y$ for a one-unit increase in $x$) and $a$ is the y-intercept (the predicted value of $y$ when $x=0$). The line is fitted by the least-squares method of Topic 3.5. For the data of Table 2.2 technology gives $\hat{y}=51.21+3.694x$.

其中 $\hat{y}$(读作“y 帽”)是响应变量的预测值,$x$ 是解释变量的值,$b$ 是斜率($x$ 增加一个单位时 $y$ 的预测变化量),$a$ 是 y 截距($x=0$ 时 $y$ 的预测值)。这条直线用主题 3.5 的最小二乘法拟合。对表 2.2 的数据,技术手段给出 $\hat{y}=51.21+3.694x$。

Interpretation templates解释模板
  • Slope: "For each additional [unit of $x$], the predicted [response] increases (decreases) by about $|b|$ [units of $y$]."
  • Intercept: "When [$x$ is 0], the predicted [response] is about $a$ [units of $y$]." Then say whether $x=0$ is within the data and whether this makes sense.

Always include context, units, and the word "predicted" (or "on average"). The model describes a trend, not an exact rule for every individual.

  • 斜率:“[$x$ 的单位] 每增加一个,[响应变量] 的预测值增加(减少)约 $|b|$ [$y$ 的单位]。”
  • 截距:“当 [$x$ 为 0] 时,[响应变量] 的预测值约为 $a$ [$y$ 的单位]。”然后说明 $x=0$ 是否在数据范围内、这个值是否合理。

一定要写情境、单位和“预测”(或“平均”)。模型描述的是趋势,不是对每个个体都精确成立的规则。

406080100120024681012Predicted exam score (points)预测考试成绩(分)Weekly study time (hours)每周学习时间(小时)Maximum possible score: 100成绩上限:100x = 10: 88.2x = 10:88.2Extrapolation外推区Interpolation (data range 1 to 8)内插区(数据范围 1 至 8)
Figure 2.5. The least-squares line for Table 2.2. Predictions inside the observed $x$-range (1 to 8 hours) are interpolations. Beyond it (shaded, including the narrow strip left of 1 hour) they are extrapolations: at 10 hours the line predicts about 88.2 points, and it would reach the maximum score of 100 near 13.2 hours, so predictions farther out are impossible scores.图 2.5. 表 2.2 的最小二乘回归线。观测 $x$ 范围(1 至 8 小时)内的预测是内插;范围之外(阴影区,含 1 小时左侧的窄条)是外推:学习 10 小时时直线预测约 88.2 分,约在 13.2 小时达到满分 100,所以更远处的预测是不可能的成绩。
Worked Example 2.10: Interpret the slope and intercept, then predict例题 2.10:解释斜率与截距并作预测

For the study-time data, $\hat{y}=51.21+3.694x$, where $x$ is weekly study time in hours (observed from 1 to 8 hours) and $\hat{y}$ is the predicted exam score.

  1. Slope. For each additional hour of weekly study, the predicted exam score increases by about 3.69 points.
  2. Intercept. A student who studies 0 hours per week is predicted to score about 51.2 points. Since the data have $x$ from 1 to 8 hours, $x=0$ lies outside the data, so this value is an extrapolation and should be treated cautiously.
  3. Prediction. For a student who studies 6 hours per week: $\hat{y}=51.214+3.694(6)=73.38$. We predict a score of about 73.4 points. This is an interpolation (6 is between 1 and 8).
  4. Remember. The prediction is for the average student who studies 6 hours. The actual student with $x=6$ scored 72, close to but not equal to the prediction.

对学习时间数据,$\hat{y}=51.21+3.694x$,其中 $x$ 为每周学习小时数(观测范围 1 至 8 小时),$\hat{y}$ 为预测考试成绩。

  1. 斜率。每周学习时间每增加 1 小时,预测考试成绩增加约 3.69 分。
  2. 截距。每周学习 0 小时的学生预测成绩约为 51.2 分。数据中 $x$ 的范围是 1 至 8 小时,$x=0$ 在数据范围之外,所以这是外推,应谨慎对待。
  3. 预测。每周学习 6 小时的学生:$\hat{y}=51.214+3.694(6)=73.38$,预测成绩约为 73.4 分。这是内插(6 在 1 与 8 之间)。
  4. 注意。预测的是每周学习 6 小时的学生的平均情况。数据中 $x=6$ 的学生实际得 72 分,接近但不等于预测值。
Worked Example 2.11: Extrapolation can give impossible answers例题 2.11:外推可能给出不可能的结果

Use the same model. Predict the score for (a) 3.5 hours and (b) 20 hours per week.

  1. (a) $\hat{y}=51.214+3.694(3.5)=64.14\approx64.1$ points. Since $1\le3.5\le8$, this is an interpolation, and is reasonably trustworthy if the linear model is appropriate.
  2. (b) $\hat{y}=51.214+3.694(20)=125.10\approx125.1$ points. Since 20 is far beyond the largest observed $x$ (8 hours), this is an extrapolation.
  3. The prediction exceeds the maximum possible score of 100, so the linear trend cannot continue that far. The line describes the data only in the range studied. Predictions become less reliable the farther $x$ is from the observed range.

用同一个模型。预测每周学习 (a) 3.5 小时和 (b) 20 小时的成绩。

  1. (a) $\hat{y}=51.214+3.694(3.5)=64.14\approx64.1$ 分。因为 $1\le3.5\le8$,这是内插,若线性模型合适,则相当可信。
  2. (b) $\hat{y}=51.214+3.694(20)=125.10\approx125.1$ 分。20 远大于观测到的最大 $x$(8 小时),这是外推。
  3. 预测值超过了满分 100,所以线性趋势不可能延续到那么远。直线只在研究过的范围内描述数据;$x$ 离观测范围越远,预测越不可靠。
Worked Example 2.12: A negative slope, and solving for x例题 2.12:负斜率与反解 $x$

For the used-car data (age $x$ in years, observed 1 to 8; asking price $y$ in thousands of dollars), technology gives $\hat{y}=24.67-1.562\,x$.

  1. Slope. For each additional year of age, the predicted asking price decreases by about 1.56 thousand dollars (about 1,562 dollars).
  2. Prediction at 5 years: $\hat{y}=24.671-1.562(5)=16.86$, about 16,863 dollars.
  3. Age with predicted price 10 thousand dollars: solve $10=24.671-1.562x$ to get $x=(24.671-10)/1.562\approx9.4$ years. This is above the observed maximum of 8, so it is an extrapolation.

对二手车数据(车龄 $x$ 以年计,观测范围 1 至 8;标价 $y$ 以千美元计),技术手段给出 $\hat{y}=24.67-1.562\,x$。

  1. 斜率。车龄每增加 1 年,预测标价下降约 1.56 千美元(约 1,562 美元)。
  2. 车龄 5 年的预测:$\hat{y}=24.671-1.562(5)=16.86$,约 16,863 美元。
  3. 预测标价为 10 千美元对应的车龄:解 $10=24.671-1.562x$ 得 $x=(24.671-10)/1.562\approx9.4$ 年。它大于观测最大值 8,所以是外推。
Also on the 2027 exam对应 2027 考试新增内容
The revised course states the model as $\hat{y}=a+bx$ with $a$ the y-intercept and $b$ the slope, defines extrapolation (predicting from an $x$ beyond the interval used to fit the line, with reliability falling as the extrapolation grows) and interpolation (an $x$ inside that interval), and says the slope is "the predicted increase or decrease in the response for a one-unit increase in the explanatory variable". It also notes that an intercept may have no sensible interpretation: $x=0$ may be an extrapolation, or the predicted value may be impossible (for example a negative height).
修订课程把模型写成 $\hat{y}=a+bx$,$a$ 为 y 截距,$b$ 为斜率;定义外推(用超出拟合区间的 $x$ 作预测,外推越远越不可靠)与内插($x$ 在该区间内);并把斜率解释为“解释变量增加一个单位时响应变量的预测增减量”。同时指出截距可能没有合理解释:$x=0$ 可能是外推,或预测值不可能(例如身高为负)。
AP exam tipAP 考试提示

Whenever a prediction is asked for, show the substitution (for example $\hat{y}=51.214+3.694(6)$), report the value with units, and comment on interpolation or extrapolation if the $x$ is near or outside the data range. Do not leave out "predicted": the model does not give exact values.

只要题目要求预测,就写出代入过程(例如 $\hat{y}=51.214+3.694(6)$),写出带单位的结果,并在 $x$ 靠近或超出数据范围时说明是内插还是外推。不要漏写“预测”:模型给的不是精确值。

Common Mistake: Predicting $x$ from $y$ by rearranging the line常见错误:通过变形直线由 $y$ 预测 $x$

For a student who scored 80, a student solves $80=51.214+3.694x$ and predicts $x\approx7.79$ hours. The line was fitted to make errors in the score small, not errors in the hours, so rearranging it treats the wrong variable as the response. Fit a new line with score as the explanatory variable: its slope is $r\,s_x/s_y\approx0.217$ hours per point, and $\hat{x}=4.3+0.217(80-67.1)\approx7.10$ hours. The two answers differ unless $|r|=1$.

Fix. Decide which variable you want to predict, make it $y$ before fitting, and use the matching line. Solving for $x$ is correct only to find where the line reaches a stated predicted value, as in Worked Example 2.12.

对得 80 分的学生,一名学生解 $80=51.214+3.694x$,预测 $x\approx7.79$ 小时。这条直线是为使成绩的误差最小而拟合的,不是为使小时数的误差最小,所以把它变形就把错误的变量当成了响应变量。应以成绩为解释变量重新拟合:斜率为 $r\,s_x/s_y\approx0.217$ 小时每分,$\hat{x}=4.3+0.217(80-67.1)\approx7.10$ 小时。除非 $|r|=1$,两个答案并不相同。

改正。先确定要预测哪个变量,拟合前把它作为 $y$,再用对应的直线。只有在求直线何时达到某个给定预测值时,才可以像例题 2.12 那样解出 $x$。

Common mistakes常见错误
  • Interpreting the slope without context or with "x increases by one, y increases by $b$" and no word "predicted".
  • Claiming the slope shows that more study causes higher scores. A regression slope from observational data is an association.
  • Always interpreting the intercept as meaningful, even when $x=0$ is far outside the data or gives an impossible value.
  • Confusing which calculator form is used: TI-84 item 4 (ax+b) swaps the roles of $a$ and $b$ compared with $\hat{y}=a+bx$, and TI-Nspire uses $m x+b$.
  • 解释斜率时没有情境,或只写“x 增加 1,y 增加 $b$”而不写“预测”。
  • 声称斜率表明多学习导致更高分数。来自观察数据的回归斜率只是关联。
  • 总把截距当作有意义,即使 $x=0$ 远在数据范围之外或给出不可能的值。
  • 搞混计算器的形式:TI-84 的第 4 项 (ax+b) 与 $\hat{y}=a+bx$ 中 $a$、$b$ 的角色相反;TI-Nspire 使用 $mx+b$。
Calculator steps计算器操作

TI-84 Plus

  1. Press STAT → CALC → 8:LinReg(a+bx). Enter L1,L2,Y1 (get Y1 from VARS → Y-VARS → 1:Function → 1:Y1) and press ENTER. This stores the equation in Y=.
  2. Read $a=51.2141$, $b=3.6944$. On the home screen, type Y1(6) (VARS → Y-VARS → Y1, then (6)) to get the prediction 73.38.
  3. To draw the line over the scatterplot, press GRAPH with Plot1 on.

TI-Nspire

  1. Menu → Statistics → Stat Calculations → Linear Regression (mx+b). Set X List, Y List and choose f1 for "Save RegEqn to".
  2. The output gives $m$ (the slope, our $b$) and $b$ (the intercept, our $a$): the letters are reversed relative to $\hat{y}=a+bx$.
  3. In a Calculator page, type f1(6) to predict at $x=6$.

TI-84 Plus

  1. 按 STAT → CALC → 8:LinReg(a+bx)。输入 L1,L2,Y1(Y1 从 VARS → Y-VARS → 1:Function → 1:Y1 选取),按 ENTER。方程会存入 Y=。
  2. 读出 $a=51.2141$,$b=3.6944$。在主屏幕输入 Y1(6)(VARS → Y-VARS → Y1,再输入 (6))得到预测值 73.38。
  3. 要在散点图上画出直线,在 Plot1 开启的状态下按 GRAPH。

TI-Nspire

  1. Menu → Statistics → Stat Calculations → Linear Regression (mx+b)。设置 X List、Y List,并在“Save RegEqn to”中选 f1。
  2. 输出中 $m$ 是斜率(即我们的 $b$),$b$ 是截距(即我们的 $a$):字母与 $\hat{y}=a+bx$ 相反。
  3. 在 Calculator 页面输入 f1(6) 即可预测 $x=6$ 时的值。
Check your understanding自我检测
A model for plant height (cm) from weeks since planting is $\hat{y}=12+3x$, based on data with $x$ from 1 to 6. Predict the height at 4 weeks and interpret the slope.由种植后周数预测植株高度(cm)的模型为 $\hat{y}=12+3x$,数据的 $x$ 范围为 1 至 6。预测第 4 周的高度并解释斜率。

Answer. $\hat{y}=12+3(4)=24$ cm. For each additional week after planting, the predicted height increases by about 3 cm.

答案。$\hat{y}=12+3(4)=24$ cm。种植后每多一周,预测高度增加约 3 cm。

Use the plant model above. Is a prediction at $x=20$ weeks an interpolation or an extrapolation? Give one reason to distrust it.仍用上面的植株模型。预测 $x=20$ 周是内插还是外推?给出一条不可信的理由。

Answer. Extrapolation, because 20 is far beyond the observed 1 to 6 weeks. Plants do not keep growing at the same steady rate indefinitely, so the straight-line pattern probably fails there.

答案。外推,因为 20 远远超出观测的 1 至 6 周。植物不会无限期保持同样的匀速生长,所以直线模式在那里很可能不成立。

A regression of a runner's 5 km time $y$ (minutes) on weekly training distance $x$ (km, observed 10 to 60) gives $\hat{y}=38-0.15x$. Interpret the slope and the intercept.跑者 5 km 用时 $y$(分钟)对每周训练距离 $x$(km,观测范围 10 至 60)的回归为 $\hat{y}=38-0.15x$。解释斜率和截距。

Answer. Slope: for each additional kilometer of weekly training, the predicted 5 km time decreases by about 0.15 minutes. Intercept: with 0 km of weekly training the predicted time is 38 minutes, but 0 is outside the observed 10 to 60 km, so this is an extrapolation.

答案。斜率:每周训练距离每增加 1 km,预测 5 km 用时减少约 0.15 分钟。截距:每周训练 0 km 时预测用时 38 分钟,但 0 在观测的 10 至 60 km 之外,所以是外推。

AP FRQ-style model response: Interpreting a regression lineAP 简答题示范答案:解释回归直线

Prompt. The regression line for the 10 students of Table 2.2 is $\hat{y}=51.21+3.69x$ ($x$: weekly study hours, $y$: exam score). (a) Interpret the slope. (b) Interpret the intercept. (c) Predict the score for 9 hours and comment on the reliability.

What a complete answer statesModel wording
(a) Slope in context with "predicted" and unitsFor each additional hour of weekly study, the predicted exam score increases by about 3.69 points.
(b) Intercept in context and its validityA student who studies 0 hours is predicted to score about 51.2 points, but 0 hours is outside the observed range (1 to 8), so this is an extrapolation.
(c) Correct prediction$\hat{y}=51.21+3.69(9)\approx84.4$ points.
(c) Identifies extrapolation9 hours is just beyond the largest observed value (8), so it is an extrapolation and less reliable than a prediction inside 1 to 8.

题目。表 2.2 中 10 名学生的回归直线为 $\hat{y}=51.21+3.69x$($x$:每周学习小时,$y$:考试成绩)。(a) 解释斜率。(b) 解释截距。(c) 预测学习 9 小时的成绩,并评论可靠性。

完整答案要点示范表述
(a) 带“预测”和单位的情境斜率每周学习时间每增加 1 小时,预测考试成绩增加约 3.69 分。
(b) 情境截距及其有效性每周学习 0 小时的学生预测成绩约为 51.2 分,但 0 小时在观测范围(1 至 8)之外,所以是外推。
(c) 正确预测$\hat{y}=51.21+3.69(9)\approx84.4$ 分。
(c) 指出外推9 小时略超出观测最大值(8),是外推,比 1 至 8 范围内的预测更不可靠。

Residuals and Residual Plots残差与残差图

Learning objectives学习目标
  • Calculate a residual as observed minus predicted and interpret its sign and size in context.
  • Construct and interpret a residual plot.
  • Use the pattern of a residual plot to decide whether a linear model is appropriate.
  • State properties of residuals for a least-squares line.
  • 按“观测值减预测值”计算残差,并结合情境解释其符号与大小。
  • 作出并解释残差图。
  • 根据残差图的模式判断线性模型是否合适。
  • 说出最小二乘线残差的性质。

A residual is the prediction error for one individual:

残差是单个个体的预测误差:

$$\text{residual}=e=y-\hat{y}=\text{observed}-\text{predicted}$$

A positive residual means the point is above the line: the model underpredicts (underestimates) the response. A negative residual means the point is below the line: the model overpredicts (overestimates). Residuals have the units of $y$. For a least-squares line with an intercept, the residuals always sum to zero (apart from rounding), so a zero sum is not evidence of a good fit.

正残差表示点在直线上方:模型低估了响应变量。负残差表示点在直线下方:模型高估了响应变量。残差的单位与 $y$ 相同。对含截距的最小二乘线,残差之和总为 0(舍入误差除外),所以和为零并不能说明拟合良好。

Student学生$x$$y$$\hat{y}=51.21+3.694x$Residual $y-\hat{y}$残差 $y-\hat{y}$
115554.910.09
225258.60−6.60
326358.604.40
436062.30−2.30
547065.994.01
656669.69−3.69
757669.696.31
867273.38−1.38
978077.072.93
1087780.77−3.77

Table 2.3. Predicted values and residuals for the study-time data. The ten residuals sum to 0.00.

表 2.3. 学习时间数据的预测值与残差。十个残差之和为 0.00。

Data, line and residuals数据、直线与残差Study time (h)学习时间(小时)Residual plot残差图Study time (h)学习时间(小时)
Figure 2.6. Left: each residual is the signed vertical distance from a point to the least-squares line. Right: the residual plot shows the same distances against $x$, here a patternless band around zero.图 2.6. 左:每个残差是点到最小二乘回归线的带符号竖直距离。右:残差图把这些距离对 $x$ 作图,此处是围绕 0 的无规律带状散布。
Worked Example 2.13: Calculate and interpret residuals例题 2.13:计算并解释残差

Use $\hat{y}=51.214+3.694x$ for the study-time data.

  1. Student 7 studied $x=5$ hours and scored $y=76$. Predicted: $\hat{y}=51.214+3.694(5)=69.69$. Residual: $76-69.69=6.31$.
  2. Interpretation. This student scored about 6.3 points higher than the model predicts for someone who studies 5 hours per week. The model underpredicts this student's score.
  3. Student 2 studied $x=2$ hours and scored $y=52$. Predicted: $\hat{y}=51.214+3.694(2)=58.60$. Residual: $52-58.60=−6.60$. The model overpredicts by about 6.6 points: this student scored below the predicted value.
  4. Working backwards. If the predicted value is 59 and the residual is $-7$, the observed value is $59+(-7)=52$.

对学习时间数据使用 $\hat{y}=51.214+3.694x$。

  1. 7 号学生每周学习 $x=5$ 小时,得分 $y=76$。预测值:$\hat{y}=51.214+3.694(5)=69.69$。残差:$76-69.69=6.31$。
  2. 解释。这名学生的得分比模型对“每周学习 5 小时的学生”的预测高约 6.3 分。模型低估了这名学生的成绩。
  3. 2 号学生每周学习 $x=2$ 小时,得分 $y=52$。预测值:$\hat{y}=51.214+3.694(2)=58.60$。残差:$52-58.60=−6.60$。模型高估约 6.6 分:这名学生的得分低于预测值。
  4. 反推。若预测值为 59,残差为 $-7$,则观测值为 $59+(-7)=52$。
Worked Example 2.14: A high r with a curved residual plot例题 2.14:$r$ 很大但残差图弯曲

Illustrative data. A lab counts bacteria (number of cells) at hours $t=1,\dots,8$: 105, 148, 230, 335, 520, 745, 1150, 1690. A straight-line fit gives $r=0.934$ ($r^2=0.871$).

  1. Residuals from the line $\hat{y}=−340.1+212.3t$ are about 233, 63, −67, −174, −202, −189, 4, 332.
  2. The signs run $+,+,-,-,-,-,+,+$: the residuals fall, then rise, in a U-shaped (curved) pattern (center panel of Figure 2.7).
  3. Conclusion. Although $r=0.93$ is large, the curved residual plot shows that the relationship is not linear: a straight line underpredicts at the two ends and overpredicts in the middle, so a linear model is not appropriate. A transformation (Topic 3.6) is needed.

示例数据。实验室在 $t=1,\dots,8$ 小时统计细菌数量(细胞数):105, 148, 230, 335, 520, 745, 1150, 1690。直线拟合给出 $r=0.934$($r^2=0.871$)。

  1. 直线 $\hat{y}=−340.1+212.3t$ 的残差约为 233, 63, −67, −174, −202, −189, 4, 332。
  2. 符号依次为 $+,+,-,-,-,-,+,+$:残差先降后升,呈U 形(弯曲)模式(图 2.7 中图)。
  3. 结论。尽管 $r=0.93$ 很大,弯曲的残差图表明关系并非线性:直线在两端低估、在中间高估,所以线性模型不合适,需要作变换(主题 3.6)。
Random: linear is fine随机:线性合适Curved: not linear弯曲:非线性Fan: spread grows扇形:离散增大
Figure 2.7. Three residual plots. A patternless band supports a linear model. Curvature (center panel: residuals from a straight-line fit to the growth data of Example 2.14) says the form is not linear. A fan shape says the size of the prediction errors changes with $x$.图 2.7. 三种残差图。无规律的带状散布支持线性模型;弯曲(中图:对例题 2.14 的增长数据作直线拟合的残差)说明形式不是线性;扇形说明预测误差的大小随 $x$ 变化。

Try it. The interactive LSRL outlier manipulator draws the least-squares line and its residuals for a data set you can change. Drag a point and watch the residuals respond, then continue to Topic 3.6 for the effect on $r$, the slope and the intercept.

动手试试。交互式 最小二乘回归线离群点操作器会为你可修改的数据画出最小二乘线及其残差。拖动一个点,观察残差如何变化,然后到主题 3.6 查看它对 $r$、斜率和截距的影响。

Worked Example: Residuals for a small data set and what they tell you例题:小数据集的残差及其含义

Illustrative data. For the used-car data (age $x$ in years, asking price $y$ in thousands of dollars), the line is $\hat{y}=24.671-1.562x$. Find the residuals, say which car the model misses most, and judge the fit.

  1. Predictions. For ages 1, 3, 4, 6, 8 the predicted prices are 23.11, 19.99, 18.42, 15.30, 12.18.
  2. Residuals (observed minus predicted). $23-23.11=-0.11$, $21-19.99=1.01$, $17-18.42=-1.42$, $16-15.30=0.70$, $12-12.18=-0.18$. They sum to $0.00$, as they must for a least-squares line.
  3. Largest miss. The 4-year-old car has residual $-1.42$: its asking price is about 1.42 thousand dollars below the predicted 18.42, so the model overpredicts it.
  4. Typical size. The squared residuals sum to about 3.59, so $s=\sqrt{3.59/(5-2)}\approx1.09$ thousand dollars, much smaller than the standard deviation of the prices, $s_y=4.32$. Knowing the age cuts the typical prediction error from about 4.3 to about 1.1 thousand dollars ($r^2=0.952$).
  5. Residual plot. The signs run $-,+,-,+,-$ with no curve and no fan, which supports a linear model. With only five cars, though, a residual plot cannot rule out a pattern.
  6. Full answer. A complete answer states: "The model overpredicts the asking price of the 4-year-old car by about 1.42 thousand dollars (residual $-1.42$). The residuals show no curve or fan and the typical prediction error is about 1.1 thousand dollars, much less than the 4.3 thousand dollar spread of the prices, so a linear model is reasonable, although five cars give limited evidence."

示例数据。对二手车数据(车龄 $x$ 为年数,要价 $y$ 为千美元),直线为 $\hat{y}=24.671-1.562x$。求残差,指出模型偏差最大的是哪辆车,并判断拟合好坏。

  1. 预测值。车龄 1、3、4、6、8 年的预测要价依次为 23.11、19.99、18.42、15.30、12.18。
  2. 残差(观测值减预测值)。$23-23.11=-0.11$,$21-19.99=1.01$,$17-18.42=-1.42$,$16-15.30=0.70$,$12-12.18=-0.18$。它们的和为 $0.00$,最小二乘直线的残差必然如此。
  3. 偏差最大者。4 年车龄的汽车残差为 $-1.42$:它的要价比预测的 18.42 低约 1.42 千美元,所以模型高估了它。
  4. 典型大小。残差平方和约为 3.59,所以 $s=\sqrt{3.59/(5-2)}\approx1.09$ 千美元,远小于要价的标准差 $s_y=4.32$。知道车龄后,典型预测误差从约 4.3 降到约 1.1 千美元($r^2=0.952$)。
  5. 残差图。符号依次为 $-,+,-,+,-$,没有弯曲也没有扇形,支持线性模型。不过只有五辆车,残差图无法排除某种模式。
  6. 完整答案。完整答案要点:“模型高估了 4 年车龄汽车的要价约 1.42 千美元(残差 $-1.42$)。残差没有弯曲或扇形,典型预测误差约为 1.1 千美元,远小于要价约 4.3 千美元的离散程度,所以线性模型是合理的,但五辆车提供的证据有限。”
Also on the 2027 exam对应 2027 考试新增内容
The revised course defines the residual as observed minus predicted and says a positive residual means the model underpredicts and a negative residual means it overpredicts. A residual plot is a scatterplot of residuals against the predicted response values (or against the explanatory values). Apparent randomness in the residual plot supports a linear model; curvature suggests that the linear model is not the most appropriate one.
修订课程把残差定义为观测值减预测值,并指出正残差表示模型低估,负残差表示模型高估。残差图是残差对预测响应值(或对解释变量值)的散点图。残差图看起来随机,支持线性模型;出现弯曲则说明线性模型不是最合适的模型。
AP exam tipAP 考试提示

To justify a linear model, state that the residual plot shows no pattern (random scatter around zero). To reject it, name the pattern: "the residual plot is curved (U-shaped), so a linear model is not appropriate". Do not rely on a large $r$ or $r^2$, and always write residuals as observed minus predicted.

要为线性模型提供依据,就说明残差图没有模式(围绕 0 随机散布)。要否定它,就指出模式:“残差图呈弯曲(U 形),所以线性模型不合适”。不要只依赖较大的 $r$ 或 $r^2$,并始终把残差写成观测值减预测值。

Common Mistake: Plotting residuals against the observed $y$常见错误:把残差对观测的 $y$ 作图

A student plots the residuals against the observed scores and sees an upward slant, then calls it a pattern. For a least-squares line the residuals are positively correlated with $y$ by construction: here $\sqrt{1-r^2}=\sqrt{1-0.802}\approx0.445$. The slant appears even when a linear model is perfectly good. The residuals have correlation $0$ with $x$ and with $\hat{y}$.

Fix. Plot residuals against $x$ or against $\hat{y}$, and judge curvature or fanning there.

一名学生把残差对观测成绩作图,看到向上倾斜,就称之为一种模式。对最小二乘直线,残差与 $y$ 的相关在构造上就是正的:这里 $\sqrt{1-r^2}=\sqrt{1-0.802}\approx0.445$。即使线性模型完全合适,这种倾斜也会出现。残差与 $x$ 以及与 $\hat{y}$ 的相关都是 $0$。

改正。把残差对 $x$ 或对 $\hat{y}$ 作图,并在那里判断是否弯曲或呈扇形。

Common mistakes常见错误
  • Computing predicted minus observed. This reverses the sign and the meaning (over/underprediction).
  • Saying a residual of $-6.6$ means the student is "6.6% below". Residuals are in the units of $y$, not percentages.
  • Concluding the model is good because the residuals sum to 0 (they always do).
  • Calling a residual plot "random" when it has an obvious curve, or "bad" because a single point is large.
  • Judging linearity from $r$ alone.
  • 算成预测值减观测值。这会使符号和含义(高估/低估)反过来。
  • 说残差 $-6.6$ 表示学生“低 6.6%”。残差的单位与 $y$ 相同,不是百分比。
  • 因残差和为 0 就认为模型好(残差和总是 0)。
  • 把有明显弯曲的残差图说成“随机”,或因某一个点较大就说“不好”。
  • 只凭 $r$ 判断线性。
Calculator steps计算器操作

TI-84 Plus

  1. After LinReg(a+bx) L1,L2,Y1 the calculator automatically stores the residuals in the list RESID.
  2. Set up a residual plot: 2nd Y= → Plot1 On, scatter type, Xlist = L1, Ylist = RESID (2nd STAT → NAMES → RESID). Turn Y1 off in Y=, then ZOOM → 9:ZoomStat.
  3. To see the numbers, paste RESID into a list (for example, in L3 type 2nd STAT → RESID). Set Ylist back to L2 for the original scatterplot.

TI-Nspire

  1. After a linear regression in Lists & Spreadsheet, the residuals are saved in a column named stat.resid (add the column reference in a new column header).
  2. In Data & Statistics, plot x on the horizontal axis and stat.resid on the vertical axis.
  3. Alternatively, plot the scatterplot, add the line with Menu → Analyze → Regression → Show Linear (mx+b), then Menu → Analyze → Residuals → Show Residual Plot.

TI-84 Plus

  1. 执行 LinReg(a+bx) L1,L2,Y1 后,计算器会自动把残差存入列表 RESID。
  2. 设置残差图:2nd Y= → Plot1 开启,散点类型,Xlist = L1,Ylist = RESID(2nd STAT → NAMES → RESID)。在 Y= 中关闭 Y1,然后 ZOOM → 9:ZoomStat。
  3. 要查看数值,把 RESID 粘贴到某个列表中(例如在 L3 中输入 2nd STAT → RESID)。要回到原散点图,把 Ylist 改回 L2。

TI-Nspire

  1. 在 Lists & Spreadsheet 中做线性回归后,残差保存在名为 stat.resid 的变量中(在新列的表头引用它即可)。
  2. 在 Data & Statistics 中,横轴放 x,纵轴放 stat.resid。
  3. 或者先作散点图,用 Menu → Analyze → Regression → Show Linear (mx+b) 添加直线,再用 Menu → Analyze → Residuals → Show Residual Plot。
Check your understanding自我检测
One observation has predicted value $\hat{y}=52$ g and residual $-7$ g. What is the observed value, and does the model over- or underpredict?某个观测的预测值为 $\hat{y}=52$ g,残差为 $-7$ g。观测值是多少?模型是高估还是低估?

Answer. Observed $=\hat{y}+e=52+(-7)=45$ g. The residual is negative, so the model overpredicts this observation.

答案。观测值 $=\hat{y}+e=52+(-7)=45$ g。残差为负,所以模型高估了这个观测。

A residual plot for a regression of fuel use on speed shows a clear U shape. Is a linear model appropriate? What would you do next?油耗对车速回归的残差图呈明显的 U 形。线性模型合适吗?接下来该怎么做?

Answer. No: the curved pattern shows the relationship is not linear even if $r$ is high. Consider a curved model or a transformation of a variable (Topic 3.6).

答案。不合适:弯曲模式说明关系不是线性的,即使 $r$ 很大。可以考虑曲线模型或对变量作变换(主题 3.6)。

For $\hat{y}=3+2x$, a point is $(4,13)$. Compute its residual and interpret it.对 $\hat{y}=3+2x$,某点为 $(4,13)$。计算它的残差并解释。

Answer. $\hat{y}=3+2(4)=11$, so $e=13-11=2$. The observed response is 2 units above the predicted value; the model underpredicts.

答案。$\hat{y}=3+2(4)=11$,所以 $e=13-11=2$。观测的响应值比预测值高 2 个单位,模型低估。

A student says "the residuals sum to zero, so the line is a perfect fit." Respond.一名学生说“残差之和为零,所以这条线是完美拟合。”请回应。

Answer. The residuals of a least-squares line always sum to zero because positive and negative errors cancel, whatever the quality of the fit. Judge the fit by the residual plot pattern and by $s$ and $r^2$.

答案。最小二乘线的残差之和总是零,因为正负误差相互抵消,与拟合好坏无关。应通过残差图模式以及 $s$ 与 $r^2$ 来判断拟合质量。

AP FRQ-style model response: Residual and residual plotAP 简答题示范答案:残差与残差图

Prompt. For the line $\hat{y}=51.21+3.69x$ (study hours $x$, score $y$), a student studied 2 hours and scored 52. (a) Calculate and interpret the residual. (b) The residual plot for all 10 students shows random scatter around 0 with no pattern. What does this say about the linear model?

What a complete answer statesModel wording
(a) Predicted value$\hat{y}=51.21+3.69(2)=58.59$ points.
(a) Residual with sign$e=52-58.59=-6.59$ points.
(a) Interpretation in contextThis student scored about 6.6 points below the score predicted for 2 hours of weekly study; the model overpredicts.
(b) Conclusion from the plotRandom scatter with no pattern indicates a linear model is appropriate for these data.

题目。对直线 $\hat{y}=51.21+3.69x$(学习小时 $x$,成绩 $y$),某学生学习 2 小时,得分 52。(a) 计算并解释残差。(b) 10 名学生的残差图围绕 0 随机散布,没有模式。这说明线性模型怎样?

完整答案要点示范表述
(a) 预测值$\hat{y}=51.21+3.69(2)=58.59$ 分。
(a) 带符号的残差$e=52-58.59=-6.59$ 分。
(a) 结合情境的解释这名学生的得分比每周学习 2 小时的预测成绩低约 6.6 分;模型高估了成绩。
(b) 由残差图得出结论随机散布、无模式说明线性模型适合这些数据。

Least-Squares Regression: Formulas and Output最小二乘回归:公式与输出

Learning objectives学习目标
  • Explain the least-squares criterion and state that the line passes through $(\bar{x},\bar{y})$.
  • Calculate the slope and intercept from $\bar{x},\bar{y},s_x,s_y$ and $r$.
  • Interpret $r^2$ and the standard deviation of the residuals $s$ in context.
  • Read the coefficients, $r^2$ and $s$ from calculator or computer regression output.
  • 解释最小二乘准则,并说明直线经过 $(\bar{x},\bar{y})$。
  • 由 $\bar{x},\bar{y},s_x,s_y$ 和 $r$ 计算斜率与截距。
  • 结合情境解释 $r^2$ 与残差标准差 $s$。
  • 从计算器或计算机的回归输出中读取系数、$r^2$ 和 $s$。

The least-squares regression line (LSRL) is the line $\hat{y}=a+bx$ that makes the sum of the squared residuals, $\sum(y-\hat{y})^2$, as small as possible. Squaring stops positive and negative residuals from cancelling and penalizes large errors heavily. Technology finds $a$ and $b$, but you must know the relationships among the summary statistics:

最小二乘回归线(LSRL)是使残差平方和 $\sum(y-\hat{y})^2$ 最小的直线 $\hat{y}=a+bx$。平方使正负残差不会相互抵消,并重罚大的误差。$a$ 和 $b$ 由技术手段求得,但你必须掌握汇总统计量之间的关系:

$$b=r\,\frac{s_y}{s_x}\qquad a=\bar{y}-b\,\bar{x}\qquad \text{the line passes through }(\bar{x},\bar{y})$$
4050607080901000246810Exam score (points)考试成绩(分)Weekly study time (hours)每周学习时间(小时)Mean point (4.3, 67.1)均值点 (4.3, 67.1)Rise = r s_y上升 = r s_yRun = s_x水平 = s_x
Figure 2.8. The least-squares line passes through the mean point. A run of one $s_x$ to the right raises the line by $r\,s_y$, which is why the slope is $b=r\,s_y/s_x$.图 2.8. 最小二乘线经过均值点。向右走一个 $s_x$,直线上升 $r\,s_y$,所以斜率 $b=r\,s_y/s_x$。
Quantity量Meaning含义Interpretation in context结合情境的解释
$b$Slope斜率Predicted change in $y$ for each one-unit increase in $x$$x$ 每增加一个单位,$y$ 的预测变化量
$a$Intercept截距Predicted $y$ when $x=0$ (may be meaningless)$x=0$ 时 $y$ 的预测值(可能无意义)
$r^2$Coefficient of determination决定系数The proportion of the variation in $y$ that is explained by its linear relationship with $x$$y$ 的变异中可由它与 $x$ 的线性关系解释的比例
$s$Standard deviation of the residuals残差标准差The typical size of the prediction error (distance between observed $y$ and $\hat{y}$), in units of $y$预测误差的典型大小(观测 $y$ 与 $\hat{y}$ 的差距),单位与 $y$ 相同
$$r^2=1-\frac{\sum(y-\hat{y})^2}{\sum(y-\bar{y})^2}\qquad s=\sqrt{\frac{\sum(y-\hat{y})^2}{n-2}}$$
Worked Example 2.15: Find the line from summary statistics例题 2.15:由汇总统计量求回归直线

For the 10 students of Table 2.2: $\bar{x}=4.3$ h, $s_x=2.312$ h, $\bar{y}=67.1$ points, $s_y=9.539$ points, $r=0.8954$.

  1. Slope: $b=r\,s_y/s_x=0.8954(9.539)/2.312=3.694$ points per hour.
  2. Intercept: $a=\bar{y}-b\bar{x}=67.1-3.694(4.3)=51.21$ points.
  3. Line: $\hat{y}=51.21+3.694x$.
  4. Check. At $x=\bar{x}=4.3$: $\hat{y}=51.214+3.694(4.3)=67.1=\bar{y}$, so the line passes through the mean point.

A line for the reverse prediction is different. Predicting $x$ from $y$ has slope $r\,s_x/s_y=0.217$, not $1/3.694=0.271$. Use the variable you want to predict as $y$.

对表 2.2 的 10 名学生:$\bar{x}=4.3$ 小时,$s_x=2.312$ 小时,$\bar{y}=67.1$ 分,$s_y=9.539$ 分,$r=0.8954$。

  1. 斜率:$b=r\,s_y/s_x=0.8954(9.539)/2.312=3.694$ 分/小时。
  2. 截距:$a=\bar{y}-b\bar{x}=67.1-3.694(4.3)=51.21$ 分。
  3. 直线:$\hat{y}=51.21+3.694x$。
  4. 检验。在 $x=\bar{x}=4.3$ 处:$\hat{y}=51.214+3.694(4.3)=67.1=\bar{y}$,所以直线经过均值点。

反向预测的直线并不相同。由 $y$ 预测 $x$ 的斜率是 $r\,s_x/s_y=0.217$,而不是 $1/3.694=0.271$。应把想要预测的变量作为 $y$。

Regression Equation
  Score = 51.214 + 3.6944 Hours

Predictor      Coef   SE Coef      T      P
Constant     51.214     3.136  16.33  0.000
Hours        3.6944    0.6497   5.69  0.000

S = 4.50566   R-Sq = 80.2%   R-Sq(adj) = 77.7%

Computer output 2.1. Regression of exam score on weekly study hours (the same data as Table 2.2).

计算机输出 2.1. 考试成绩对每周学习小时数的回归(与表 2.2 同一数据)。

Worked Example 2.16: Read computer regression output例题 2.16:读懂计算机回归输出

Use Computer output 2.1.

  1. Equation. $\hat{y}=51.214+3.6944x$. The intercept is the "Constant" coefficient and the slope is the coefficient on the explanatory variable (Hours).
  2. Slope. Each additional hour of weekly study is associated with a predicted increase of about 3.69 points in the exam score.
  3. $r^2$. R-Sq $=80.2\%$: about 80.2% of the variation in exam scores is explained by the linear relationship with weekly study time.
  4. $s$. $S=4.50566$: the typical difference between an actual exam score and the score predicted by the line is about 4.5 points.
  5. $r$. $r=\pm\sqrt{R\text{-}Sq}=\pm\sqrt{0.802}$; the slope is positive, so $r=+0.895$.
  6. Ignore for now: SE Coef, T, P and R-Sq(adj). They are used in the inference unit (below).

使用计算机输出 2.1。

  1. 方程。$\hat{y}=51.214+3.6944x$。截距是“Constant”的系数,斜率是解释变量(Hours)的系数。
  2. 斜率。每周学习时间每增加 1 小时,考试成绩的预测值约增加 3.69 分。
  3. $r^2$。R-Sq $=80.2\%$:考试成绩变异的约 80.2% 可由其与每周学习时间的线性关系解释。
  4. $s$。$S=4.50566$:实际考试成绩与直线预测成绩的典型差距约为 4.5 分。
  5. $r$。$r=\pm\sqrt{R\text{-}Sq}=\pm\sqrt{0.802}$;斜率为正,所以 $r=+0.895$。
  6. 暂时忽略:SE Coef、T、P 和 R-Sq(adj)。它们用于推断单元(见下)。
Worked Example 2.17: Where $r^2$ and $s$ come from例题 2.17:$r^2$ 与 $s$ 从何而来

For the same data, the sum of squared residuals is $\sum(y-\hat{y})^2=162.41$ and the total variation in $y$ is $\sum(y-\bar{y})^2=(n-1)s_y^2=9(9.539)^2=818.9$.

  1. $r^2=1-162.41/818.9=0.8017$, matching R-Sq $=80.2\%$.
  2. Using the line instead of $\bar{y}$ as the prediction removes 80.2% of the squared prediction error.
  3. $s=\sqrt{162.41/(10-2)}=\sqrt{20.30}=4.506$ points. The divisor is $n-2$ because two parameters ($a$ and $b$) were estimated from the data.
  4. Compare with $s_y=9.539$: knowing the study time reduces the typical prediction error from about 9.5 points to about 4.5 points.

对同一数据,残差平方和为 $\sum(y-\hat{y})^2=162.41$,$y$ 的总变异为 $\sum(y-\bar{y})^2=(n-1)s_y^2=9(9.539)^2=818.9$。

  1. $r^2=1-162.41/818.9=0.8017$,与 R-Sq $=80.2\%$ 一致。
  2. 用回归线代替 $\bar{y}$ 作预测,可消除 80.2% 的预测误差平方和。
  3. $s=\sqrt{162.41/(10-2)}=\sqrt{20.30}=4.506$ 分。除数是 $n-2$,因为数据估计了两个参数($a$ 和 $b$)。
  4. 与 $s_y=9.539$ 比较:知道学习时间后,典型预测误差由约 9.5 分降到约 4.5 分。

Try it. The cyclist regression runner lets you step through the same quantities ($b$, $a$, $r^2$, residuals) for a small data set.

动手试试。骑行者回归演示可让你对一个小数据集逐步查看同样的量($b$、$a$、$r^2$、残差)。

Preview: inference for the slope (a later unit)预告:斜率的推断(后续单元)

The line fitted to a sample estimates a population relationship. That is inference for the slope, in Unit 12: it uses a $t$ distribution with $n-2$ degrees of freedom and needs the conditions Linear, Independent, Normal residuals and Equal spread. For this unit, only read $a$, $b$, $r^2$ and $s$.

由样本拟合的直线估计的是总体关系。这就是斜率的推断,见第 12 单元:它使用自由度为 $n-2$ 的 $t$ 分布,并要求线性、独立、残差近似正态(Normal residuals)、残差离散程度相等。本单元只需读取 $a$、$b$、$r^2$ 和 $s$。

Also on the 2027 exam对应 2027 考试新增内容
The revised course says the simple linear regression model is fit by minimizing the sum of the squares of the residuals (the least-squares regression line), that this line passes through $(\bar{x},\bar{y})$, and that the slope, intercept and $r$ are calculated with technology. The coefficient of determination $r^2$ is "the proportion of variation in the response variable that is explained by the linear relationship with the explanatory variable". The coefficients $a$ and $b$ are statistics because they are based on a sample of values, and a y-intercept may lack a reasonable interpretation (for example, it may be a negative value of a quantity that cannot be negative).
修订课程指出:简单线性回归模型通过使残差平方和最小来拟合(最小二乘回归线);这条线经过 $(\bar{x},\bar{y})$;斜率、截距和 $r$ 用技术手段计算。决定系数 $r^2$ 是“响应变量的变异中可由与解释变量的线性关系解释的比例”。系数 $a$ 和 $b$ 是统计量,因为它们基于样本数据;$y$ 截距可能没有合理的解释(例如它可能是一个不可能为负的量的负值)。
AP exam tipAP 考试提示

Use this wording for $r^2$: "About 80.2% of the variation in exam scores is explained by the linear relationship with weekly study time." Do not say "80.2% of the points" or "80.2% of the students". For $s$, say "the typical (or average) distance between the actual and predicted score is about 4.5 points". On a computer-output question, name the row you used (Constant for $a$, the variable's row for $b$).

$r^2$ 的标准说法:“考试成绩变异的约 80.2% 可由其与每周学习时间的线性关系解释。”不要说“80.2% 的点”或“80.2% 的学生”。对 $s$ 要说“实际成绩与预测成绩之间的典型(平均)差距约为 4.5 分”。计算机输出题要指出你用的是哪一行(Constant 对应 $a$,变量所在行对应 $b$)。

Common Mistake: Dividing by $n-1$ when finding $s$常见错误:求 $s$ 时除以 $n-1$

For the study-time data the squared residuals sum to $162.41$. A student computes $\sqrt{162.41/9}=4.25$. The correct value is $\sqrt{162.41/8}=4.51$, the S in the computer output, because the line used two estimated parameters, $a$ and $b$, so the divisor is $n-2$. Do not confuse $s$ with $s_y=9.54$, which measures the spread of the scores around $\bar{y}$ and ignores study time.

Fix. Use $n-2$ for $s$, report it in the units of $y$, and compare it with $s_y$ to see how much knowing $x$ reduces the typical error.

对学习时间数据,残差平方和为 $162.41$。一名学生算出 $\sqrt{162.41/9}=4.25$。正确的值是 $\sqrt{162.41/8}=4.51$,即计算机输出中的 S,因为直线用了两个估计的参数 $a$ 和 $b$,所以除数是 $n-2$。不要把 $s$ 与 $s_y=9.54$ 混淆,后者衡量的是成绩围绕 $\bar{y}$ 的离散程度,没有考虑学习时间。

改正。求 $s$ 时除以 $n-2$,用 $y$ 的单位报告它,并与 $s_y$ 比较,看知道 $x$ 使典型误差减小了多少。

Common mistakes常见错误
  • Using $r^2$ as the correlation, or reporting $r$ with the wrong sign (take the sign of the slope).
  • Interpreting $r^2$ as "the percent of the data on the line" or "the percent of students who improve".
  • Interpreting $s$ as the standard deviation of $y$ (that is $s_y$).
  • Reading the "Constant" row as the slope in computer output.
  • Forgetting that predicting $x$ from $y$ needs a new regression, not just solving the original equation for $x$.
  • 把 $r^2$ 当作相关系数,或 $r$ 的符号写错(符号与斜率相同)。
  • 把 $r^2$ 解释成“落在直线上的数据百分比”或“成绩提高的学生百分比”。
  • 把 $s$ 解释成 $y$ 的标准差(那是 $s_y$)。
  • 读计算机输出时,把“Constant”行当作斜率。
  • 忘记由 $y$ 预测 $x$ 需要重新回归,而不是把原方程简单地解出 $x$。
Calculator steps计算器操作

TI-84 Plus

  1. STAT → CALC → 2:2-Var Stats with L1,L2 gives $\bar{x},s_x,\bar{y},s_y$ (use these with $r$ to check $b=rs_y/s_x$).
  2. STAT → CALC → 8:LinReg(a+bx) gives $a$, $b$, $r^2$ and $r$ (diagnostics on).
  3. To get $s$: STAT → TESTS → F:LinRegTTest, Xlist = L1, Ylist = L2, $\beta$ and $\rho$: $\neq0$, Calculate. The output includes $s=4.5057$. (Ignore $t$ and $p$ until the inference unit.)

TI-Nspire

  1. Menu → Statistics → Stat Calculations → One-Variable Statistics (or Two-Variable Statistics) for $\bar{x},s_x,\bar{y},s_y$.
  2. Menu → Statistics → Stat Calculations → Linear Regression (mx+b) for $m$ (slope), $b$ (intercept), $r^2$, $r$.
  3. For $s$, use Menu → Statistics → Stat Tests → Linear Regression t Test.

TI-84 Plus

  1. STAT → CALC → 2:2-Var Stats,输入 L1,L2,得到 $\bar{x},s_x,\bar{y},s_y$(可与 $r$ 一起检验 $b=rs_y/s_x$)。
  2. STAT → CALC → 8:LinReg(a+bx) 给出 $a$、$b$、$r^2$ 和 $r$(需开启诊断)。
  3. 求 $s$:STAT → TESTS → F:LinRegTTest,Xlist = L1,Ylist = L2,$\beta$ 与 $\rho$:$\neq0$,Calculate。输出中含 $s=4.5057$。(在学习推断单元之前忽略 $t$ 和 $p$。)

TI-Nspire

  1. Menu → Statistics → Stat Calculations → One-Variable Statistics(或 Two-Variable Statistics)得到 $\bar{x},s_x,\bar{y},s_y$。
  2. Menu → Statistics → Stat Calculations → Linear Regression (mx+b) 得到 $m$(斜率)、$b$(截距)、$r^2$、$r$。
  3. 求 $s$ 可用 Menu → Statistics → Stat Tests → Linear Regression t Test。
Check your understanding自我检测
For a data set, $\bar{x}=10$, $s_x=2$, $\bar{y}=50$, $s_y=8$ and $r=-0.75$. Find the least-squares line.某数据集的 $\bar{x}=10$,$s_x=2$,$\bar{y}=50$,$s_y=8$,$r=-0.75$。求最小二乘线。

Answer. $b=-0.75(8/2)=-3$; $a=50-(-3)(10)=80$. So $\hat{y}=80-3x$.

答案。$b=-0.75(8/2)=-3$;$a=50-(-3)(10)=80$。所以 $\hat{y}=80-3x$。

A regression of fuel efficiency on car weight has $r^2=0.64$ and a negative slope. Interpret $r^2$ and find $r$.油耗效率对汽车重量的回归中 $r^2=0.64$,斜率为负。解释 $r^2$ 并求 $r$。

Answer. About 64% of the variation in fuel efficiency is explained by its linear relationship with weight. $r=-\sqrt{0.64}=-0.80$ (negative, like the slope).

答案。油耗效率变异的约 64% 可由其与重量的线性关系解释。$r=-\sqrt{0.64}=-0.80$(与斜率同为负)。

The regression of a runner's 5 km time (minutes) on weekly distance gives $s=1.8$. Interpret $s$.跑者 5 km 用时(分钟)对每周训练距离的回归给出 $s=1.8$。解释 $s$。

Answer. The actual 5 km times typically differ from the times predicted by the line by about 1.8 minutes.

答案。实际 5 km 用时与直线预测用时的典型差距约为 1.8 分钟。

In regression output, the "Constant" coefficient is $-4.2$ and the "Age" coefficient is $0.85$. State the equation (response: Height) and the slope interpretation.回归输出中,“Constant”系数为 $-4.2$,“Age”系数为 $0.85$。写出方程(响应变量:Height)并解释斜率。

Answer. $\widehat{\text{Height}}=-4.2+0.85\,\text{Age}$. For each additional unit of age, the predicted height increases by about 0.85 units.

答案。$\widehat{\text{Height}}=-4.2+0.85\,\text{Age}$。年龄每增加一个单位,预测身高增加约 0.85 个单位。

AP FRQ-style model response: Regression outputAP 简答题示范答案:回归输出

Prompt. A regression of exam score on weekly study hours gives Constant $51.214$, Hours $3.6944$, $S=4.50566$, R-Sq $=80.2\%$. (a) Write the regression equation. (b) Interpret $R\text{-}Sq$. (c) Interpret $S$. (d) Find $r$.

What a complete answer statesModel wording
(a) Equation with variable names$\widehat{\text{score}}=51.214+3.6944(\text{hours})$.
(b) $r^2$ in contextAbout 80.2% of the variation in exam scores is explained by the linear relationship with weekly study time.
(c) $s$ in contextThe actual exam scores typically differ from the predicted scores by about 4.5 points.
(d) Correct value and sign$r=+\sqrt{0.802}=0.895$; positive because the slope is positive.

题目。考试成绩对每周学习小时数的回归给出 Constant $51.214$,Hours $3.6944$,$S=4.50566$,R-Sq $=80.2\%$。(a) 写出回归方程。(b) 解释 $R\text{-}Sq$。(c) 解释 $S$。(d) 求 $r$。

完整答案要点示范表述
(a) 含变量名的方程$\widehat{\text{score}}=51.214+3.6944(\text{hours})$。
(b) 结合情境的 $r^2$考试成绩变异的约 80.2% 可由其与每周学习时间的线性关系解释。
(c) 结合情境的 $s$实际考试成绩与预测成绩的典型差距约为 4.5 分。
(d) 正确的数值与符号$r=+\sqrt{0.802}=0.895$;因斜率为正,所以取正。
AP FRQ-style model response: Cyclist regressionAP 简答题示范答案:骑行者回归

Prompt. A convenience sample of six cyclists records weekly training $x$ (hours) and endurance $y$ (minutes): $(1,3)$, $(2,5)$, $(3,4)$, $(4,6)$, $(5,7)$, $(6,8)$. (a) Describe the scatterplot and decide whether a line is reasonable. (b) Find and interpret the least-squares line and $r^2$. (c) Predict endurance at $x=4$ and find the residual for the cyclist who trained 4 hours. (d) A coach says that assigning every cyclist 10 hours of training will cause the predicted endurance. Evaluate the claim.

PartModel response
(a) Scatterplot and conditionPlot hours on the horizontal axis and endurance minutes on the vertical axis, with units on both. The form is roughly linear, the direction positive and the association strong. The residuals $-0.143$, $0.914$, $-1.029$, $0.029$, $0.086$, $0.143$ have both signs and no curved pattern, so a line is a reasonable description for these six cyclists between 1 and 6 hours (six points is limited evidence).
(b) Line and $r^2$$\bar{x}=3.5$, $\bar{y}=5.5$, $S_{xy}=16.5$, $S_{xx}=17.5$, so $b=16.5/17.5=0.9429$ and $a=5.5-0.9429(3.5)=2.2$. The line is $\widehat{\text{endurance}}=2.2+0.9429(\text{hours})$. Each additional weekly training hour is associated with about $0.943$ more predicted endurance minutes. Since $r=0.9429$, $r^2=0.889$: about $88.9\%$ of the variation in endurance among these cyclists is explained by its linear relationship with weekly training hours.
(c) Prediction and residual$\hat{y}=2.2+0.9429(4)=5.971$ minutes. The observed value is $6$, so the residual is $6-5.971=0.029$ minutes: the line underpredicts slightly for this cyclist.
(d) Causal claimTen hours is outside the observed $1$ to $6$ hours, so the prediction is extrapolation and the trend need not continue. The sample is a convenience observational sample: without random assignment it cannot support a cause-and-effect claim, and without random selection it cannot be generalized to all cyclists.

题目。六名骑行者的便利样本记录每周训练时间 $x$(小时)与耐力 $y$(分钟):$(1,3)$,$(2,5)$,$(3,4)$,$(4,6)$,$(5,7)$,$(6,8)$。(a) 描述散点图并判断直线是否合理。(b) 求最小二乘线与 $r^2$ 并解释。(c) 预测 $x=4$ 时的耐力,并求训练 4 小时那名骑行者的残差。(d) 教练称给每名骑行者安排 10 小时训练就会造成预测的耐力。评价这一主张。

部分示范答案
(a) 散点图与条件横轴为训练小时,纵轴为耐力分钟,两轴标明单位。形态大致呈线性,方向为正,关联较强。残差 $-0.143$,$0.914$,$-1.029$,$0.029$,$0.086$,$0.143$ 有正有负且无弯曲模式,因此对这六名骑行者在 1 至 6 小时之间,用直线描述是合理的(六个点提供的证据有限)。
(b) 回归线与 $r^2$$\bar{x}=3.5$,$\bar{y}=5.5$,$S_{xy}=16.5$,$S_{xx}=17.5$,所以 $b=16.5/17.5=0.9429$,$a=5.5-0.9429(3.5)=2.2$。回归线为 $\widehat{\text{endurance}}=2.2+0.9429(\text{hours})$。每周训练每多一小时,预测耐力约多 $0.943$ 分钟。因为 $r=0.9429$,所以 $r^2=0.889$:这些骑行者耐力变异的约 $88.9\%$ 可由其与每周训练小时数的线性关系解释。
(c) 预测与残差$\hat{y}=2.2+0.9429(4)=5.971$ 分钟。实际值为 $6$,残差为 $6-5.971=0.029$ 分钟:回归线对这名骑行者略有低估。
(d) 因果主张10 小时超出观测的 $1$ 至 $6$ 小时,因此该预测是外推,趋势未必延续。样本是便利观察样本:没有随机分配,不能支持因果结论;没有随机抽样,不能推广到所有骑行者。
AP FRQ-style model response: Changing unitsAP 简答题示范答案:单位变换

Prompt. A fitted line for nonconstant $x$ and $y$ is $\hat{y}=a+bx$ with $b\neq0$. Define $u=kx+h$ and $v=my+d$ with $k<0$ and $m>0$. A classmate claims the slope and $r$ are both unchanged because "units never matter". (a) Find the fitted line for predicting $v$ from $u$. (b) Find $r$ and $r^2$ for the new variables and evaluate the claim. (c) For $a=10$, $b=2$, $k=-2$, $h=6$, $m=3$, $d=1$, predict $v$ at $u=2$ and confirm with the original line. (d) Does changing units remove extrapolation or turn a descriptive relationship into a causal one?

PartModel response
(a) New lineSubstitute $x=(u-h)/k$ into $\hat{v}=m(a+bx)+d$. This gives $\hat{v}=\left(ma+d-\dfrac{mbh}{k}\right)+\dfrac{mb}{k}\,u$, so the new slope is $mb/k$ and the new intercept is $ma+d-mbh/k$.
(b) $r$, $r^2$ and the claimBecause $k<0$ and $m>0$, the direction of the association reverses, so the new correlation is $-r$ while its size is unchanged and $r^2$ is unchanged. The slope becomes $mb/k$, which has the opposite sign of $b$ and a different size in general. The claim is false: $r$ changes sign and the slope changes.
(c) Numerical checkSlope $=3(2)/(-2)=-3$; intercept $=3(10)+1-3(2)(6)/(-2)=31+18=49$. So $\hat{v}=49-3u$, and at $u=2$ it gives $43$. Check: $x=(2-6)/(-2)=2$, $\hat{y}=10+2(2)=14$, and $3(14)+1=43$.
(d) Extrapolation and causeThe observed $x$ values are transformed along with the axis, so a point outside the data range is still outside it after the change of units. Changing units does not change how the data were collected, so confounding and the limits on cause and effect remain.

题目。对非恒定的 $x$ 与 $y$,拟合直线为 $\hat{y}=a+bx$,其中 $b\neq0$。定义 $u=kx+h$,$v=my+d$,其中 $k<0$,$m>0$。一位同学称斜率与 $r$ 都不变,因为“单位从不影响结果”。(a) 求由 $u$ 预测 $v$ 的拟合直线。(b) 求新变量的 $r$ 与 $r^2$ 并评价该说法。(c) 取 $a=10$,$b=2$,$k=-2$,$h=6$,$m=3$,$d=1$,预测 $u=2$ 时的 $v$,并用原直线核对。(d) 改变单位能否消除外推,或把描述性关系变成因果关系?

部分示范答案
(a) 新直线把 $x=(u-h)/k$ 代入 $\hat{v}=m(a+bx)+d$,得 $\hat{v}=\left(ma+d-\dfrac{mbh}{k}\right)+\dfrac{mb}{k}\,u$,所以新斜率为 $mb/k$,新截距为 $ma+d-mbh/k$。
(b) $r$、$r^2$ 与该说法因为 $k<0$ 且 $m>0$,关联方向反转,所以新相关系数为 $-r$,大小不变,$r^2$ 也不变。斜率变为 $mb/k$,与 $b$ 符号相反,且一般大小也不同。该说法错误:$r$ 变号,斜率也改变。
(c) 数值核对斜率 $=3(2)/(-2)=-3$;截距 $=3(10)+1-3(2)(6)/(-2)=31+18=49$。所以 $\hat{v}=49-3u$,$u=2$ 时得 $43$。核对:$x=(2-6)/(-2)=2$,$\hat{y}=10+2(2)=14$,且 $3(14)+1=43$。
(d) 外推与因果观测的 $x$ 值随坐标轴一起变换,所以数据范围之外的点在换单位后仍在范围之外。改变单位不会改变数据的收集方式,因此混杂以及对因果结论的限制依然存在。

Departures from Linearity: Unusual Points and Transformations偏离线性:异常点与变换

Learning objectives学习目标
  • Distinguish an outlier, a high-leverage point and an influential point in a regression context.
  • Describe how each kind of point affects $r$, the slope, the intercept and $s$.
  • Recognize nonlinear patterns and choose a transformation (logarithm of $y$, or of both variables) to achieve linearity.
  • Fit, interpret and back-transform a model on transformed data.
  • 在回归情境中区分离群点、高杠杆点和强影响点。
  • 说明每类点如何影响 $r$、斜率、截距和 $s$。
  • 识别非线性模式,并选择变换(对 $y$ 或对两个变量取对数)使其线性化。
  • 对变换后的数据拟合、解释并反变换模型。
Term术语Definition定义Typical effect典型影响
Outlier (in regression)离群点(回归中)A point with a large residual: far above or below the pattern残差很大的点:远在模式之上或之下Lowers $r$ and $r^2$, raises $s$; changes the intercept more than the slope when $x$ is near $\bar{x}$降低 $r$ 与 $r^2$,增大 $s$;当 $x$ 靠近 $\bar{x}$ 时,对截距的影响大于对斜率
High-leverage point高杠杆点A point with an $x$-value far from the other $x$-values$x$ 值远离其他 $x$ 值的点Has the potential to move the line a lot; if it follows the trend it changes little, but raises $r$有可能使直线大幅移动;若沿趋势则变化很小,但会使 $r$ 变大
Influential point强影响点A point whose removal would substantially change the slope, intercept or $r$删除后会明显改变斜率、截距或 $r$ 的点Usually has high leverage and lies off the trend: pulls the line toward itself通常杠杆高且偏离趋势:把直线拉向自己
406080100120024681012141618Exam score (points)考试成绩(分)Weekly study time (hours)每周学习时间(小时)A: vertical outlierA:竖直方向离群点B: high leverage, on trendB:高杠杆,沿趋势C: high leverage, off trendC:高杠杆,偏离趋势Solid: original line. Dashed: line after adding A or C.实线:原直线。虚线:加入 A 或 C 之后的直线。
Figure 2.9. Original data (blue points, solid line) plus three possible extra points. Point C, far to the right and far below the trend, pulls the line down sharply (influential). Point A raises the line a little but barely changes the slope. Point B, on the trend, leaves the line almost unchanged.图 2.9. 原数据(蓝点、实线)加上三个可能的新增点。点 C 远在右侧且远低于趋势,使直线大幅下拉(强影响点);点 A 使直线略微上移,但斜率几乎不变;点 B 在趋势上,直线几乎不变。
Data set (Table 2.2 plus a point)数据集(表 2.2 加一个点)$r$$r^2$Slope $b$斜率 $b$Intercept $a$截距 $a$$s$
Original 10 students原来的 10 名学生0.8950.8023.69451.214.51
A: add (4, 95), outlierA:加入 (4, 95),离群点0.6270.3933.53054.5510.14
B: add (16, 110), leverage, on trendB:加入 (16, 110),高杠杆,沿趋势0.9670.9353.67451.294.25
C: add (16, 60), leverage, off trendC:加入 (16, 60),高杠杆,偏离趋势0.2650.0700.59263.289.45

Table 2.4. The effect of one added point on the least-squares line for the study-time data (computed with technology).

表 2.4. 增加一个点对学习时间数据最小二乘线的影响(用技术手段计算)。

Worked Example 2.18: Classify unusual points and predict their effect例题 2.18:分类异常点并预测其影响

The original data have $\bar{x}=4.3$ hours and $x$ from 1 to 8. Consider three possible additional students (Table 2.4 and Figure 2.9).

  1. A (4, 95). $x=4$ is near $\bar{x}$, so leverage is low. The line predicts about $66.0$ at $x=4$, so the residual is about $+29$: a large vertical outlier. It pulls the line up slightly (the intercept rises from 51.2 to 54.6) but the slope hardly changes (3.69 to 3.53). It cuts $r$ from 0.90 to 0.63 and doubles $s$ (4.5 to 10.1). It is an outlier but not influential for the slope.
  2. B (16, 110). $x=16$ is far beyond the other $x$-values (high leverage). But $\hat{y}=110.3$ at $x=16$, so the point lies almost exactly on the trend. The line is nearly unchanged (slope 3.69 to 3.67) while $r$ rises from 0.90 to 0.97 because the data now span a wider range along the line. High leverage, not influential.
  3. C (16, 60). High leverage and far below the trend. The slope collapses from 3.69 to 0.59, the intercept rises from 51.2 to 63.3 and $r$ falls from 0.90 to 0.26. This is an influential point: removing it would change the model substantially.
  4. What to do. Investigate the point (recording error? a different kind of student?). Do not delete it just because it does not fit. If it is genuine, report the analysis both with and without it and describe how the conclusions differ.

原数据 $\bar{x}=4.3$ 小时,$x$ 的范围是 1 至 8。考虑三名可能新增的学生(表 2.4 与图 2.9)。

  1. A (4, 95)。$x=4$ 靠近 $\bar{x}$,杠杆小。直线在 $x=4$ 处预测约 $66.0$,残差约为 $+29$:竖直方向上的大离群点。它使直线略微上移(截距由 51.2 升至 54.6),但斜率几乎不变(3.69 变为 3.53)。它使 $r$ 由 0.90 降到 0.63,并使 $s$ 翻倍(4.5 变为 10.1)。它是离群点,但对斜率不构成强影响。
  2. B (16, 110)。$x=16$ 远超其他 $x$ 值(高杠杆)。但 $x=16$ 处 $\hat{y}=110.3$,该点几乎恰好落在趋势上。直线几乎不变(斜率 3.69 变为 3.67),而 $r$ 由 0.90 升到 0.97,因为数据沿直线的分布范围变宽了。高杠杆,但不是强影响点。
  3. C (16, 60)。高杠杆,并且远低于趋势。斜率由 3.69 骤降到 0.59,截距由 51.2 升到 63.3,$r$ 由 0.90 降到 0.26。这是强影响点:删除它会使模型发生显著变化。
  4. 如何处理。先调查该点(录入错误?属于不同类型的学生?)。不要仅因为不符合就删除。如果它是真实数据,应同时报告含与不含该点的分析,并说明结论有何不同。

Try it. Open the LSRL outlier manipulator. Drag a point or add a new one, near the middle of the $x$-values and then far to the right, and watch $r$, the slope, the intercept and $r^2$ change. Predict the change before you move each point.

动手试试。打开最小二乘回归线离群点操作器。拖动一个点或新增一个点,先放在 $x$ 值的中间,再放到最右边,观察 $r$、斜率、截距和 $r^2$ 如何变化。移动每个点之前先预测变化。

Transformations to achieve linearity用变换使数据线性化

If the scatterplot is curved and the residual plot of a straight-line fit is curved, transform a variable so the pattern becomes straight, fit a line to the transformed data, and check the new residual plot.

  • Exponential model $y=a\,b^{x}$ (growth or decay by a constant factor): $\ln y$ against $x$ is linear. Fit $\widehat{\ln y}=a^*+b^*x$, then $\hat{y}=e^{a^*}\left(e^{b^*}\right)^x$.
  • Power model $y=a\,x^{p}$: $\ln y$ against $\ln x$ is linear. Fit $\widehat{\ln y}=a^*+p\ln x$, then $\hat{y}=e^{a^*}x^{p}$.

Common logarithms (base 10) work the same way. The linear model is chosen because its residual plot has no pattern, not because $r$ is large.

若散点图弯曲,且直线拟合的残差图也弯曲,就对某个变量作变换使模式变直,对变换后的数据拟合直线,并检查新的残差图。

  • 指数模型 $y=a\,b^{x}$(按恒定倍数增长或衰减):$\ln y$ 对 $x$ 呈线性。拟合 $\widehat{\ln y}=a^*+b^*x$,再得 $\hat{y}=e^{a^*}\left(e^{b^*}\right)^x$。
  • 幂函数模型 $y=a\,x^{p}$:$\ln y$ 对 $\ln x$ 呈线性。拟合 $\widehat{\ln y}=a^*+p\ln x$,再得 $\hat{y}=e^{a^*}x^{p}$。

常用对数(以 10 为底)用法相同。选择线性模型的依据是残差图没有模式,而不是 $r$ 很大。

Cells (count) vs hours: curved细胞数对时间:弯曲Hours, t时间 t(小时)ln(cells) vs hours: linearln(细胞数)对时间:线性Hours, t时间 t(小时)
Figure 2.10. Left: the bacteria counts curve upward and a straight line (dashed) fits badly. Right: after taking natural logarithms of the counts, the points follow a straight line, so an exponential model is appropriate.图 2.10. 左:细菌数量向上弯曲,直线(虚线)拟合很差。右:对数量取自然对数后,点落在一条直线上,所以指数模型合适。
Worked Example 2.19: An exponential pattern: take the logarithm of y例题 2.19:指数模式:对 $y$ 取对数

The bacteria data of Example 2.14: counts 105, 148, 230, 335, 520, 745, 1150, 1690 at hours 1 to 8. The straight-line fit had a U-shaped residual plot.

  1. Compute $\ln y$: 4.654, 4.997, 5.438, 5.814, 6.254, 6.613, 7.048, 7.432.
  2. Regress $\ln y$ on $t$: $\widehat{\ln y}=4.228+0.4008\,t$, with $r^2=0.9995$. The residuals are $0.025,\allowbreak\ −0.032,\allowbreak\ 0.008,\allowbreak\ −0.017,\allowbreak\ 0.022,\allowbreak\ −0.019,\allowbreak\ 0.014,\allowbreak\ −0.002$ (small, with signs alternating at random and no curvature), so the transformed model is appropriate.
  3. Back-transform. $\hat{y}=e^{4.228}\left(e^{0.4008}\right)^{t}\approx68.56\,(1.493)^{t}$.
  4. Interpretation. Each additional hour multiplies the predicted number of cells by about $1.493$, an increase of about 49% per hour.
  5. Prediction at $t=6$. $\widehat{\ln y}=4.228+0.4008(6)=6.633$, so $\hat{y}=e^{6.633}\approx759$ cells (observed 745). Predicting at $t=9$ would be an extrapolation.

例题 2.14 的细菌数据:第 1 至 8 小时的数量为 105, 148, 230, 335, 520, 745, 1150, 1690。直线拟合的残差图呈 U 形。

  1. 计算 $\ln y$:4.654, 4.997, 5.438, 5.814, 6.254, 6.613, 7.048, 7.432。
  2. 用 $t$ 对 $\ln y$ 回归:$\widehat{\ln y}=4.228+0.4008\,t$,$r^2=0.9995$。残差为 $0.025,\allowbreak\ −0.032,\allowbreak\ 0.008,\allowbreak\ −0.017,\allowbreak\ 0.022,\allowbreak\ −0.019,\allowbreak\ 0.014,\allowbreak\ −0.002$(很小,符号随机交替,无弯曲),所以变换后的模型合适。
  3. 反变换。$\hat{y}=e^{4.228}\left(e^{0.4008}\right)^{t}\approx68.56\,(1.493)^{t}$。
  4. 解释。每多一小时,预测细胞数乘以约 $1.493$,即每小时增加约 49%。
  5. $t=6$ 时的预测。$\widehat{\ln y}=4.228+0.4008(6)=6.633$,所以 $\hat{y}=e^{6.633}\approx759$ 个细胞(观测值 745)。预测 $t=9$ 则是外推。
Worked Example 2.20: A power pattern: take logarithms of both variables例题 2.20:幂函数模式:对两个变量都取对数

Illustrative data. A pendulum's period $T$ (seconds) is timed for lengths $L$ (meters): $L$ = 0.2, 0.4, 0.6, 0.8, 1.0, 1.5 and $T$ = 0.90, 1.27, 1.55, 1.79, 2.01, 2.46. A straight-line fit of $T$ on $L$ has $r^2=0.979$ but its residuals ($−0.116,\ 0.019,\ 0.063,\ 0.068,\ 0.052,\ −0.086$) show a curved pattern.

  1. Take $\ln$ of both variables and regress $\ln T$ on $\ln L$: $\widehat{\ln T}=0.696+0.499\ln L$ with $r^2=1.0000$ and tiny, patternless residuals.
  2. Back-transform. $\hat{T}=e^{0.696}L^{0.499}\approx2.006\,L^{0.499}$: a power model with exponent very close to $0.5$ ($T\propto\sqrt{L}$, as physics predicts).
  3. Prediction. For $L=1.2$ m: $\hat{T}=2.006(1.2)^{0.499}\approx2.20$ s. This is an interpolation (0.2 to 1.5 m).

示例数据。测量不同摆长 $L$(米)下单摆的周期 $T$(秒):$L$ = 0.2, 0.4, 0.6, 0.8, 1.0, 1.5,$T$ = 0.90, 1.27, 1.55, 1.79, 2.01, 2.46。用 $L$ 对 $T$ 作直线拟合,$r^2=0.979$,但残差($−0.116,\ 0.019,\ 0.063,\ 0.068,\ 0.052,\ −0.086$)呈弯曲模式。

  1. 对两个变量都取 $\ln$,用 $\ln L$ 对 $\ln T$ 回归:$\widehat{\ln T}=0.696+0.499\ln L$,$r^2=1.0000$,残差极小且无规律。
  2. 反变换。$\hat{T}=e^{0.696}L^{0.499}\approx2.006\,L^{0.499}$:指数非常接近 $0.5$ 的幂函数模型($T\propto\sqrt{L}$,与物理规律一致)。
  3. 预测。$L=1.2$ m 时:$\hat{T}=2.006(1.2)^{0.499}\approx2.20$ s。这是内插(0.2 至 1.5 m)。
Also on the 2027 exam对应 2027 考试新增内容
The revised course keeps the same reasoning about form: an unusual feature of a scatterplot includes clusters of points or points that do not fit the general pattern, and curvature in a residual plot suggests that the linear model is not the most appropriate model. The regression unit of the revised course framework has five topics: scatterplots, correlation, linear models, residuals and least-squares regression. A skill that runs through all of them, and through this topic, is judging, from the scatterplot and the residual plot, whether a line is appropriate and noticing unusual points.
修订课程保持同样的关于“形式”的推理:散点图的异常特征包括聚类和不符合总体模式的点,而残差图中的弯曲说明线性模型不是最合适的模型。修订课程框架的回归单元有五个主题:散点图、相关、线性模型、残差和最小二乘回归。贯穿这些主题,也贯穿本主题的一项技能是:根据散点图和残差图判断直线是否合适,并留意异常点。
AP exam tipAP 考试提示

For an unusual point, name the type and describe the effect with numbers or direction: "This point has high leverage (its $x$ is far from the others) and lies far below the pattern, so it is influential: it pulls the slope down and lowers $r$." Never recommend simply deleting a point; say to investigate it and compare the line with and without it. When you transform, justify the choice with the residual plot.

谈到异常点时,要指明类型并用数值或方向说明影响:“该点杠杆高($x$ 远离其他点)且远低于整体模式,所以是强影响点:它把斜率拉低并降低 $r$。”不要简单地建议删除;应说明先调查,并比较含与不含该点的直线。作变换时,要用残差图说明选择的理由。

Common Mistake: Forgetting to back-transform常见错误:忘记还原变换

For the bacteria model $\widehat{\ln y}=4.228+0.4008\,t$, a student predicts at $t=6$ and reports "6.6 cells", then says the count grows by 0.4008 cells per hour. The value $6.633$ is the logarithm of the count, not the count (observed 745). Back-transform: $e^{6.633}\approx759$ cells. The slope $0.4008$ is also on the log scale: each hour multiplies the predicted count by $e^{0.4008}\approx1.493$.

Fix. Predict on the log scale, undo it with $e^{(\cdot)}$, then interpret the slope as a multiplying factor.

对细菌模型 $\widehat{\ln y}=4.228+0.4008\,t$,一名学生在 $t=6$ 处预测并报告“6.6 个细胞”,又说每小时增加 0.4008 个细胞。$6.633$ 是计数的对数,不是计数本身(观测值为 745)。还原:$e^{6.633}\approx759$ 个细胞。斜率 $0.4008$ 也在对数尺度上:每过一小时,预测计数乘以 $e^{0.4008}\approx1.493$。

改正。先在对数尺度上预测,用 $e^{(\cdot)}$ 还原,再把斜率解释为乘法因子。

Common mistakes常见错误
  • Saying every outlier is influential, or every high-leverage point changes the line. A high-leverage point on the trend changes it little.
  • Deleting a point only because it is an outlier, with no investigation.
  • Choosing a transformation because $r$ is larger, with no residual plot.
  • Forgetting to back-transform: $\ln\hat{y}=7.8$ is not a predicted count.
  • Interpreting the slope of a $\ln y$ model as an additive change in $y$. It is a multiplicative change: $y$ is multiplied by $e^{b^*}$.
  • 说每个离群点都是强影响点,或每个高杠杆点都会改变直线。位于趋势上的高杠杆点对直线影响很小。
  • 仅仅因为是离群点就删除,不作调查。
  • 因为 $r$ 更大就选择某个变换,却不看残差图。
  • 忘记反变换:$\ln\hat{y}=7.8$ 不是预测的数量。
  • 把 $\ln y$ 模型的斜率解释成 $y$ 的加性变化。它是乘性变化:$y$ 乘以 $e^{b^*}$。
Calculator steps计算器操作

TI-84 Plus

  1. Transform: move the cursor to the L3 header, type ln( using the LN key, then L2) and ENTER (use LN, not LOG, for natural logs).
  2. Regress: STAT → CALC → 8:LinReg(a+bx) with L1,L3. Residual plot: Plot1 with Xlist = L1, Ylist = RESID.
  3. Shortcuts: STAT → CALC → 0:ExpReg gives $y=a\cdot b^x$ directly ($a=68.56$, $b=1.493$); A:PwrReg gives $y=a\cdot x^b$. Still check a residual plot of the transformed fit.
  4. Add a point to test leverage: add a row to L1 and L2, rerun LinReg, and compare $r$, $a$, $b$.

TI-Nspire

  1. Name a new column lny and enter =ln(b[]) (or =ln(y) with the column reference). Then run Linear Regression (mx+b) on x and lny.
  2. Or use Menu → Statistics → Stat Calculations → Exponential Regression, or Power Regression, directly on the original data.
  3. Residual plot: in Data & Statistics use Menu → Analyze → Residuals → Show Residual Plot after adding the regression.

TI-84 Plus

  1. 变换:在 L3 的表头输入 ln(L2) 并按 ENTER(自然对数用 LN 键,不是 LOG)。
  2. 回归:STAT → CALC → 8:LinReg(a+bx),输入 L1,L3。残差图:Plot1 的 Xlist = L1,Ylist = RESID。
  3. 快捷方式:STAT → CALC → 0:ExpReg 直接给出 $y=a\cdot b^x$($a=68.56$,$b=1.493$);A:PwrReg 给出 $y=a\cdot x^b$。仍须检查变换后拟合的残差图。
  4. 检验杠杆:在 L1、L2 中添加一行,重新运行 LinReg,比较 $r$、$a$、$b$。

TI-Nspire

  1. 新建一列 lny,输入 =ln(b[])(或带列引用的 =ln(y))。然后对 x 和 lny 做 Linear Regression (mx+b)。
  2. 也可直接对原始数据使用 Menu → Statistics → Stat Calculations → Exponential Regression 或 Power Regression。
  3. 残差图:在 Data & Statistics 中添加回归后,用 Menu → Analyze → Residuals → Show Residual Plot。
Check your understanding自我检测
A scatterplot has most points with $x$ between 2 and 10 and one point at $x=40$ that lies right on the line suggested by the others. Classify the point and state its effect on $r$ and the slope.某散点图中大多数点的 $x$ 在 2 至 10 之间,另有一点在 $x=40$,恰好落在其他点所呈直线上。对该点分类,并说明它对 $r$ 和斜率的影响。

Answer. It is a high-leverage point (extreme $x$) that follows the trend, so it is not influential: the slope barely changes and $r$ increases slightly.

答案。它是高杠杆点($x$ 极端),但沿着趋势,所以不是强影响点:斜率几乎不变,$r$ 略有增大。

A residual plot from a straight-line fit shows a U shape, and a plot of $\ln y$ versus $x$ looks linear. Describe the model you would fit.直线拟合的残差图呈 U 形,而 $\ln y$ 对 $x$ 的图看起来是线性的。描述你会拟合的模型。

Answer. An exponential model: fit $\widehat{\ln y}=a^*+b^*x$, check that its residual plot has no pattern, then back-transform to $\hat{y}=e^{a^*}(e^{b^*})^x$.

答案。指数模型:拟合 $\widehat{\ln y}=a^*+b^*x$,检查其残差图无模式,再反变换为 $\hat{y}=e^{a^*}(e^{b^*})^x$。

A model $\widehat{\ln y}=1.5+0.2x$ is fitted. Interpret the slope in terms of $y$.拟合模型 $\widehat{\ln y}=1.5+0.2x$。用 $y$ 来解释斜率。

Answer. $e^{0.2}=1.221$. Each one-unit increase in $x$ multiplies the predicted $y$ by about 1.22, an increase of about 22%.

答案。$e^{0.2}=1.221$。$x$ 每增加一个单位,预测的 $y$ 乘以约 1.22,即增加约 22%。

An analyst finds a point with the largest residual in a data set and wants to delete it to improve $r$. Respond.分析者发现某数据集中残差最大的点,想删除它以提高 $r$。请回应。

Answer. Do not delete it just to improve $r$. Check for a recording error or a special circumstance, report the analysis with and without the point, and explain how $r$, the slope and the intercept change.

答案。不能仅为提高 $r$ 就删除。要检查是否录入错误或有特殊情况,报告含与不含该点的分析,并说明 $r$、斜率和截距如何变化。

AP FRQ-style model response: Unusual points and transformationsAP 简答题示范答案:异常点与变换

Prompt. A point with $x$ far greater than every other $x$ and far below the trend is added to a data set. (a) Name the type of point. (b) Describe the effect on the slope, $r$ and the intercept. (c) A residual plot for a different data set is U-shaped and $\ln y$ against $x$ is linear. What should the analyst do?

What a complete answer statesModel wording
(a) Correct classification with reasonIt is a high-leverage point (its $x$ is extreme) that is far from the pattern, so it is influential.
(b) Effect on slope, $r$, interceptIt pulls the line toward itself: the slope becomes less steep (or reverses), $|r|$ decreases, and the intercept rises.
(c) Transformation justified by residual plotThe U-shaped residual plot shows a straight line is inappropriate. Because $\ln y$ versus $x$ is linear, fit $\widehat{\ln y}=a^*+b^*x$, confirm its residual plot has no pattern, and back-transform to an exponential model for predictions.

题目。向某数据集添加一个点,其 $x$ 远大于所有其他 $x$,且远低于趋势。(a) 说出该点的类型。(b) 描述它对斜率、$r$ 和截距的影响。(c) 另一数据集的残差图呈 U 形,而 $\ln y$ 对 $x$ 是线性的。分析者应怎么做?

完整答案要点示范表述
(a) 正确分类并说明理由它是高杠杆点($x$ 极端)且远离整体模式,所以是强影响点。
(b) 对斜率、$r$、截距的影响它把直线拉向自己:斜率变平缓(或反号),$|r|$ 减小,截距升高。
(c) 由残差图说明变换的理由U 形残差图说明直线不合适。因为 $\ln y$ 对 $x$ 是线性的,应拟合 $\widehat{\ln y}=a^*+b^*x$,确认其残差图无模式,并反变换为指数模型用于预测。

Exam Toolkit for Unit 3单元 3 考试工具

Formulas and facts公式与要点
  • Interpret $r^2$ in context: about $100r^2$ percent of the variation in $y$ is explained by the linear relationship with $x$.
  • $r=\frac{1}{n-1}\sum z_xz_y$, $-1\le r\le1$, unit-free, symmetric, not resistant.
  • $\hat{y}=a+bx$; $b=r\,s_y/s_x$; $a=\bar{y}-b\bar{x}$; the line passes through $(\bar{x},\bar{y})$.
  • Residual $=y-\hat{y}$ (observed minus predicted); the residuals sum to 0.
  • $r^2=1-\sum(y-\hat{y})^2/\sum(y-\bar{y})^2$; $s=\sqrt{\sum(y-\hat{y})^2/(n-2)}$.
  • Exponential: $\ln y$ vs $x$ linear. Power: $\ln y$ vs $\ln x$ linear.
  • 结合情境解释 $r^2$:$y$ 的变异中约有 $100r^2$ 的百分比可由其与 $x$ 的线性关系解释。
  • $r=\frac{1}{n-1}\sum z_xz_y$,$-1\le r\le1$,无单位,对称,不具抗性。
  • $\hat{y}=a+bx$;$b=r\,s_y/s_x$;$a=\bar{y}-b\bar{x}$;直线经过 $(\bar{x},\bar{y})$。
  • 残差 $=y-\hat{y}$(观测减预测);残差之和为 0。
  • $r^2=1-\sum(y-\hat{y})^2/\sum(y-\bar{y})^2$;$s=\sqrt{\sum(y-\hat{y})^2/(n-2)}$。
  • 指数:$\ln y$ 对 $x$ 线性。幂函数:$\ln y$ 对 $\ln x$ 线性。
FRQ checklist: four things a complete answer includes简答题清单:完整答案包含的四件事
  1. Context: name the variables with units and the individuals.
  2. Conditions or evidence: cite the scatterplot form, the residual plot pattern, or the conditional percentages.
  3. Correct method and numbers: show the substitution and the units.
  4. Conclusion in context: use "tends to", "predicted", "associated"; never claim causation from an observational study.
  1. 情境:写明变量及单位和个体。
  2. 条件或依据:引用散点图的形式、残差图模式或条件百分比。
  3. 方法与数值正确:写出代入过程和单位。
  4. 结合情境的结论:使用“倾向于”“预测”“关联”;观察研究绝不断言因果。
Error错误Correction修正
Treating the intercept as always meaningful总把截距当作有意义The intercept $a$ is the predicted $y$ when $x=0$; interpret it only if $x=0$ is within or near the data.截距 $a$ 是 $x=0$ 时的预测 $y$;只有当 $x=0$ 在数据范围内或附近时才解释它。
"r = 0.9 means 90%"“r = 0.9 表示 90%”$r$ is not a percent; $r^2=0.81$ is the proportion of variation explained.$r$ 不是百分数;$r^2=0.81$ 才是被解释的变异比例。
Slope interpreted without "predicted" or context斜率解释缺少“预测”或情境For each additional unit of $x$, the predicted $y$ changes by $b$ units.$x$ 每增加一个单位,预测的 $y$ 变化 $b$ 个单位。
Residual = predicted minus observed残差 = 预测减观测Residual = observed minus predicted; positive means underprediction.残差 = 观测减预测;为正表示低估。
Large $r$ proves a line is appropriate$r$ 大就证明直线合适Check the residual plot for a pattern.检查残差图是否有模式。
Extrapolating confidently自信地外推Predictions far outside the $x$-range are unreliable.远离 $x$ 范围的预测不可靠。
Deleting an outlier to improve the fit为改善拟合而删除离群点Investigate; report with and without.先调查;报告含与不含该点的结果。

Flashcards闪卡

Select a card to reveal the answer.

点击卡片查看答案。

Unit Quiz单元自测

1. Heights in centimeters and weights in kilograms have $r=0.72$. Heights are converted to inches. The new correlation is

Answer: A. $r$ is unit-free, so a positive rescaling leaves it unchanged.

1. 身高(厘米)与体重(千克)的 $r=0.72$。身高换算成英寸后,新的相关系数是

答案: A. $r$ 无单位,正比例换算不改变它。

2. For $\hat{y}=51.21+3.69x$ ($x$: weekly study hours, $y$: exam score), which interpretation of the slope is best?

Answer: B. The slope is a predicted change per unit of $x$, stated in context and not as a guarantee or a cause.

2. 对 $\hat{y}=51.21+3.69x$($x$:每周学习小时,$y$:考试成绩),哪个对斜率的解释最好?

答案: B. 斜率是每单位 $x$ 对应的预测变化量,要结合情境说明,不是保证,也不是因果。

3. For $\hat{y}=3+2x$, the point $(4,13)$ has residual

Answer: B. $\hat{y}=11$ and $e=13-11=+2$: observed above predicted, so underpredicted.

3. 对 $\hat{y}=3+2x$,点 $(4,13)$ 的残差是

答案: B. $\hat{y}=11$,$e=13-11=+2$:观测高于预测,所以低估。

4. A regression has $r^2=0.64$. Which statement is correct?

Answer: B. $r^2$ is the proportion of variation in the response explained by the linear relationship.

4. 某回归的 $r^2=0.64$。哪个陈述正确?

答案: B. $r^2$ 是响应变量变异中被线性关系解释的比例。

5. A point has an $x$-value far larger than all others and lies far below the trend. It is best described as

Answer: B. Extreme $x$ gives high leverage; being off the trend lets it pull the slope, so it is influential.

5. 某点的 $x$ 值远大于其他点,且远低于趋势。最恰当的描述是

答案: B. $x$ 极端意味着高杠杆;偏离趋势使它能拉动斜率,所以是强影响点。

6. A straight-line fit has $r=0.93$ but its residual plot is U-shaped. The best conclusion is

Answer: B. A curved residual plot shows systematic departure from linearity regardless of $r$.

6. 直线拟合的 $r=0.93$,但残差图呈 U 形。最佳结论是

答案: B. 弯曲的残差图表明系统性偏离线性,与 $r$ 的大小无关。

7. Summary statistics: $\bar{x}=10$, $s_x=2$, $\bar{y}=50$, $s_y=8$, $r=-0.75$. The least-squares line is

Answer: A. $b=-0.75(8/2)=-3$, $a=50-(-3)(10)=80$.

7. 汇总统计量:$\bar{x}=10$,$s_x=2$,$\bar{y}=50$,$s_y=8$,$r=-0.75$。最小二乘线是

答案: A. $b=-0.75(8/2)=-3$,$a=50-(-3)(10)=80$。

8. A model $\widehat{\ln y}=1.5+0.2x$ is fitted. Each one-unit increase in $x$ multiplies the predicted $y$ by about

Answer: B. $e^{0.2}\approx1.22$. (4.48 is $e^{1.5}$, the predicted $y$ at $x=0$.)

8. 拟合模型 $\widehat{\ln y}=1.5+0.2x$。$x$ 每增加一个单位,预测的 $y$ 约乘以

答案: B. $e^{0.2}\approx1.22$。(4.48 是 $e^{1.5}$,即 $x=0$ 时预测的 $y$。)

9. Which change to a data set changes the value of $r$?

Answer: C. Multiplying $y$ by $-1$ flips the direction, so $r$ changes sign. $r$ is symmetric in $x$ and $y$, and it is unchanged by positive rescaling or by adding a constant.

9. 下列哪种对数据集的改变会改变 $r$ 的值?

答案: C. 把 $y$ 乘以 $-1$ 会使方向反转,所以 $r$ 变号。$r$ 对 $x$ 和 $y$ 是对称的,正比例换算或加上常数都不改变它。

10. A line $\hat{y}=51.21+3.694x$ predicts exam score from weekly study hours. To estimate the study hours of a student who scored 80, the most appropriate method is to

Answer: A. The line was fitted to predict score, so predicting hours needs the line with hours as the response. Its slope is $r\,s_x/s_y$, which equals $1/3.694$ only when $|r|=1$. Symmetry of $r$ does not make the two regression lines the same.

10. 直线 $\hat{y}=51.21+3.694x$ 由每周学习小时数预测考试成绩。要估计得 80 分的学生的学习小时数,最合适的方法是

答案: A. 这条直线是为预测成绩而拟合的,所以预测小时数需要以小时数为响应变量的直线。它的斜率是 $r\,s_x/s_y$,只有当 $|r|=1$ 时才等于 $1/3.694$。$r$ 的对称性并不使两条回归线相同。

11. A least-squares line is fit to 40 points. The residual plot shows no curve, but the vertical spread of the residuals grows steadily as $x$ increases. The best conclusion is

Answer: D. A fan shape means the size of the prediction errors changes with $x$. It does not show curvature, and residuals from a least-squares line with an intercept always sum to zero.

11. 对 40 个点拟合最小二乘直线。残差图没有弯曲,但残差的竖直离散程度随 $x$ 增大而稳步增大。最佳结论是

答案: D. 扇形说明预测误差的大小随 $x$ 变化。它并不表示弯曲,而且带截距的最小二乘直线的残差之和总是零。

12. A scatterplot of $y$ against $x$ curves upward, but $\ln y$ against $x$ is linear with $\widehat{\ln y}=1.2+0.30x$. Which statement describes the growth in $y$?

Answer: B. The slope is on the log scale, so one more unit of $x$ multiplies the predicted $y$ by $e^{0.30}\approx1.35$, an increase of about 35%, not 30%.

12. $y$ 对 $x$ 的散点图向上弯曲,但 $\ln y$ 对 $x$ 是线性的,$\widehat{\ln y}=1.2+0.30x$。哪个陈述描述了 $y$ 的增长?

答案: B. 斜率在对数尺度上,所以 $x$ 每增加一个单位,预测的 $y$ 乘以 $e^{0.30}\approx1.35$,即增加约 35%,不是 30%。