Login
📚 Mostly Harmless Statistics
Chapters ▾
⇩ Download ▾

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 y=β0+β1+ε where β0 (pronounced “beta-naught”) is the population y-intercept, β1 (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 y-value for every input of x 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:

H0:β1=0
H1:β10

The null hypothesis of a two-tailed test states that there is not a linear relationship between x and y. The alternative hypothesis of a two-tailed test states that there is a significant linear relationship between x and y.

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 y 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,

Template for a regression table, containing equations for the sum of squares, degrees of freedom and mean square for regression and for error, as well as the F value of the data.
Figure 12-12: Regression ANOVA table template.

where n is the number of pairs in the sample and p is the number of predictor (independent) variables; for now this is just p=1. Use the F-distribution with degrees of freedom for regression = dfR=p, and degrees of freedom for error = dfE=np1. 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 x value will give the same y 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 t=b1(MSESSxx)

Use the t-distribution with degrees of freedom equal to np1.

The t-test for slope has the same hypotheses as the F-test:

H0:β1=0
H1:β10

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.