Hypothesis Testing for Linear Regression

Hypothesis Testing for Linear Regression
We can assess the linear regression model to determine if there is a significant linear relationship between X and Y. Specifically, we test the slope β1.
If there is no linear relationship betweenX and Y, then:
- The regression line will be horizontal with the slope β1=0.
- That means Y does not change when X changes.
- There is no significant (linear) relationship between X and Y .
As such, the hypotheses for testing the slope are:
Ho:β1=0 There is no linear relationship.”
Ha:β1=0 There is a linear relationship.” →negative or positive (two-sided test)
Note: We almost always conduct two-sided tests when testing β1 although it is not odd to ask the following:
“Is there a positive linear relationship?”
Ho:β1≤0 “There is not a positive linear relationship.”
Ha:β1>0 “There is a positive linear relationship.” (one-sided test)
“Is there a negative linear relationship?”
Ho:β1≥0 “There is not a negative linear relationship.”
Ha:β1<0 “There is a negative linear relationship.” (one-sided test)
Recap of t-table:

T-Test for Slope
A regression model is useful when X and Y have a statistically significant relationship that is either a positive or a negative relationship. In other words, we test if the β1 coefficient is significantly different from zero.
To test the significance of the slope coefficient, we must perform a t-test:
Test statistic
where SE(b1) the is standard error of the slope b1:
Degrees of freedom
df=n−k−1
df=n−(k+1)

Example: Hypothesis Testing for Linear Regression
We want to see if there is a relationship between how many hours a student studies the day before the exam and the exam grade. We randomly sampled 8 students.

(a) What is the explanatory variable?
Hours of study Grade
Hours of study
(b) What is the response variable?
Hours of study Grade
Grade
(c) Before we test the linear model for the relationship between grade and number of hours of studying, state the hypotheses.
Ho: β1=0 "There is no linear relationship."
Ha: β1=0"There is a linear relationship"
(d) Is this a one-sided or two-sided test?
One-sided Two-sided
Two-tailed test
This is the output for the linear model:

(e) Write down the numeric values for the following:
bo= ________
b1= ________
SE(b1)= ________
(f) What is the simple linear regression equation?
y^=48.56+3.599x
(g) Interpret the Hours coefficient.
Each additional hour of studying ________ grade by ________ percent, on average.
Each (one) hour of studying increases grade by 3.599 percent, on average.
(Do not just say that it is the slope!)
(h) What is the test statistic?
t=SE(b1)b1=1.029783.59864=3.495
(i) What’s the df?
df=n−k−1=8−1−1=6
(j) What is the p-value?
Using t-table: p-value is between 0.01 and 0.02.
Using software: p-value = 0.013

(n) At the 5% significance level, is there evidence of a linear relationship between grade and hours of studying?
We reject/fail to reject Ho; we conclude that studying does/does not contain information that can be used to predict grade.
The p-value is less than α=0.05 We reject Ho and conclude that there is a linear relationship between grade and hours of studying.

Example: Hypothesis Testing for Linear Regression (Sxy, Sxx, Syy Method)
Savage Question!
A company is examining if there is a relationship between how much revenue a store generates (in $ million) and the average years of service of a store's employees.
x= average years of service of a store's employees
y= sales revenue (in $ million)

The following summary is provided:
∑x=43
∑x2=222.44
∑y=330
∑y2=13244
∑xy=1669
At the 5% significance level, test for the significance of the linear relationship between x and y.
Ho:β1=0 There is no linear relationship.”
Ha:β1=0 There is a linear relationship.”
Test statistic:
where SE(b1) the is standard error of the slope b1:
First, we need to solve for the slope coefficient b1:
b1=SSxxSSxy
SSxy=∑xiyi−n(∑xi)(∑yi)
SSxy=1669−10(43)(330)=250
SSxx=∑xi2−n(∑xi)2
SSxx=222.44−10(43)2=37.54
b1=SSxxSSxy=37.54250=6.66
For SE(b1), we need to find Se:
se=n−k−1SSE
Se requires SSE...
SSE=SSyy−SSxx(SSxy)2
SSE requires SSxx, SSyy, and SSxy...
We already have:
SSxx=37.54
SSxy=250
Find SSyy:
SSyy=∑yi2−n(∑yi)2
SSyy=13244−10(330)2=2354
SSE=SSyy−SSxxSSxy2=2354−37.54(250)2=690
Se=n−k−1SSE=10−1−1690=9.29
SE(b1)=SSxxSe=37.549.29=1.516
t=SE(b1)b1=1.5166.66=4.39
Ho:β1=0 There is no linear relationship.”
Ha:β1=0 There is a linear relationship.” (2-tail test)
The null hypothesis Ho that there is no significant relationship between x and y is rejected if:
- |t-score| > |critical value|
- the p-value < significance level (5%)
df=n−k−1=10−1−1=8
CV=2.306
t=4.49>CV
0.002 < p-value < 0.01
p-value is less than the significance level (0.05)
Reject Ho, there is a significant linear relationship between the average years of service and revenue.
T-table:

