Euler Hall — free maths guides

Test whether a regression slope differs from zero

State the slope test's null and statistic. The idea in plain words, a worked example, and a check with the answers shown — part of the free Statistics guides.

Estimate over standard error, on n minus two degrees of freedom

The standard question about a fitted line is whether the population slope could be zero — that is, whether the response changes with the predictor at all.

The hypotheses areH0:β=0H_0: \beta = 0 against the alternative of interest (usually two-sided). The statistic is the estimate divided by its standard error:

t=β^SE(β^),t = \frac{\hat\beta}{SE(\hat\beta)},

and under the null it follows a t distribution withn−2n - 2 degrees of freedom — two because the line spent one on the intercept and one on the slope.

For a single predictor this test and the F test of the whole regression are the same test:FF ist2t^2. That is why the two p-values always agree.

Why the degrees are n minus two

The statistic compares an estimate with its standard error, and the standard error is built fromMSEMSE, which hasn−2n - 2 degrees of freedom.

Those two degrees of freedom are the line's: one for the intercept, one for the slope. Usingn−1n - 1 instead would overstate the degrees of freedom, which makes the p-value too small — a mistake in the direction of finding relationships that are not there.

With more predictors the count becomesn−pn - p, the same accounting as everywhere else in the chapter.

Worked example: a slope test carried out

A fit givesβ^=2.4\hat\beta = 2.4 withSE=0.8SE = 0.8 on1010 degrees of freedom.

t=2.4/0.8=3t = 2.4/0.8 = 3. Comparing with a printed critical value of about2.2282.228 at the55 percent level for1010 degrees of freedom, the null is rejected: there is evidence the response changes with the predictor.

The corresponding F would be32=93^2 = 9 on11 and1010 degrees of freedom — the same evidence in the other form.

By the end you can
  • State the slope test's null and statistic
  • Assign its degrees of freedom
  • Relate it to the F test
  • Read a decision correctly
Check yourself
  1. 1. State the null and the statistic for a slope test.
  2. 2. How many degrees of freedom does a simple regression's slope test have?
  3. 3. How does the F test of the same regression relate to it?
Answers
  1. 1.H0:β=0H_0: \beta = 0;t=β^/SE(β^)t = \hat\beta/SE(\hat\beta).
  2. 2.n−2n - 2.
  3. 3.F=t2F = t^2, with the same p-value.
Work out where to start — free, no accountAnswer six real questions — free, no account