跳到主要内容

定量数据的推断:斜率

AP 统计学 · 第 9 主题

训练
讲义 词汇表
9.1

统计学导论:这些点在一条线上吗?

大纲
Enduring UnderstandingLearning ObjectiveEssential Knowledge

VAR-1
Given that variation may be random or not, conclusions are uncertain.

VAR-1.K
Identify questions suggested by variation in scatter plots. [Skill 1.A]

  • VAR-1.K.1 Variation in points' positions relative to a theoretical line may be random or non-random.

来源:美国大学理事会 AP 课程与考试说明

一个样本散点图(scatterplot)给出最小二乘回归(regression)线的一个样本斜率(sample slope)$b$ ——但一个不同的样本会给一个略微不同的斜率。所以 $b$ 是一个有抽样变异性(sampling variability)的统计量,估计真(总体)斜率(true (population) slope)$\beta$。这个单元对 $\beta$推断(inference):有一个真实的线性(linear)关系吗,以及它有多强?

词汇表 训练
英文 中文 拼音
scatterplot 散点图 sàn diǎn tú
sample slope 样本斜率 yàng běn xié lǜ
regression 回归 huí guī
sampling variability 抽样变异性 chōu yàng biàn yì xìng
true (population) slope 总体斜率 zǒng tǐ xié lǜ
inference 推断 tuī duàn
linear 线性 xiàn xìng
9.2

回归模型斜率的置信区间

大纲
Enduring UnderstandingLearning ObjectiveEssential Knowledge

UNC-4
An interval of values should be used to estimate parameters, in order to account for uncertainty.

UNC-4.AC
Identify an appropriate confidence interval procedure for a slope of a regression model. [Skill 1.D]

  • UNC-4.AC.1 Consider a response variable, $y$, that is linearly related to an explanatory variable, $x$. For a simple random sample of $n$ observations, the sample regression line, $\hat{y} = a + bx$, is an estimate of the population regression line $\mu_y = \alpha + \beta x$. For a particular observation, $(x_i, y_i)$, the residual from the sample regression line, $y_i - \hat{y}_i = y_i - (a + bx_i)$, is an estimate of $y_i - (\alpha + \beta x_i)$, the deviation of the response variable from the population regression line. For all points $(x, y)$ in the population, the standard deviation of all of the deviations of the response variable from the population regression line, $\sigma$, can be estimated by the standard deviation of the residuals from the sample regression line, $s = \sqrt{\dfrac{\sum\left(y_i - \hat{y}_i\right)^2}{n-2}}$. (Note: This formula uses $n-2$ in the denominator instead of $n-1$ because two parameters, $\alpha$ and $\beta$, must be estimated to obtain the predicted values from the least-squares regression line.)
  • UNC-4.AC.2 For a simple random sample of $n$ observations, let $b$ represent the slope of a sample regression line. Then the mean of the sampling distribution for $b$ equals the population slope: $\mu_b = \beta$. The standard deviation of the sampling distribution for $b$ is $\sigma_b = \dfrac{\sigma}{\sigma_x \sqrt{n}}$, where $\sigma_x = \sqrt{\dfrac{\sum\left(x_i - \bar{x}\right)^2}{n}}$.
  • UNC-4.AC.3 The appropriate confidence interval for the slope of a regression model is a $t$-interval for the slope.

UNC-4.AD
Verify the conditions to calculate confidence intervals for the slope of a regression model. [Skill 4.C]

  • UNC-4.AD.1 In order to calculate a confidence interval to estimate the slope of a regression line, we must check the following:
    • a. The true relationship between $x$ and $y$ is linear. Analysis of residuals may be used to verify linearity.
    • b. The standard deviation for $y$, $\sigma_y$, does not vary with $x$. Analysis of residuals may be used to check for approximately equal standard deviations for all $x$.
    • c. To check for independence:
      • i. Data should be collected using a random sample or a randomized experiment.
      • ii. When sampling without replacement, check that $n \le 10\% N$.
    • d. For a particular value of $x$, the responses ($y$-values) are approximately normally distributed. Analysis of graphical representations of residuals may be used to check for normality.
      • i. If the observed distribution is skewed, $n$ should be greater than 30.

UNC-4.AE
Determine the given margin of error for the slope of a regression model. [Skill 3.D]

  • UNC-4.AE.1 For the slope of a regression line, the margin of error is the critical value $\left(t^*\right)$ times the standard error ($SE$) of the slope.
  • UNC-4.AE.2 The standard error for the slope of a regression line with sample standard deviation, $s$, is $SE = \dfrac{s}{s_x \sqrt{n-1}}$, where $s$ is the estimate of $\sigma$ and $s_x$ is the sample standard deviation of the $x$ values.

UNC-4.AF
Calculate an appropriate confidence interval for the slope of a regression model. [Skill 3.D]

  • UNC-4.AF.1 The point estimate for the slope of a regression model is the slope of the line of best fit, $b$.
  • UNC-4.AF.2 For the slope of a regression model, the interval estimate is $b \pm t^* \left(SE_b\right)$.

来源:美国大学理事会 AP 课程与考试说明

一个对真斜率 $\beta$$t$ 区间:

$$b\pm t^{*}\,SE_b,\qquad df=n-2,$$
其中 $b$ 是样本斜率而 $SE_b$ 它的标准误(standard error)(从计算机输出读)。条件(LINER):真关系是线性的(Linear)、观测独立(Independent)、残差正态(Normal),而残差有相等(Equal)的散布(检查残差图和一个残差的直方图),来自随机(Random)数据。在上下文里、以每单位 $x$$y$ 的单位解释对 $\beta$ 的区间。

A random, patternless residual plot supports the conditions; a curve or a fan does not
一个随机、无模式的残差图支持这些条件;一条曲线或一个扇形不

残差图(residual plot)是你检查线性和相等散布的地方:你想要零周围一个无形的云。一条曲线意味着关系不是线性的;一个扇形(散布随 $x$ 增长)意味着残差没有相等的散布——两者都破坏一个条件。

Worked example. 回归输出从 $n=20$ 个点给出斜率 $b=2.5$$SE_b=0.8$。对于一个 $95\%$ 区间,$df=18$ 给出 $t^*=2.101$:

$$2.5\pm2.101(0.8)=2.5\pm1.68=(0.82,\ 4.18).$$
因为 $0$ 在区间里,有一个正线性关系的证据。

Slope inference is based on the least-squares regression line through the points
斜率推断基于穿过这些点的最小二乘回归线
最小二乘回归:使残差平方和最小的直线
最小二乘回归:使残差平方和最小的直线
探索

Inference for a regression slope

The sample slope varies from sample to sample; a confidence interval and t-test ask whether the true slope could be zero (no linear relationship).

词汇表 训练
英文 中文 拼音
residual plot 残差图 cán chà tú
9.3

基于置信区间论证关于回归模型斜率的结论

大纲
Enduring UnderstandingLearning ObjectiveEssential Knowledge

UNC-4
An interval of values should be used to estimate parameters, in order to account for uncertainty.

UNC-4.AG
Interpret a confidence interval for the slope of a regression model. [Skill 4.B]

  • UNC-4.AG.1 In repeated random sampling with the same sample size, approximately C% of confidence intervals created will capture the slope of the regression model, i.e., the true slope of the population regression model.
  • UNC-4.AG.2 An interpretation for a confidence interval for the slope of a regression line should include a reference to the sample taken and details about the population it represents.

UNC-4.AH
Justify a claim based on a confidence interval for the slope of a regression model. [Skill 4.D]

  • UNC-4.AH.1 A confidence interval for the slope of a regression model provides an interval of values that may provide sufficient evidence to support a particular claim in context.

UNC-4.AI
Identify the effects of sample size on the width of a confidence interval for the slope of a regression model. [Skill 4.A]

  • UNC-4.AI.1 When all other things remain the same, the width of the confidence interval for the slope of a regression model tends to decrease as the sample size increases.

来源:美国大学理事会 AP 课程与考试说明

$\beta$ 的置信区间包含 $0$,一个零斜率是可信的——没有一个线性关系的证据。若区间整个为正或负,有一个真实的(正或负)线性关系的证据。在上下文里陈述方向。

9.4

建立回归模型斜率的检验

大纲
Enduring UnderstandingLearning ObjectiveEssential Knowledge

VAR-7
The $t$-distribution may be used to model variation.

VAR-7.J
Identify the appropriate selection of a testing method for a slope of a regression model. [Skill 1.E]

  • VAR-7.J.1 The appropriate test for the slope of a regression model is a $t$-test for a slope.

VAR-7.K
Identify appropriate null and alternative hypotheses for a slope of a regression model. [Skill 1.F]

  • VAR-7.K.1 The null hypothesis for a $t$-test for a slope is: $H_0 : \beta = \beta_0$, where $\beta_0$ is the hypothesized value from the null hypothesis. The alternative hypothesis is $H_0 : \beta < \beta_0$ or $H_0 : \beta > \beta_0$, or $H_0 : \beta \neq \beta_0$.

VAR-7.L
Verify the conditions for the significance test for the slope of a regression model. [Skill 4.C]

  • VAR-7.L.1 In order to make statistical inferences when testing for the slope of a regression model, we must check the following:
    • a. The true relationship between $x$ and $y$ is linear. Analysis of residuals may be used to verify linearity.
    • b. The standard deviation for $y$, $\sigma_y$, does not vary with $x$. Analysis of residuals may be used to check for approximately equal standard deviations for all $x$.
    • c. To check for independence:
      • i. Data should be collected using a random sample or a randomized experiment.
      • ii. When sampling without replacement, check that $n \le 10\% N$.
    • d. For a particular value of $x$, the responses ($y$-values) are approximately normally distributed. Analysis of graphical representations of residuals may be used to check for normality.
      • i. If the observed distribution is skewed, $n$ should be greater than 30.
      • ii. If the sample size is less than 30, the distribution of the sample data should be free from strong skewness and outliers.

来源:美国大学理事会 AP 课程与考试说明

通常的检验问是否有任何线性关系:

$$H_0:\beta=0 \quad(\text{no linear relationship})\qquad H_a:\beta\neq 0 \ (\text{or } <,\,>).$$
检查 LINER 条件。这是一个对斜率的 $t$ 检验。

在信任斜率置信区间或检验前先检查残差图
在信任斜率置信区间或检验前先检查残差图
9.5

执行回归模型斜率的检验

大纲
Enduring UnderstandingLearning ObjectiveEssential Knowledge

VAR-7
The $t$-distribution may be used to model variation.

VAR-7.M
Calculate an appropriate test statistic for the slope of a regression model. [Skill 3.E]

  • VAR-7.M.1 The distribution of the slope of a regression model assuming all conditions are satisfied and the null hypothesis is true (null distribution) is a $t$-distribution.
  • VAR-7.M.2 For simple linear regression when random sampling from a population for the response that can be modeled with a normal distribution for each value of the explanatory variable, the sampling distribution of $t = \dfrac{b - \beta}{SE_b}$ has a $t$-distribution with degrees of freedom equal to $n - 2$. When testing the slope in a simple linear regression model with one parameter, the slope, the test for the slope has $df = n - 1$.

DAT-3
Significance testing allows us to make decisions about hypotheses within a particular context.

DAT-3.M
Interpret the $p$-value of a significance test for the slope of a regression model. [Skill 4.B]

  • DAT-3.M.1 An interpretation of the $p$-value of a significance test for the slope of a regression model should recognize that the $p$-value is computed by assuming that the null hypothesis is true, i.e., by assuming that the true population slope is equal to the particular value stated in the null hypothesis.

DAT-3.N
Justify a claim about the population based on the results of a significance test for the slope of a regression model. [Skill 4.E]

  • DAT-3.N.1 A formal decision explicitly compares the $p$-value to the significance $\alpha$. If the $p$-value $\le \alpha$, then reject the null hypothesis, $H_0 : \beta = \beta_0$. If the $p$-value $> \alpha$, then fail to reject the null hypothesis.
  • DAT-3.N.2 The results of a significance test for the slope of a regression model can serve as the statistical reasoning to support the answer to a research question about that sample.

来源:美国大学理事会 AP 课程与考试说明

斜率 $t$ 统计量:

$$t=\frac{b-0}{SE_b},\qquad df=n-2.$$
$b$$SE_b$ 都直接来自回归输出。从 $t$ 分布求 $p$ 值、与 $\alpha$ 比较,并在上下文里得出结论——两个变量之间一个线性关系的证据(或没有)。

注意尾数。 回归输出打印的总是双尾 $p$ 值(对应 $H_a:\beta\neq 0$)。若你的 $H_a$ 是单尾的,要把它减半——并且先检查样本斜率确实指向 $H_a$ 声称的方向;若指向相反,单尾 $p$ 值大于 $0.5$,你不能拒绝 $H_0$

Worked example. 对于相同的输出($b=2.5$$SE_b=0.8$$n=20$),检验 $H_0:\beta=0$:

$$t=\frac{2.5-0}{0.8}=3.13,\qquad df=18,$$
一个小的 $p$ 值($<0.01$),所以拒绝 $H_0$ ——一个线性关系的令人信服的证据。这与区间匹配,它排除了 $0$

9.6

技能聚焦:选择合适的推断方法

大纲

This topic is intended to focus on the skill of selecting an appropriate inference procedure now that students have a range of options. Students should be given opportunities to practice when and how to apply all learning objectives relating to inference.

来源:美国大学理事会 AP 课程与考试说明

跨全部推断,辨认:什么被估计或宣称(一个比例、一个均值、一个差异、一个计数的分布,或一个斜率)、多少个样本,以及哪个设计(独立或配对;样本或实验)。然后命名程序、验证它的条件、执行它,并用统计量、$p$ 值或区间,以及一个上下文里的平白语言答案传达结论。这个选择-与-传达技能正是调查性任务问题最奖励的。

9.6

考试技巧

  • 对一个斜率的推断检验真斜率是否为 $0$(没有线性关系)。
  • 若一个斜率的置信区间包含 0,你不能得出一个真实线性关系的结论——两个变量仍可能以弯曲的方式相关。
  • 直接从计算机输出读斜率、标准误、t 统计量和 p 值——但打印的 p 值是双尾的,对单尾 $H_a$ 要减半。
  • 通过残差图检查回归条件(线性、独立、大致正态的残差、相等的散布)。
  • 在上下文里解释区间和检验,系于真斜率。

本主题的互动课程

逐步学习,并即时检测练习。

AP 统计学历年真题

AP 统计学的更多主题

登录或创建账号

IGCSE, A-Level & AP