01 / 21

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.

AP Statistics

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:

\(\alpha\) (intercept)
The expected value of \(y\) when \(x = 0\)
\(\beta\) (slope)
The change in expected \(y\) per one-unit increase in \(x\)
\(\sigma\) (std dev)
The standard deviation of \(y\) values about the line

Visualizing the Regression Model

\(x\)
\(y\)
regression line Normal spread of y at each x run rise

Conditions for Inference

Before performing a t-test for the slope, four conditions must be checked. Remember the acronym LINE:

L
Linear: The scatterplot of \(y\) vs. \(x\) shows a linear pattern (check residual plot for no curves).
I
Independent: Observations are independent of each other (random sample, or \(n < 10\%\) of population).
N
Normal: For each \(x\), the responses are normally distributed (check residuals for rough normality).
E
Equal variance: The spread of residuals is roughly constant across all \(x\) values (no "fan" shape).

Setting Up the Hypotheses

We test whether the population slope \(\beta\) equals a hypothesized value. Almost always, we test against zero:

Null Hypothesis
\(H_0: \beta = 0\)
No linear relationship between \(x\) and \(y\)
Alternative (two-sided)
\(H_a: \beta \neq 0\)
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

1
State hypotheses: Write \(H_0: \beta = 0\) and choose \(H_a\) (two-sided or one-sided) based on the research question.
2
Check conditions: Verify LINE: Linear, Independent, Normal, Equal variance using the residual plot and context.
3
Compute test statistic: \(t = \dfrac{b - 0}{SE_b}\) with \(df = n - 2\).
4
Find the p-value: Use the t-distribution with \(df = n - 2\). Two-sided: \(p = 2 \cdot P(T \geq |t|)\).
5
Conclude in context: Compare p-value to \(\alpha\). If \(p < \alpha\), reject \(H_0\) and state the evidence for a linear relationship.

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

1
Hypotheses: \(H_0: \beta = 0\) vs. \(H_a: \beta \neq 0\)
2
Conditions: Residual plot shows no pattern, random sample, residuals approximately normal, roughly equal spread. ✓
3
Test statistic: \(t = \dfrac{3.18 - 0}{0.52} = 6.115\), \(df = 20 - 2 = 18\)
4
p-value: \(p < 0.0001\) (two-sided, from t-table or calculator)

Example 1: Conclusion

\(t\)
\(0\)
\(t = 6.12\)
\(-2.101\)
\(2.101\)
\(df = 18\)

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.

1
Hypotheses: \(H_0: \beta = 0\) vs. \(H_a: \beta \neq 0\)
2
Conditions: Assume residual plot checks pass. ✓
3
Test statistic: \(t = \dfrac{1.42}{0.85} = 1.671\), \(df = 13\)
4
p-value: For \(df = 13\), \(t^* = 2.160\) at \(\alpha = 0.05\). Since \(1.671 < 2.160\), the p-value \(\approx 0.118\).

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

1
Hypotheses: \(H_0: \beta = 0\) vs. \(H_a: \beta > 0\) (one-sided, positive direction)
2
Test statistic: \(t = \dfrac{0.74}{0.31} = 2.387\), \(df = 23\)
3
p-value: One-sided: \(P(T \geq 2.387) \approx 0.013\)
4
Conclusion: \(p = 0.013 > 0.01\), so we fail to reject \(H_0\) at the 1% level. Marginal evidence, but not enough at this strict significance level.

Common Mistakes to Avoid

✕ Wrong df
Using \(df = n - 1\) instead of \(df = n - 2\). The regression t-test always uses \(n - 2\) degrees of freedom.
✕ Causal Language
Saying "\(x\) causes \(y\)" from observational data. Only say "associated with" or "predicts" unless the study is a randomized experiment.
✕ Skipping Conditions
Forgetting to check LINE conditions or just listing them without evidence. You must reference the residual plot and context.
✕ Confusing \(b\) and \(\beta\)
Stating hypotheses about \(b\) (the sample slope) rather than \(\beta\) (the population slope). Hypotheses are always about parameters.

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

Which of the following is a valid interpretation of the p-value in this test?