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.
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
\(\alpha\) = true intercept
\(\beta\) = true slope
\(\varepsilon\) = random error
\(a\) = estimated intercept
\(b\) = estimated slope
(least-squares estimates)
Key Vocabulary
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:
\(H_a\!: \beta \neq 0\) (two-sided), \(H_a\!: \beta > 0\), or \(H_a\!: \beta < 0\) (one-sided).
Null vs. Alternative Visualized
Conditions for Inference
Before performing the test, four conditions must be checked. Remember the acronym LINE:
Reading Residual Plots
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:
\(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
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
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?