HUDM5126 Ji Wu HW5 Oct 22nd ,2021 Question1 a) The correlation matrix indicates that x_1 has comparatively strong positive relationship with the brand liking (y_i).While x_2 is not highly correlated to the y_i. b) We can have Y= 37.650 + 4.425*x_1 + 4.375*x_2.b1 here means every one unit increase in x_1,the predicted Y value would increase by 4.425 and vice versa. c) From the plot,we can conclude that it is normally distributed and no outliers observed. d) We can observe that only X_1X_2 skewed to the right ,Yhat, X_1,X_2 and residuals are normally distributed. e) Null Hypothesis (H0): Homoscedasticity is present (the residuals are distributed with equal variance) Alternative Hypothesis (HA): Heteroscedasticity is present (the residuals are not distributed with equal variance) We have P-value 0.3599>0.01 We can’t reject H0.Thus,constant variance assumption holds here. Question2 a) b) c) d) e) f) (Yh)hat=53.84715 g) Question3 a) SSR(X4) = 67.775,DF=1 SSR(X1|X4) = 42.275,DF=1 SSR(X2|X1, X4) = 27.857,DF=1 SSR(X3|X1, X2, X4) = 0.420,DF=1 SSE(X1, X2, X3, X4) = 98.231,DF=76 b) Hypothesis: Ho: β3 = 0 Ha: β3 ≠0. We can obtain the F* value from lm(y ~ x_1+x_2+x_4+x_3).And the F*=0.3248 Also,the corresponding p-value here =0.570446 By looking up at the F-distribution table, with α = 0.01 and DF=1,DF2=76, F =6.980578>F* Thus we can’t reject Ho,Ho still holds here.Which means X3 is not significant if x1,x2 and x4 are already included in the regression model. Question4 Know that SSTO=236.5575 R2Y4=SSR(X4)/SSTO=67.775/236.5575=0.28651 R2Y1=SSR(X1)/SSTO=14.819/236.5575=0.06264 R2Y1|4=SSR(X1|X4)/SSE(X4)=42.275/168.782=0.25047 R214=SSR(X1,X4)/SSTO=(67.775+42.275)/236.5575=0.46521 R2Y2|14=SSR(X2|X1,X4)/SSE(X1,X4)=27.857/126.508=0.22020 R2Y3|124=SSR(X3|X1,X2,X4)/SSE(X1,X2,X4)=0.420/98.650=0.00426 R2=SSR/SSTO=(14.819+72.802+50.287+0.420)/236.5575=0.58475 The degree of marginal linear association between Y and X1 I think is increased when we did the adjustment for the X4. R Script
欢迎咨询51作业君