Once again we've already done the bulk of the theoretical work in developing a hypothesis test for the slope parameter \(\beta\) of a simple linear regression model when we developed a \((1-\alpha)100\%\) confidence interval for \(\beta\). We had shown then that:
\(T=\dfrac{\hat{\beta}-\beta}{\sqrt{\frac{MSE}{\sum(x_i-\bar{x})^2}}}\)
follows a \(t_{n-2}\) distribution. Therefore, if we're interested in testing the null hypothesis:
\(H_0:\beta=\beta_0\)
against any of the alternative hypotheses:
\(H_A:\beta \neq \beta_0\), \(H_A:\beta < \beta_0\), \(H_A:\beta > \beta_0\)
we can use the test statistic:
\(t=\dfrac{\hat{\beta}-\beta_0}{\sqrt{\frac{MSE}{\sum(x_i-\bar{x})^2}}}\)
and follow the standard hypothesis testing procedures. Let's take a look at an example.
Example 15-1 Section
In alligators' natural habitat, it is typically easier to observe the length of an alligator than it is the weight. This data set contains the log weight (\(y\)) and log length (\(x\)) for 15 alligators captured in central Florida. A scatter plot of the data suggests that there is a linear relationship between the response \(y\) and the predictor \(x\). Therefore, a wildlife researcher is interested in fitting the linear model:
\(Y_i=\alpha+\beta x_i+\epsilon_i\)
to the data. She is particularly interested in testing whether there is a relationship between the length and weight of alligators. At the \(\alpha=0.05\) level, perform a test of the null hypothesis \(H_0:\beta=0\) against the alternative hypothesis \(H_A:\beta \neq 0\).
Answer
The easiest way to perform the hypothesis test is to let Minitab do the work for us! Under the Stat menu, selecting Regression, and then Regression, and specifying the response logW (for log weight) and the predictor logL (for log length), we get:
The regression equation is
logW = - 8.48 + 3.43 logL
Predictor | Coef | SE Coef | T | P |
---|---|---|---|---|
Constant | -8.4761 | 0.5007 | -16.93 | 0.000 |
logL | 3.4311 | 0.1330 | 25.80 | 0.000 |
Analysis of Variance
Source | DF | SS | MS | F | P |
---|---|---|---|---|---|
Regression | 1 | 10.064 | 10.064 | 665.81 | 0.000 |
Residual Error | 13 | 0.196 | 0.015 | ||
Total |
14 | 10.260 |
|
Easy as pie! Minitab tells us that the test statistic is \(t=25.80\) (in blue) with a \(p\)-value (0.000) that is less than 0.001. Because the \(p\)-value is less than 0.05, we reject the null hypothesis at the 0.05 level. There is sufficient evidence to conclude that the slope parameter does not equal 0. That is, there is sufficient evidence, at the 0.05 level, to conclude that there is a linear relationship, among the population of alligators, between the log length and log weight.
Of course, since we are learning this material for just the first time, perhaps we could go through the calculation of the test statistic at least once. Letting Minitab do some of the dirtier calculations for us, such as calculating:
\(\sum(x_i-\bar{x})^2=0.8548\)
as well as determining that \(MSE=0.015\) and that the slope estimate = 3.4311, we get:
\(t=\dfrac{\hat{\beta}-\beta_0}{\sqrt{\frac{MSE}{\sum(x_i-\bar{x})^2}}}=\dfrac{3.4311-0}{\sqrt{0.015/0.8548}}=25.9\)
which is the test statistic that Minitab calculated... well, with just a bit of round-off error.