01 / 20

Inference for
Regression Slope

Learn to perform hypothesis tests and build confidence intervals for the true population slope \(\beta_1\) using t-procedures.

College Statistics

What Is a Regression Slope?

When we fit a least-squares regression line \(\hat{y} = b_0 + b_1 x\), the slope \(b_1\) tells us the predicted change in \(y\) for each one-unit increase in \(x\). But \(b_1\) is computed from sample data: it is an estimate of the true population slope \(\beta_1\).

The Population Linear Model

We assume the population follows a linear model with normally distributed errors:

\(\beta_0\)
Population y-intercept (true)
\(\beta_1\)
Population slope (what we want to test)
\(\varepsilon_i\)
Random error for each observation

Conditions: L.I.N.E.

Before performing inference on \(\beta_1\), four conditions must be checked:

L
Linearity: The scatterplot of \(y\) vs \(x\) shows a linear pattern (check residual plot for no curve).
I
Independence: Observations are independent (random sample, or < 10% of population).
N
Normality: For each value of \(x\), the residuals are approximately normally distributed.
E
Equal Variance: The spread of residuals is roughly constant across all \(x\) (no fanning).

Sampling Distribution of \(b_1\)

When the LINE conditions hold, the sample slope \(b_1\) follows a t-distribution:

Degrees of Freedom
\(df = n - 2\) because we estimate both \(\beta_0\) and \(\beta_1\).
Standard Error
\(SE_{b_1} = \dfrac{s}{\sqrt{\sum (x_i - \bar{x})^2}}\) where \(s\) is the residual standard deviation.

The t-Test for \(\beta_1\)

The most common test asks: Is there a significant linear relationship? We test whether the true slope differs from zero.

1
Hypotheses: \(H_0\!: \beta_1 = 0\) vs \(H_a\!: \beta_1 \neq 0\) (or one-sided)
2
Test statistic: \(t = \dfrac{b_1 - 0}{SE_{b_1}} = \dfrac{b_1}{SE_{b_1}}\)
3
P-value: Find from a \(t\)-distribution with \(df = n - 2\).
4
Conclusion: If p-value < \(\alpha\), reject \(H_0\): convincing evidence of a linear relationship.

Confidence Interval for \(\beta_1\)

A confidence interval gives a range of plausible values for the true slope \(\beta_1\):

Visualizing the t-Test

0 t-stat p/2 p/2
t-distribution (\(df = n - 2\))

t-Test vs Confidence Interval

t-Test Confidence Interval
Purpose Is there evidence \(\beta_1 \neq 0\)? What values of \(\beta_1\) are plausible?
Output p-value, reject/fail to reject Interval \([L,\, U]\)
Formula \(t = b_1 / SE_{b_1}\) \(b_1 \pm t^* \cdot SE_{b_1}\)
Degrees of freedom \(n - 2\) \(n - 2\)
Agreement If CI excludes 0, then the t-test rejects \(H_0\) at the matching \(\alpha\).

Reading Computer Output

On the AP exam and in practice, you will read regression output from software. Here is a typical table:

Predictor Coef SE Coef t p
Constant 12.40 3.15 3.94 0.001
Hours 2.80 0.65 4.31 0.0004

How to Perform Inference

1
State hypotheses: Write \(H_0\!: \beta_1 = 0\) and choose \(H_a\) (two-sided or one-sided based on context).
2
Check conditions (LINE): Examine the residual plot for linearity, constant variance, and normality. State independence.
3
Compute the test statistic: \(t = b_1 / SE_{b_1}\), or read directly from output. \(df = n - 2\).
4
Find the p-value: Use the t-table or calculator with \(df = n - 2\).
5
Conclude in context: Compare p-value to \(\alpha\). State the conclusion about the relationship between \(x\) and \(y\).

Example 1: Study Hours and Exam Scores

A random sample of \(n = 20\) students yields \(b_1 = 2.80\), \(SE_{b_1} = 0.65\). Test whether study hours are a significant predictor of exam score at \(\alpha = 0.05\).

1
\(H_0\!: \beta_1 = 0\) vs \(H_a\!: \beta_1 \neq 0\)
2
Conditions assumed met (random sample, residual plot checked).
3
\(t = \dfrac{2.80}{0.65} = 4.31\), \(df = 20 - 2 = 18\)
4
p-value \(\approx 0.0004\), which is < 0.05.

Example 2: 95% CI for \(\beta_1\)

Using the same data (\(b_1 = 2.80\), \(SE_{b_1} = 0.65\), \(df = 18\)), construct a 95% confidence interval for \(\beta_1\).

1
Find \(t^*\) for 95% confidence with \(df = 18\): \(t^* = 2.101\).
2
Margin of error: \(2.101 \times 0.65 = 1.366\).
3
Interval: \(2.80 \pm 1.366 = (1.434,\; 4.166)\).

Example 3: One-Sided Test

A researcher with \(n = 30\) data points gets \(b_1 = -0.42\) and \(SE_{b_1} = 0.20\). She expects a negative relationship. Test at \(\alpha = 0.01\).

1
\(H_0\!: \beta_1 = 0\) vs \(H_a\!: \beta_1 < 0\) (left-tailed)
2
\(t = \dfrac{-0.42}{0.20} = -2.10\), \(df = 30 - 2 = 28\)
3
One-sided p-value \(\approx 0.022\). Since \(0.022 > 0.01\)...

Common Mistakes

✕ Wrong df
Using \(n-1\) instead of \(n-2\). Regression estimates two parameters (\(\beta_0\) and \(\beta_1\)), so \(df = n - 2\).
✕ Causation Language
Saying "\(x\) causes \(y\)" when the data is observational. Only say "associated with" or "predicts."
✕ Ignoring Conditions
Forgetting to check LINE conditions. A curved residual plot means a linear model is inappropriate.
✕ One-Sided vs Two-Sided
Computer output typically gives a two-sided p-value. Divide by 2 for a one-sided test (if the direction matches).

Summary of Key Formulas

Quantity Formula Notes
Test statistic \(t = \dfrac{b_1 - \beta_{1,0}}{SE_{b_1}}\) Usually \(\beta_{1,0} = 0\)
CI for \(\beta_1\) \(b_1 \pm t^* \cdot SE_{b_1}\) \(t^*\) from \(t_{n-2}\)
Degrees of freedom \(df = n - 2\) Two parameters estimated
Standard error \(SE_{b_1} = \dfrac{s}{\sqrt{\sum(x_i - \bar{x})^2}}\) Given in output
Conditions L.I.N.E. Check residual plots

Question 1 of 5

A regression analysis with \(n = 25\) observations yields \(b_1 = 3.5\) and \(SE_{b_1} = 1.0\). What is the t-statistic for testing \(H_0\!: \beta_1 = 0\)?

Question 2 of 5

In a regression t-test with \(n = 15\) observations, what are the degrees of freedom?

Question 3 of 5

A 95% confidence interval for \(\beta_1\) is \((0.8,\; 4.2)\). Which conclusion is most appropriate?

Question 4 of 5

Computer output gives a two-sided p-value of 0.036 for the slope. A researcher tests \(H_a\!: \beta_1 > 0\) and \(b_1 > 0\). What is the one-sided p-value?

Question 5 of 5

Which of the following is not one of the LINE conditions required for inference on the regression slope?