Skip to content

Inference for Quantitative Data: Slopes

AP Statistics · Topic 9

Train
9.1

Do Those Points Align?

Syllabus
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.

Source: College Board AP Course and Exam Description

A sample scatterplot 散点图 gives a sample slope 样本斜率 $b$ for the least-squares regression 回归 line – but a different sample would give a slightly different slope. So $b$ is a statistic with sampling variability 抽样变异性, estimating the true (population) slope 总体斜率 $\beta$. This unit does inference 推断 for $\beta$: is there a real linear 线性 relationship, and how strong is it?

Vocabulary Train
English Chinese Pinyin
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

Confidence Interval for a Slope

Syllabus
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)$.

Source: College Board AP Course and Exam Description

A $t$ interval for the true slope $\beta$:

$$b\pm t^{*}\,SE_b,\qquad df=n-2,$$
where $b$ is the sample slope and $SE_b$ its standard error (read from computer output). Conditions (LINER): the true relationship is Linear, observations Independent, residuals Normal, and residuals have Equal spread (check the residual plot and a histogram of residuals), from Random data. Interpret the interval for $\beta$ in context, with units of $y$ per unit of $x$.

A random, patternless residual plot supports the conditions; a curve or a fan does not A random, patternless residual plot supports the conditions; a curve or a fan does not

The residual plot 残差图 is where you check Linear and Equal-spread: you want a formless cloud around zero. A curve means the relationship is not linear; a fan (spread growing with $x$) means the residuals do not have equal spread – both break a condition.

Worked example. Regression output gives slope $b=2.5$ with $SE_b=0.8$ from $n=20$ points. For a $95\%$ interval, $df=18$ gives $t^*=2.101$:

$$2.5\pm2.101(0.8)=2.5\pm1.68=(0.82,\ 4.18).$$
Because $0$ is not in the interval, there is evidence of a positive linear relationship.

Slope inference is based on the least-squares regression line through the points Slope inference is based on the least-squares regression line through the points

Explore

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).

Vocabulary Train
English Chinese Pinyin
residual plot 残差图 cán chà tú
9.3

Justifying a Claim About a Slope

Syllabus
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.

Source: College Board AP Course and Exam Description

If the confidence interval for $\beta$ contains $0$, a slope of zero is plausible – no evidence of a linear relationship. If the interval is entirely positive or negative, there is evidence of a real (positive or negative) linear relationship. State the direction in context.

9.4

Setting Up a Test for a Slope

Syllabus
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.

Source: College Board AP Course and Exam Description

The usual test asks whether there is any linear relationship:

$$H_0:\beta=0 \quad(\text{no linear relationship})\qquad H_a:\beta\neq 0 \ (\text{or } <,\,>).$$
Check the LINER conditions. This is a $t$-test on the slope.

9.5

Carrying Out a Test for a Slope

Syllabus
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.

Source: College Board AP Course and Exam Description

The slope $t$ statistic:

$$t=\frac{b-0}{SE_b},\qquad df=n-2.$$
Both $b$ and $SE_b$ come straight from the regression output. Find the $p$-value from the $t$-distribution, compare to $\alpha$, and conclude in context – evidence (or not) of a linear relationship between the two variables.

Worked example. For the same output ($b=2.5$, $SE_b=0.8$, $n=20$), test $H_0:\beta=0$:

$$t=\frac{2.5-0}{0.8}=3.13,\qquad df=18,$$
a small $p$-value ($<0.01$), so reject $H_0$ – convincing evidence of a linear relationship. This matches the interval, which excluded $0$.

9.6

Selecting the Right Procedure

Syllabus

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.

Source: College Board AP Course and Exam Description

Across all of inference, identify: what is estimated or claimed (a proportion, a mean, a difference, a distribution of counts, or a slope), how many samples, and which design (independent or paired; sample or experiment). Then name the procedure, verify its conditions, carry it out, and communicate the conclusion with the statistic, the $p$-value or interval, and a plain-language answer in context. This selecting-and-communicating skill is what the investigative-task question rewards most.

9.6

Exam tips

  • Inference for a slope tests whether the true slope is $0$ (no linear relationship).
  • If a slope's confidence interval includes 0, you cannot conclude a real relationship.
  • Read the slope, standard error, t-statistic, and p-value straight from computer output.
  • Check the regression conditions (linearity, independence, roughly normal residuals, equal spread) via the residual plot.
  • Interpret the interval and test in context, tied to the true slope.

Log in or create account

IGCSE & A-Level