12.5 Hypothesis Test for Linear Regression
To test to see if the slope is significant we will be doing a two-tailed test with hypotheses. The population least squares regression line would be where (pronounced “beta-naught”) is the population -intercept, (pronounced “beta-one”) is the population slope and is called the error term.
If the slope were horizontal (equal to zero), the regression line would give the same -value for every input of and would be of no use. If there is a statistically significant linear relationship then the slope needs to be different from zero. We will only do the two-tailed test, but the same rules for hypothesis testing apply for a one-tailed test.
We will only be using the two-tailed test for a population slope.
The hypotheses are:
The null hypothesis of a two-tailed test states that there is not a linear relationship between and . The alternative hypothesis of a two-tailed test states that there is a significant linear relationship between and .
Either a t-test or an F-test may be used to see if the slope is significantly different from zero. The population of the variable must be normally distributed.
F-Test for Regression
An F-test can be used instead of a t-test. Both tests will yield the same results, so it is a matter of preference and what technology is available. Figure 12-12 is a template for a regression ANOVA table,

where is the number of pairs in the sample and is the number of predictor (independent) variables; for now this is just . Use the F-distribution with degrees of freedom for regression = , and degrees of freedom for error = . This F-test is always a right-tailed test since ANOVA is testing the variation in the regression model is larger than the variation in the error.
T-Test for Regression
If the regression equation has a slope of zero, then every value will give the same value and the regression equation would be useless for prediction. We should perform a t-test to see if the slope is significantly different from zero before using the regression equation for prediction. The numeric value of t will be the same as the t-test for a correlation. The two test statistic formulas are algebraically equal; however, the formulas are different and we use a different parameter in the hypotheses.
The formula for the t-test statistic is
Use the t-distribution with degrees of freedom equal to .
The t-test for slope has the same hypotheses as the F-test:
Example 2
Use a t-test to see if there is a significant relationship between hours studied and grade on the exam, use = 0.05.
Hours Studied for Exam 20 16 20 18 17 16 15 17 15 16 15 17 16 17 14 Grade on Exam 89 72 93 84 81 75 70 82 69 83 80 83 81 84 76
Show solution
The hypotheses are:
Find the critical value using for a two-tailed test = 0.05 inverse t-distribution to get the critical values .
Draw the sampling distribution and label the critical values, as shown in Figure 12-14.

The critical value is the same as we found using the t-test for correlation.
Next, find the test statistic = 5.271\).
The test statistic value is the same value of the t-test for correlation even though they used different formulas. We look in the same place using technology as the correlation test.

The test statistic is greater than the critical value of 2.160 and in the rejection region. The decision is to reject .
Summary: At the 5% significance level, there is enough evidence to support the claim that there is a significant linear relationship (correlation) between the number of hours studied for an exam and exam scores. The p-value method could also be used to find the same decision.
The p-value = 0.00015, the same as the previous tests. We will use technology for the p-value method. In the SPSS output, they use Sig. for the p-value.
Excel

SPSS

Adapted from Mostly Harmless Statistics by Rachel Webb (Portland State University), hosted on LibreTexts (stats.libretexts.org) and licensed under CC BY-SA 4.0. Changes were made. License: CC-BY-SA-4.0.