Inference for Regression Examples in Math

Start with the recap, study the fully worked examples, then use the practice problems to check your understanding of Inference for Regression.

This page combines explanation, solved examples, and follow-up practice so you can move from recognition to confident problem-solving in Math.

Concept Recap

Using hypothesis tests and confidence intervals to draw conclusions about the true population slope β1\beta_1 of the linear relationship y=β0+β1x+εy = \beta_0 + \beta_1 x + \varepsilon, based on sample data.

You computed a sample regression line with slope b=2.3b = 2.3. But is the true population slope actually different from zero? Maybe there's really no linear relationship and you just got a slope by chance. The regression t-test asks: 'Is my sample slope far enough from zero that it's unlikely to have occurred by random variation alone?'

Read the full concept explanation →

How to Use These Examples

  • Read the first worked example with the solution open so the structure is clear.
  • Try the practice problems before revealing each solution.
  • Use the related concepts and background knowledge badges if you feel stuck.

What to Focus On

Core idea: Inference for regression tests whether the population slope β1\beta_1 differs from zero using a t-test on the sample slope.

Common stuck point: The procedure for inference for regression is the easy part; the trap is treating a nonzero sample slope as proof of a population relationship. Asking "Am I testing whether the underlying population slope is nonzero (rather than just computing or describing the sample slope)?" first is what keeps a correct-looking calculation from being attached to the wrong concept.

Sense of Study hint: Ask: Am I testing whether the underlying population slope is nonzero (rather than just computing or describing the sample slope)?

Worked Examples

Example 1

medium
A regression output shows: slope b=2.5b=2.5, SEb=0.8SE_b=0.8, n=30n=30. Test H0:β=0H_0: \beta=0 vs Ha:β0H_a: \beta \neq 0 at α=0.05\alpha=0.05 using a t-test.

Answer

t=3.125>2.048t=3.125 > 2.048. Reject H0H_0. The slope is statistically significant at α=0.05\alpha=0.05.

First step

1
Test statistic: t=bβ0SEb=2.500.8=3.125t = \frac{b - \beta_0}{SE_b} = \frac{2.5 - 0}{0.8} = 3.125

See the full worked solution + why-it-works coaching

SetupKey insightWhy it worksCommon pitfallConnection

Unlock answer keys One Family plan — every worked solution, all subjects

Example 2

hard
Construct a 95% confidence interval for the slope β\beta given: b=1.8b=1.8, SEb=0.5SE_b=0.5, n=25n=25, and t0.025,23=2.069t^*_{0.025,23}=2.069.

Example 3

medium
A study gives b=3.2b = 3.2, SEb=1.0SE_b = 1.0, n=12n = 12. With t0.025,10=2.228t^*_{0.025, 10} = 2.228, construct the 95% CI for the slope.

Example 4

medium
Why is the slope SE inversely related to the spread of the xx values?

Example 5

hard
Explain why a significant slope does NOT imply a causal relationship between xx and yy.

Example 6

medium
A scatterplot shows a clear curved pattern, but a linear regression gives slope p-value <0.001< 0.001. What is the danger of trusting this inference?

Example 7

hard
A regression has b=1.0b = 1.0, SEb=0.5SE_b = 0.5, n=25n = 25. A 99% CI uses t0.005,23=2.807t^*_{0.005, 23} = 2.807. Compute the CI.

Practice Problems

Try these problems on your own first, then open the solution to compare your method.

Example 1

easy
List the four conditions for valid regression inference and explain why each must be checked.

Example 2

hard
A regression of salary on years of experience gives: y^=30000+2000x\hat{y} = 30000 + 2000x, R2=0.72R^2=0.72, slope p-value=0.001. A confidence interval for the slope is (1500,2500)(1500, 2500). Provide a full interpretation of each result.

Example 3

easy
In regression inference with sample size n=20n = 20, how many degrees of freedom does the t-test for the slope use?

Example 4

easy
What is the null hypothesis when testing whether a linear relationship exists between xx and yy?

Example 5

easy
The slope t-statistic is t=bSEbt = \frac{b}{SE_b}. If b=2.4b = 2.4 and SEb=0.6SE_b = 0.6, compute tt.

Example 6

easy
A slope test gives a p-value of 0.0020.002 at α=0.05\alpha = 0.05. What is the conclusion about the slope?

Example 7

easy
A confidence interval for the slope is (1.2,3.8)(1.2, 3.8). Does it provide evidence of a nonzero slope at the matching significance level?

Example 8

easy
A slope CI of (0.5,2.0)(-0.5, 2.0) is reported. What does it suggest about the slope being zero?

Example 9

easy
Name one condition that must hold for regression inference to be valid.

Example 10

easy
A significant positive slope is found between ice cream sales and drowning deaths. Does this prove ice cream causes drownings?

Example 11

medium
Compute the slope t-statistic and state the df: b=1.5b = 1.5, SEb=0.5SE_b = 0.5, n=12n = 12.

Example 12

medium
Build a slope CI: b=4.0b = 4.0, SEb=0.8SE_b = 0.8, t=2.0t^* = 2.0. Use b±tSEbb \pm t^* SE_b.

Example 13

medium
A slope test yields t=1.2t = 1.2 on df=15df = 15, p-value =0.25= 0.25, at α=0.05\alpha = 0.05. Conclude.

Example 14

medium
A residual plot for a regression shows a clear curve. Why does this matter before doing slope inference?

Example 15

medium
The standard error of the slope is SEb=ssxn1SE_b = \frac{s}{s_x \sqrt{n-1}}. If s=6s = 6, sx=3s_x = 3, n=26n = 26, compute SEbSE_b.

Example 16

medium
A two-sided slope test has t=2.5t = 2.5 on df=8df = 8. For a one-sided test (slope >0> 0) with the same data, how does the p-value change?

Example 17

medium
A slope estimate is b=0.0b = 0.0 exactly with SEb=0.5SE_b = 0.5. What is the slope t-statistic and likely conclusion?

Example 18

medium
A 95% slope CI is (0.0,4.0)(0.0, 4.0). At α=0.05\alpha = 0.05 (two-sided), what is the conclusion about β1=0\beta_1 = 0?

Example 19

medium
A slope CI is built as b±tSEbb \pm t^* SE_b with b=5b = 5, t=2.0t^* = 2.0, SEb=1.0SE_b = 1.0. Does the resulting interval show a significant slope?

Example 20

challenge
A regression on n=27n = 27 points has b=3.0b = 3.0 and SEb=1.0SE_b = 1.0. Find tt, the df, and (using t=2.06t^* = 2.06) a 95% CI for the slope.

Example 21

challenge
An experiment (random assignment) finds a significant positive slope between dose and response. A separate observational study finds the same slope significant. Which study can support a causal claim, and why?

Example 22

challenge
A slope test has df=n2=8df = n - 2 = 8. A student mistakenly used df=n1=9df = n - 1 = 9, getting a slightly different p-value. Explain the correct df and why regression loses one more degree of freedom than a one-sample mean.

Example 23

easy
A regression has b=0.8b = 0.8 and SEb=0.2SE_b = 0.2. Compute the slope tt-statistic.

Example 24

easy
A 95% CI for slope is (0.4,1.6)(0.4, 1.6). Is the slope significantly different from zero at α=0.05\alpha = 0.05?

Example 25

medium
A regression has b=0.05b = 0.05 with a p-value of 0.620.62. What is the conclusion at α=0.05\alpha = 0.05?

Example 26

medium
For b=1.5b = 1.5, SEb=0.5SE_b = 0.5, n=20n = 20, find the 95% CI (t0.025,18=2.101t^*_{0.025, 18} = 2.101).

Example 27

medium
A regression analysis reports t=2.5t = 2.5 with df=22df = 22. Approximately, is this significant at α=0.05\alpha = 0.05 (two-sided)?

Example 28

hard
A small sample regression gives b=4.0b = 4.0, SEb=1.2SE_b = 1.2, n=8n = 8. Test H0:β=0H_0: \beta = 0 vs Ha:β0H_a: \beta \ne 0 at α=0.05\alpha = 0.05 (t0.025,6=2.447t^*_{0.025, 6} = 2.447).

Example 29

hard
A linear regression is fit on bivariate data; software output: slope b=0.15b = 0.15, p-value =0.20= 0.20, R2=0.10R^2 = 0.10, n=100n = 100. State whether the slope is statistically significant at α=0.05\alpha = 0.05 and interpret.

Example 30

hard
A 90% CI for slope is (0.1,0.5)(-0.1, 0.5). What is the conclusion at α=0.10\alpha = 0.10 two-sided?

Example 31

medium
A regression of test scores on study hours gives b=5.0b = 5.0, SEb=1.0SE_b = 1.0, n=25n = 25. Construct a 95% CI (t0.025,23=2.069t^*_{0.025, 23} = 2.069) and interpret in context.

Example 32

medium
If t=3.0t = -3.0 on df=18df = 18, find the two-sided p-value (approximate).

Example 33

easy
If b=0b = 0 exactly, what is the slope tt-statistic?

Example 34

hard
Given b=2.4b = 2.4, SEb=0.8SE_b = 0.8, n=30n = 30, test H0:β=1.0H_0: \beta = 1.0 vs Ha:β>1.0H_a: \beta > 1.0 (t0.05,28=1.701t^*_{0.05, 28} = 1.701).

Example 35

medium
A regression of height on age gives b=1.2b = 1.2 cm/yr, SEb=0.4SE_b = 0.4, n=16n = 16. Find tt and the approximate p-value.

Example 36

challenge
A regression on a population shows true slope β=2.0\beta = 2.0. A sample of n=20n = 20 gives b=0.5b = 0.5, SEb=1.0SE_b = 1.0. Will a 95% CI capture β=2.0\beta = 2.0? (Use t=2.093t^* = 2.093.)

Background Knowledge

These ideas may be useful before you work through the harder examples.

linear regression lsrlresidualsr squaredhypothesis testingconfidence interval