Confidence Interval for the Slope, Step by Step

AP Statistics · Appendix — not on the exam from May 2027

Key takeaway

This lesson belongs to the old Unit 9 (inference for the slope) — no longer on the exam from May 2027. It is kept for reviewing past papers or for college study.

The four steps

State: "$\beta$ is the true slope of the population regression line relating [$y$] to [$x$]; estimate it with a $95\%$ $t$-interval." Plan: check LINER — linear scatter, independent observations (random sample, $10\%$), normal residuals (no strong skew or outliers in the residual plot or histogram), equal spread in the residual plot, random data. Do:

$$b\pm t^*\cdot SE_b,\qquad df=n-2$$

with $b$ and $SE_b$ read straight from the slope row of the output. Conclude in context: "we are $95\%$ confident that the true slope — the change in mean [$y$] for each additional unit of [$x$] — is between $L$ and $U$."

A worked reading of output

Output for $n=22$ cars: slope $0{,}0523$, SE Coef $0{,}0112$. Then $df=20$, $t^*=2{,}086$, and the interval is $0{,}0523\pm2{,}086(0{,}0112)=0{,}0523\pm0{,}0234$, i.e. $(0{,}029;\,0{,}076)$. Because $0$ is not inside, the data give convincing evidence of a positive linear relationship — the same verdict a two-sided test at $\alpha=0{,}05$ would reach. Never use $df=n-1$ here; the model estimates two parameters, so $df=n-2$.

When the model was transformed

If the regression was fitted to $\ln y$, the interval is for the slope of $\ln y$ on $x$. To speak in original units, exponentiate both endpoints: an interval $(0{,}029;\,0{,}076)$ for the log-slope means the mean $y$ is multiplied by between $e^{0{,}029}\approx1{,}03$ and $e^{0{,}076}\approx1{,}08$ per unit of $x$. The interpretation is multiplicative, and the width in original units is no longer symmetric.

Worked example: confidence interval for the slope from output

A regression of fuel consumption (liters/100 km) on vehicle weight (hundreds of kg) for a random sample of $22$ car models gives this output: Constant $2.15$ (SE $0.61$); Weight $0.523$ (SE $0.112$); $S=0.48$; R-Sq $=52.1\%$. The residual plot shows no pattern and even spread, and the histogram of residuals is roughly symmetric. Construct and interpret a $95\%$ confidence interval for the slope.

Solution

State: $\beta$ is the mean increase in fuel consumption (liters/100 km) when vehicle weight increases by $100$ kg, in the population of car models. Use a $95\%$ $t$ interval for the slope.

Check: random sample, $22$ models is less than $10\%$ of all models; the residual plot shows no pattern (linear) and even spread; the histogram of residuals is roughly symmetric (normal). The conditions are met.

Compute: $df=22-2=20$, $t^*=2.086$.

$$0.523\pm2.086\cdot0.112=0.523\pm0.234\ \Rightarrow\ (0.289;\,0.757)$$

Conclude: we are $95\%$ confident that for each additional $100$ kg of weight, mean fuel consumption increases by between $0.29$ and $0.76$ liters/100 km. The interval does not contain $0$, so there is convincing evidence of a positive linear relationship between weight and fuel consumption.

Common mistakes: using the SE of the Constant ($0.61$) instead of the SE of Weight, or looking up $t^*$ with $df=21$.

Common mistake

Look up $t^*$ with $df=n-2$, not $n-1$; and take the SE from the slope row, not the constant row. The interval is about the mean change in $y$ per unit of $x$ — not "every car that is 100 kg heavier uses between 0.29 and 0.76 liters more". With a log model, forgetting to exponentiate (use $e$ to the power of) both endpoints gets the units completely wrong.

Key takeaway

Interval for $\beta$: $b\pm t^*SE_b$, $df=n-2$, with $b$ and $SE_b$ from the slope row. Check LINER with the residual plot first. Interpret as the mean change in $y$ per unit of $x$. Log model: raise $e$ to both endpoints and interpret multiplicatively.

← Where the Slope's Standard Error Comes From · All AP Statistics lessons · Practice AP Statistics questions (free, instant scoring)