Slope of a Regression Model
Hypothesis Test
Learn how to carry out a significance test for the slope \(\beta\) of a linear regression model to determine whether a linear relationship truly exists.
What Is a Regression Slope Test?
In AP Statistics, we often fit a least-squares regression line to bivariate data. The sample slope \(b\) estimates the true population slope \(\beta\). But is \(\beta\) really different from zero, or could the observed slope be due to random chance?
The Population Regression Model
The population model assumes that for each value of \(x\), the response \(y\) is:
Visualizing the Regression Model
Conditions for Inference
Before performing a t-test for the slope, four conditions must be checked. Remember the acronym LINE:
Setting Up the Hypotheses
We test whether the population slope \(\beta\) equals a hypothesized value. Almost always, we test against zero:
No linear relationship between \(x\) and \(y\)
There is a linear relationship
The Test Statistic
Under \(H_0\), this statistic follows a t-distribution with \(df = n - 2\) degrees of freedom. The standard error of the slope is:
Test vs. Confidence Interval
Both the t-test and the confidence interval for \(\beta\) use the same sampling distribution, but they answer different questions:
| t-Test for Slope | Confidence Interval | |
|---|---|---|
| Question | Is \(\beta \neq 0\)? | What range of values is \(\beta\) likely in? |
| Formula | \(t = \dfrac{b - 0}{SE_b}\) | \(b \pm t^* \cdot SE_b\) |
| Output | p-value | Interval \((L, U)\) |
| Decision | Reject or fail to reject \(H_0\) | If 0 is not in interval, evidence of a relationship |
How to Carry Out the Test
Reading Computer Output
On the AP exam, you will be given regression output. Here is what to look for:
| Predictor | Coef | SE Coef | T | P |
|---|---|---|---|---|
| Constant | 12.40 | 2.15 | 5.77 | 0.000 |
| Hours | 3.18 | 0.52 | 6.12 | 0.000 |
Worked Example: Study Hours
A teacher collects data on hours studied (\(x\)) and exam scores (\(y\)) for \(n = 20\) students. The regression output gives: \(b = 3.18\), \(SE_b = 0.52\), \(s = 4.8\). Test whether study hours are a significant predictor at \(\alpha = 0.05\).
Example 1: Conclusion
Worked Example 2: Advertising Spend
A company investigates whether advertising spending (\(x\), in thousands) predicts monthly revenue (\(y\), in thousands). For \(n = 15\) months: \(b = 1.42\), \(SE_b = 0.85\). Test at \(\alpha = 0.05\), two-sided.
Example 3: One-Sided Test
A biologist hypothesizes that temperature (\(x\)) is positively associated with plant growth rate (\(y\)). For \(n = 25\): \(b = 0.74\), \(SE_b = 0.31\). Test at \(\alpha = 0.01\).
Common Mistakes to Avoid
Summary Reference
| Component | Details |
|---|---|
| Null Hypothesis | \(H_0: \beta = 0\) |
| Test Statistic | \(t = \dfrac{b - 0}{SE_b}\) |
| Degrees of Freedom | \(df = n - 2\) |
| Conditions | LINE: Linear, Independent, Normal, Equal variance |
| p-value (two-sided) | \(2 \cdot P(T \geq |t|)\) |
| Decision | Reject \(H_0\) if \(p < \alpha\) |
| Conclusion Template | "There is [sufficient/insufficient] evidence of a linear relationship between \(x\) and \(y\)." |
Question 1 of 5
A regression analysis of \(n = 22\) data points yields \(b = 2.5\) and \(SE_b = 0.8\). What is the value of the test statistic for testing \(H_0: \beta = 0\)?
Question 2 of 5
When performing a t-test for the slope of a regression model with \(n = 30\) observations, how many degrees of freedom does the t-distribution have?
Question 3 of 5
A researcher obtains a p-value of 0.03 for a two-sided test of \(H_0: \beta = 0\) at \(\alpha = 0.05\). Which conclusion is most appropriate?
Question 4 of 5
Which of the following is NOT one of the conditions (LINE) required for inference about the slope of a regression model?
Question 5 of 5
A statistics student fits a regression of daily ice cream sales (\(y\)) on daily high temperature (\(x\)) for \(n = 40\) summer days. The computer output shows:
Predictor: Temperature, Coef: 4.72, SE Coef: 1.18, T: 4.00, P: 0.0003
\(s = 12.4\), \(R^2 = 41.0\%\)
Which of the following is a valid interpretation of the p-value in this test?