In: Statistics and Probability
You may need to use the appropriate technology to answer this question.
Consider the following data for a dependent variable y and two independent variables,
x1
and
x2.
x1 |
x2 |
y |
---|---|---|
30 | 12 | 93 |
47 | 10 | 108 |
25 | 17 | 112 |
51 | 16 | 178 |
40 | 5 | 94 |
51 | 19 | 175 |
74 | 7 | 170 |
36 | 12 | 117 |
59 | 13 | 142 |
76 | 16 | 212 |
The estimated regression equation for these data is
ŷ = −19.56 + 2.03x1 + 4.76x2.
Here, SST = 15,418.9, SSR = 14,275.9,
sb1 = 0.2485,
and
sb2 = 0.9536.
(a)
Test for a significant relationship among
x1, x2, and y.
Use α = 0.05.
State the null and alternative hypotheses.
H0: β1 ≠ 0 and
β2 ≠ 0
Ha: One or more of the parameters is equal to
zero.H0: β1 =
β2 = 0
Ha: One or more of the parameters is not equal
to zero. H0:
β1 ≠ 0 and β2 = 0
Ha: β1 = 0 and
β2 ≠ 0H0:
β1 > β2
Ha: β1 ≤
β2H0:
β1 < β2
Ha: β1 ≥
β2
Find the value of the test statistic. (Round your answer to two decimal places.)
Find the p-value. (Round your answer to three decimal places.)
p-value =
State your conclusion.
Do not reject H0. There is insufficient evidence to conclude that there is a significant relationship among the variables.Do not reject H0. There is sufficient evidence to conclude that there is a significant relationship among the variables. Reject H0. There is sufficient evidence to conclude that there is a significant relationship among the variables.Reject H0. There is insufficient evidence to conclude that there is a significant relationship among the variables.
(b)
Is
β1
significant? Use α = 0.05.
State the null and alternative hypotheses.
H0: β1 ≠ 0
Ha: β1 =
0H0: β1 > 0
Ha: β1 ≤
0 H0:
β1 = 0
Ha: β1 >
0H0: β1 < 0
Ha: β1 ≥
0H0: β1 = 0
Ha: β1 ≠ 0
Find the value of the test statistic. (Round your answer to two decimal places.)
Find the p-value. (Round your answer to three decimal places.)
p-value =
State your conclusion.
Reject H0. There is insufficient evidence to conclude that β1 is significant.Do not reject H0. There is sufficient evidence to conclude that β1 is significant. Reject H0. There is sufficient evidence to conclude that β1 is significant.Do not reject H0. There is insufficient evidence to conclude that β1 is significant.
(c)
Is
β2
significant? Use α = 0.05.
State the null and alternative hypotheses.
H0: β2 = 0
Ha: β2 >
0H0: β2 = 0
Ha: β2 ≠
0 H0:
β2 > 0
Ha: β2 ≤
0H0: β2 ≠ 0
Ha: β2 =
0H0: β2 < 0
Ha: β2 ≥ 0
Find the value of the test statistic. (Round your answer to two decimal places.)
Find the p-value. (Round your answer to three decimal places.)
p-value =
State your conclusion.
Reject H0. There is sufficient evidence to conclude that β2 is significant.Do not reject H0. There is sufficient evidence to conclude that β2 is significant. Do not reject H0. There is insufficient evidence to conclude that β2 is significant.Reject H0. There is insufficient evidence to conclude that β2 is significant.
Solution:
Performmultiple regression In Rstudio:
Use lm function in R to fit Y on x1 and x2
coeffcients function to get the coeffcients
Summary function to get t,p values
Rcode:
df1 =read.table(header = TRUE, text ="
x1 x2 y
30 12 93
47 10 108
25 17 112
51 16 178
40 5 94
51 19 175
74 7 170
36 12 117
59 13 142
76 16 212
"
)
df1
linreg=lm(y~x1+x2 ,data=df1)
coefficients(linreg)
summary(linreg)
Output:
> coefficients(linreg)
(Intercept) x1 x2
-19.562591 2.027889 4.763688
> summary(linreg)
Call:
lm(formula = y ~ x1 + x2, data = df1)
Residuals:
Min 1Q Median 3Q Max
-20.0108 -4.1081 0.9271 6.3340 17.9213
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) -19.5626 18.0685 -1.083 0.31483
x1 2.0279 0.2485 8.162 8.02e-05 ***
x2 4.7637 0.9536 4.996 0.00157 **
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 12.78 on 7 degrees of freedom
Multiple R-squared: 0.9259, Adjusted R-squared:
0.9047
F-statistic: 43.71 on 2 and 7 DF, p-value: 0.0001109
ANSWER(A)
H0: β1 = β2 = 0
Ha: One or more of the parameters is not equal to
zero.
F=43.71
p-value: 0.000
p<0.05,Reject Ho
Reject H0. There is sufficient evidence to conclude that there is a significant relationship among the variables.R
ANSWER(B)
H0: β1 = 0
Ha: β1 ≠ 0
t=8.16
p=0.000
p<0.05
Reject Ho
Reject H0. There is sufficient evidence to conclude that β1 is significant.
ANSWER(C)
H0: β2 = 0
Ha: β2 ≠ 0
value of the test statistic=T=5.00
p- value= 0.002
Reject H0. There is sufficient evidence to conclude that β2 is significant