01 / 21

Inference for
Regression Slope

Learn how to build confidence intervals and perform hypothesis tests for the slope \(\beta_1\) of a linear regression model.

Biostatistics

What Is a Regression Slope?

In a simple linear regression model \(\hat{y} = b_0 + b_1 x\), the slope \(b_1\) tells us the predicted change in the response variable \(y\) for each one-unit increase in the explanatory variable \(x\).

\(b_1\) (Sample)
Slope calculated from the data: a statistic
\(\beta_1\) (Population)
True slope of the regression line: a parameter

The Big Picture: Why Inference?

A scatterplot may show a trend, but is the relationship real or could it have arisen by chance? Inference for the regression slope answers two questions:

1
Confidence Interval: What range of values for \(\beta_1\) is plausible given our data?
2
Hypothesis Test: Is there statistically significant evidence that \(\beta_1 \neq 0\)?

Conditions: L-I-N-E

Before performing inference on \(\beta_1\), verify four conditions using the acronym LINE:

Linearity
Scatterplot of \(y\) vs. \(x\) shows a linear pattern; residual plot shows no curve.
Independence
Observations are independent. For sampling: \(n < 10\%\) of population.
Normality
Residuals are approximately Normal. Check histogram or Normal probability plot.
Equal Variance
Residual plot shows constant spread (no fanning). Also called homoscedasticity.

The Linear Model

The population regression model assumes each response value comes from a Normal distribution centered on the true line:

\(\beta_0\)
Population intercept
\(\beta_1\)
Population slope (parameter of interest)
\(\sigma\)
Standard deviation of residuals (estimated by \(s\))

Standard Error of \(b_1\)

The variability of \(b_1\) from sample to sample is captured by its standard error:

1
Larger \(n\): More data points decrease \(SE_{b_1}\), giving a more precise estimate.
2
Greater spread in \(x\): Wider range of \(x\)-values decreases \(SE_{b_1}\).
3
Smaller \(s\): Less scatter around the line decreases \(SE_{b_1}\).

Hypothesis Test for \(\beta_1\)

We test whether the true slope is zero (no linear relationship):

If the p-value is less than the significance level \(\alpha\) (often 0.05), we reject \(H_0\) and conclude there is significant evidence of a linear relationship.

Confidence Interval for \(\beta_1\)

A confidence interval provides a range of plausible values for the true slope:

Interval contains 0
We cannot conclude that \(\beta_1 \neq 0\): fail to reject \(H_0\).
Interval excludes 0
Evidence that \(\beta_1 \neq 0\): reject \(H_0\) at the corresponding \(\alpha\).

CI vs. Hypothesis Test

Confidence Interval Hypothesis Test
Goal Estimate a range for \(\beta_1\) Decide if \(\beta_1 = 0\) or not
Output Interval: \((a,\,b)\) p-value and decision
Formula uses \(b_1 \pm t^* \cdot SE_{b_1}\) \(t = b_1 / SE_{b_1}\)
Connection If the CI excludes 0, the test rejects \(H_0\) at the corresponding level.

How to Apply the Test

1
State hypotheses: \(H_0\!: \beta_1 = 0\) vs. \(H_a\!: \beta_1 \neq 0\) (or one-sided).
2
Check conditions: Verify L-I-N-E using scatterplot and residual plots.
3
Calculate test statistic: \(t = b_1 / SE_{b_1}\) with \(df = n - 2\).
4
Find the p-value: Use \(t\)-distribution with \(df = n - 2\).
5
Conclude: If p-value < \(\alpha\), reject \(H_0\) and state the conclusion in context.

Example 1: Drug Dosage Study

A biostatistician collects data on drug dosage (mg) and blood pressure reduction (mmHg) for \(n = 20\) patients. Software output gives:

Dosage (mg) BP Reduction (mmHg) 10 20 30 40 50 0 25 50 75 100 125 150

Example 1: Solution

1
Hypotheses: \(H_0\!: \beta_1 = 0\), \(H_a\!: \beta_1 \neq 0\).
2
Test statistic: \(t = \dfrac{b_1}{SE_{b_1}} = \dfrac{2.4}{0.6} = 4.0\).
3
p-value: With \(df = 18\), the two-sided p-value for \(t = 4.0\) is approximately 0.0009.
4
Conclusion: Since \(p = 0.0009 < 0.05\), we reject \(H_0\).

Example 2: Building a 95% CI

Using the same data from Example 1: \(b_1 = 2.4\), \(SE_{b_1} = 0.6\), \(df = 18\). Find the 95% confidence interval for \(\beta_1\).

1
Critical value: For 95% CI with \(df = 18\): \(t^* = 2.101\).
2
Margin of error: \(t^* \cdot SE_{b_1} = 2.101 \times 0.6 = 1.261\).
3
Interval: \(2.4 \pm 1.261 = \) (1.139, 3.661).

Example 3: Interpreting Computer Output

A researcher studies the association between hours of exercise per week and resting heart rate (bpm) for \(n = 30\) subjects. Software output:

Predictor Coef SE Coef \(t\) p-value
Constant 82.3 3.1 26.55 < 0.001
Exercise -1.8 0.5 -3.60 0.001

Common Mistakes

✕ Wrong df
Using \(df = n - 1\) instead of \(df = n - 2\). Regression uses 2 parameters (\(\beta_0, \beta_1\)), so \(df = n - 2\).
✕ Causation Claim
Rejecting \(H_0\) shows association, not causation: unless the study is a randomized experiment.
✕ Ignoring Conditions
Failing to check LINE conditions. If residuals show a pattern, inference results may be invalid.

Summary: Key Formulas

Component Formula / Value
Population model \(y = \beta_0 + \beta_1 x + \varepsilon\)
Test statistic \(t = \dfrac{b_1 - 0}{SE_{b_1}}\)
Degrees of freedom \(df = n - 2\)
Confidence interval \(b_1 \pm t^* \cdot SE_{b_1}\)
Conditions L-I-N-E
Null hypothesis \(H_0\!: \beta_1 = 0\)

Question 1 of 5

In a regression analysis with \(n = 25\) observations, the test statistic for the slope is \(t = 3.2\). What are the degrees of freedom for the t-test?

Question 2 of 5

A 95% confidence interval for \(\beta_1\) is \((-0.8,\, 2.4)\). Which conclusion is appropriate at the \(\alpha = 0.05\) level?

Question 3 of 5

Software output shows \(b_1 = 5.2\) and \(SE_{b_1} = 1.3\). What is the value of the test statistic for testing \(H_0\!: \beta_1 = 0\)?

Question 4 of 5

Which of the following is NOT one of the LINE conditions for regression inference?

Question 5 of 5

A researcher rejects \(H_0\!: \beta_1 = 0\) with \(p = 0.003\) using an observational study. Which statement is most appropriate?