Inference for the Slope of a Regression Line
Inference for the slope asks whether the relationship seen in a sample's regression line reflects a real relationship in the population, using a t-test and confidence interval built from the slope and its standard error.
A sample scatterplot almost never has a slope of exactly zero, even when x and y are truly unrelated. Random scatter alone can tilt a line one way or another. So before trusting that x predicts y, you test the null hypothesis that the true slope, written beta, equals zero. If you can reject that, you have evidence x actually matters for predicting y, not just in this one sample but in the wider population or process the sample came from.
Regression output gives you everything needed: the slope b, its standard error SE, and from those a t statistic and p-value. The t statistic is t = b divided by SE, measuring how many standard errors the sample slope sits from zero. Degrees of freedom are n - 2, since estimating a line costs two parameters, slope and intercept. The p-value comes from the t-distribution with that df, and small p-values (conventionally below 0.05) reject the claim that beta is zero. A confidence interval for beta takes the same ingredients: b plus or minus a critical t value times SE, giving a range of plausible true slopes.
This mirrors the two-sample t-test from comparing means: both start with a statistic, divide by its standard error to get t, and use a t-distribution to judge how surprising the result is. There you tested whether two population means differed; here you test whether a line's tilt differs from flat. Both also need conditions: here, linearity, independence, roughly normal residuals, and constant spread around the line, checked through a residual plot before you trust the inference at all.
Key terms
- Standard error of the slope (SE)
- A measure of how much the sample slope would vary from sample to sample if you repeated the study.
- t statistic
- The sample slope divided by its standard error, measuring how many standard errors it is from zero.
- Degrees of freedom (df)
- Equal to n - 2 for regression, since two parameters, slope and intercept, are estimated from the data.
- Confidence interval for beta
- The sample slope plus or minus a critical t value times its standard error, estimating the true population slope.
- Null hypothesis beta = 0
- The claim that there is no true linear relationship between x and y in the population.
Watch it explained
- How it worksWalk me through reading slope, standard error, t, and p-value off regression output.
- Worked exampleFind the 95 percent interval for the slope from b = 0.412, SE = 0.087, and n = 22.
- Worked exampleFind the t statistic and p-value testing whether the true slope is zero at b = 0.412.
- Ties togetherHow does a t-test for a slope connect to the two-sample t-tests from Unit 4?
Check yourself
End of topic.