Inference for Regression

Perform inference for the slope of a regression line using t-tests and confidence intervals.

🎯⭐ INTERACTIVE LESSON

Try the Interactive Version!

Learn step-by-step with practice exercises built right in.

Start Interactive Lesson →

Inference for Regression

The Regression Model

The population regression line: μy=α+βx\mu_y = \alpha + \beta x

We estimate this with the sample regression line: y^=a+bx\hat{y} = a + bx

The key question: Is there a significant linear relationship? (Is β0\beta \neq 0?)

Conditions for Regression Inference

LINE conditions:

  • Linear: The true relationship is linear (check residual plot)
  • Independent: Observations are independent (10% condition)
  • Normal: For each value of xx, the responses are Normally distributed (check Normal probability plot of residuals)
  • Equal variance: The standard deviation of yy is the same for all xx (check residual plot for constant spread)

Hypothesis Test for the Slope

Hypotheses:

  • H0:β=0H_0: \beta = 0 (no linear relationship)
  • Ha:β0H_a: \beta \neq 0 (there is a linear relationship)

Test Statistic: t=b0SEbt = \frac{b - 0}{SE_b}

where SEb=s(xixˉ)2SE_b = \frac{s}{\sqrt{\sum(x_i - \bar{x})^2}} and s=(yiy^i)2n2s = \sqrt{\frac{\sum(y_i - \hat{y}_i)^2}{n-2}}

Degrees of freedom: df=n2df = n - 2

Confidence Interval for β\beta

b±tSEbb \pm t^* \cdot SE_b

with df=n2df = n - 2

Interpretation: "We are [C]% confident that the true slope of the relationship between [x] and [y] is between [lower] and [upper]."

Reading Computer Output

A typical regression output includes:

| | Coef | SE Coef | T | P | |---|---|---|---|---| | Constant | aa | SEaSE_a | tat_a | pap_a | | [x variable] | bb | SEbSE_b | tbt_b | pbp_b |

S=S = [standard deviation of residuals] R-sq=R\text{-}sq = [r2r^2 value]

The row for the x-variable gives you everything you need:

  • bb = slope estimate
  • SEbSE_b = standard error of slope
  • tt = test statistic for H0:β=0H_0: \beta = 0
  • PP = p-value for the test

Interpreting Regression Output

  1. Slope (bb): For each 1-unit increase in xx, the predicted yy changes by bb units
  2. Standard error (SEbSE_b): Measures the precision of the slope estimate
  3. t-statistic: How many SEs the slope is from 0
  4. P-value: Probability of observing this slope (or more extreme) if β=0\beta = 0

Example Conclusion

"Since the p-value of 0.002 is less than α=0.05\alpha = 0.05, we reject H0H_0. There is convincing evidence of a linear relationship between [x] and [y]."

AP Tip: You MUST be able to read computer regression output. Practice identifying bb, SEbSE_b, tt, pp, ss, and r2r^2 from output tables. Also, always check LINE conditions before doing inference.

📚 Practice Problems

No example problems available yet.