CS计算机代考程序代写 Homework #1 Solution

Homework #1 Solution
Use the data below to calculate the requested regression results by hand y x1 x2 x3
107 1 1 1 75.8 9 3 -1 66.6 9 3 -3 70.4 1 -1 -3 59.5 9 -3 3
105 1 -1 3 94.6 1 1 -1 81.5 1 -1 -1
88 1 1 -3 96.4 9 3 3 29.2 9 -3 -3
46 9 -3 -1 107.2 1 1 3 58.9 9 -3 1 97.9 1 -1 1 79.7 9 3 1
1) Estimate the parameters of a regression model that relates x1, x2, and x3 to y. y=β0 +β1×1 +β2×2 +β3×3 +ε
We need to estimate β0, β1, β2, and β3.
−1 β=(X′X) X′Y
ˆ
16 80 0 0
80 656 0 0 X′X =   0 0 80 0
0 0 0 80 
656/4096 −80/4096 0 0 
−80/4096 16/4096 0 0  (X′X)−1 =  0 01/800
0 0 01/80 
1263.7 
5360.5 X′Y =    416.7 
 387.3  

ˆ −1   β=(X′X) X′Y=5.2088
97.6922 −3.7422
 4.8413  
So βˆ0 =97.6922, βˆ1 =-3.7422, βˆ2 =5.2088, βˆ3 =4.8413
2) Test for the significance of the regression model using the analysis of variance.
Interpret the test at the 5% significance level. What is your conclusion? ANAVA Table
Source SS
df MS F
Regression
ˆ
(∑y)2
SSR = β′X′Y −
n
=107439.11-(1263.7)2/16 =7630.51
dfR=k =3
MSR=SSR/dfR =2543.50
Fobs=MSR/MSE =147.36
Error
SSE = Y′Y − β′X′Y
=107646.17-107439.11 =207.06
ˆ
dfE=n-k-1 =12
MSE=SSE/dfE =17.26
Total SST=SSR+SSE dfT=n-1 =7837.57 =15
F-test:
H0:βj =0,∀j=1,….3
H1: βj ≠ 0,for some j
Here, we get Fobs=147.36> F0.05,3,12=3.49. Therefore, we reject H0, that is to say, at least
one of the variables x1, x2 , x3 does contribute significantly to the model.
3) Test for the significance of the individual the coefficients using t tests. Interpret the
tests at the 5% significance level. What are your conclusions? t-test for x1
H0: β1 = 0 H1: β1 ≠ 0
tobs =
ˆ β1
=
−3.7422 =−14.41 17.26 * (16 / 4096)
( ˆ Var β
1
)
|tobs|=14.41> t0.025,12=2.179 (α = 0.05)
So we reject H0. That is to say, x1 does contribute significantly to the model.

t-test for x2 H0: β2 =0
H1: β2 ≠ 0
ˆ β2
2
H1: β3 ≠ 0
tobs = β3 =
t-test for x3 H0: β3 =0
ˆ
4.8413 =10.42 17.26*(1/80)
= 5.2088
(ˆ 17.26*(1/80)
tobs =
So we reject H0. That is to say, x2 does contribute significantly to the model.
=11.21 |tobs|=11.21> t0.025,12=2.179 (α = 0.05 )
Var β
)
Var β (ˆ )
3
|tobs|=10.42> t0.025,12=2.179 (α = 0.05)
So we reject H0. That is to say, x3 does contribute significantly to the model.
From the above three t-test, we know none of the variables x1, x2, x3 can be deleted from the model.