01 / 21

Slope of a
Regression Model

Learn how to set up a hypothesis test for the slope \(\beta\) of a population regression line: choosing hypotheses, identifying conditions, and defining the test statistic.

AP Statistics

Why Test the Slope?

When we fit a least-squares regression line \(\hat{y} = a + bx\), the slope \(b\) is calculated from sample data. But does a linear relationship truly exist in the population?

Even when the true population slope \(\beta = 0\) (no real relationship), random sampling can produce a nonzero sample slope \(b\). A hypothesis test lets us determine whether the observed slope is statistically significant or simply due to chance.

Population vs. Sample Model

Population Model
\(y = \alpha + \beta x + \varepsilon\)

\(\alpha\) = true intercept
\(\beta\) = true slope
\(\varepsilon\) = random error
Sample Model
\(\hat{y} = a + bx\)

\(a\) = estimated intercept
\(b\) = estimated slope
(least-squares estimates)

Key Vocabulary

\(\beta\)
Population slope: the true rate of change
\(b\)
Sample slope: our estimate of \(\beta\) from data
\(SE_b\)
Standard error of \(b\): measures variability of the slope estimate

Setting Up the Hypotheses

For a test about the slope of a regression model, we always test whether the population slope \(\beta\) equals a specific value. Almost always, that value is zero:

1
Null Hypothesis: \(H_0\!: \beta = 0\) : there is no linear relationship between \(x\) and \(y\) in the population.
2
Alternative Hypothesis (choose one):
\(H_a\!: \beta \neq 0\) (two-sided), \(H_a\!: \beta > 0\), or \(H_a\!: \beta < 0\) (one-sided).

Null vs. Alternative Visualized

\(H_0: \beta = 0\)
\(x\)
\(y\)
No trend: \( \text{slope} = 0 \)
\(H_a: \beta \neq 0\)
\(x\)
\(y\)
Clear trend: \( \text{slope} \neq 0 \)

Conditions for Inference

Before performing the test, four conditions must be checked. Remember the acronym LINE:

L
Linearity: the scatterplot of \(x\) vs. \(y\) (or the residual plot) shows a linear pattern with no curves.
I
Independence: observations are independent. If sampling, check the 10% condition: \(n < 10\%\) of population.
N
Normal: for any given \(x\), the responses \(y\) are approximately normally distributed. Check the residual histogram or Normal probability plot.
E
Equal variance: the scatter of residuals is roughly constant across all \(x\)-values (no fanning or funneling).

Reading Residual Plots

✓ Good: Random Scatter
\(x\)
\(0\)
✕ Bad: Curved Pattern
\(x\)
\(0\)

The Test Statistic

Once conditions are verified, we compute the \(t\)-statistic for the slope:

Under the null hypothesis \(\beta_0 = 0\), this simplifies to:

Why \(n - 2\) Degrees of Freedom?

In simple linear regression, we estimate two parameters from the data: the intercept \(a\) and the slope \(b\). Each parameter estimated "uses up" one degree of freedom:

\(n\) observations
Total data points in our sample
\(- 2\) parameters
One for \(a\), one for \(b\)
\(= n - 2\) df
Degrees of freedom for the \(t\)-test

\(b\) vs. \(\beta\): Know the Difference

\(b\) (Sample) \(\beta\) (Population)
Type Statistic Parameter
Source Calculated from data True (unknown) value
Variability Changes sample to sample Fixed constant
Notation Roman letter Greek letter
Role in test Used in test statistic Appears in hypotheses

How to Set Up the Test

1
State the hypotheses. Define \(H_0\!: \beta = 0\) and choose \(H_a\) based on the research question (two-sided or one-sided).
2
Check conditions (LINE). Verify linearity, independence, normality of residuals, and equal variance using plots and context.
3
Identify the test. Name it: "a \(t\)-test for the slope of a regression model" (or "linear regression \(t\)-test").
4
State the formula. Write \(t = \dfrac{b - 0}{SE_b}\) with \(df = n - 2\). This completes the setup.

Example 1: Study Hours and Exam Scores

A teacher collects data on study hours (\(x\)) and exam scores (\(y\)) for \(n = 25\) students. Computer output gives: \(b = 4.2\), \(SE_b = 1.3\). Is there evidence of a positive linear relationship?

Example 2: Reading Computer Output

A regression of temperature (\(x\), in \(^\circ\)F) on ice cream sales (\(y\), in dollars) for \(n = 30\) days yields the following output:

Predictor Coef SE Coef T P
Constant -15.3 12.8 -1.20 0.241
Temperature 3.74 0.58 6.45 0.000

Example 3: No Relationship Scenario

A study examines whether shoe size (\(x\)) predicts GPA (\(y\)) for \(n = 40\) college students. Output shows \(b = 0.012\), \(SE_b = 0.045\).

Common Mistakes

✕ Using \(b\) in Hypotheses
Writing \(H_0\!: b = 0\) instead of \(H_0\!: \beta = 0\). Hypotheses must reference the parameter, not the statistic.
✕ Skipping Conditions
Failing to check or state LINE conditions. On the AP exam, verifying conditions earns dedicated points.
✕ Wrong df
Using \(df = n - 1\) instead of \(df = n - 2\). Regression requires subtracting 2 for both estimated parameters.

Question 1 of 5

What is the correct null hypothesis for testing the slope of a regression model?

Question 2 of 5

A regression is performed with \(n = 22\) data points. What are the degrees of freedom for the \(t\)-test on the slope?

Question 3 of 5

Computer output shows \(b = 2.8\) and \(SE_b = 0.7\). What is the value of the test statistic?

Question 4 of 5

Which condition is not part of the LINE conditions for regression inference?

Question 5 of 5

A researcher believes that advertising spending increases revenue. Which alternative hypothesis is most appropriate?