Testing for zero slope
To assess whether the explanatory variable affects the response, we test the hypotheses
H0 : β1 = 0
HA : β1 ≠ 0
The least squares slope from a sample, b1, is the obvious statistic to throw light on the value of β1, but b1 varies from sample to sample. We must therefore take account of its standard deviation to assess its distance from zero.
If we knew the error standard deviation (we don't!)
If we knew the value of σ, we could evaluate the standard deviation of b1
This could be used to standardise b1
standardised value, | ![]() |
---|
and z would have a standard normal distribution (mean 0 and sd 1) if β1 is really zero (H0). The p-value for the test would therefore be the probability of getting a value from the standard normal distribution that is as far from zero as the z-value that you evaluated from your data.
Test statistic in practice
Unfortunately σ is usually unknown and the standard deviation of b1 must be estimated from the sample data. We therefore use a test statistic of the form
t ratio, | ![]() |
---|
The p-value
The only change to the method when using the test statistic t rather than z is that a t distribution with n - 2 degrees of freedom must be used to obtain the p-value instead of the standard normal distribution.
The p-value is interpreted in the same way as for other hypothesis tests.
Interpretation of p-value
Consider a data set with least squares slope b1 and corresponding p-value, 0.0023. The p-value tells us that the probability of getting a least squares slope as far from zero as b1 would be only 0.0023 if H0 was true (i.e. if Y and X were not related). Since this is very unlikely, the data give strong evidence that the linear model slope is not zero and therefore that the response is related to the explanatory variable.
Similarly, if we calculate that the p-value for b1 is 0.4, this tells us that a least squares slope as far from zero as b1 would occur with probability 0.4, even if Y and X were not related. Since this is fairly high, our conclusion should be that there is no reason to doubt the null hypothesis — there is no evidence of a relationship between the response and explanatory variables.
Examples
The following data sets show hypothesis tests for a few data sets and the conclusions that are reached.