Docsity

Examples on Data Analysis I with Solution - Homework 6 | STAT 704, Assignments of Statistics

Toggle sidebar
bg1
STAT 704 HW 6 example solutions
7.2, 7.8, 7.22, 7.23, 7.24, 7.28(b), 7.31, 10.18, 8.3, 8.8(a,b,c), 8.11,
8.29, 9.3, 9.4, 9.5, 9.8, 9.10(c), 9.11, 9.18, 9.21.
7.2) SSR(X1) is an extra sum of squares in the sense that it measures the reduction in SSE from
adding X1 to a model having no predictors at all.
7.8) We test H0: 2 = 3 = 0 versus Ha: 2 and 3 not both zero. From SAS, F* = 10.94.
Since F* > F(.99, 2, 76) = 4.9, we reject H0 and conclude X2 and X3 cannot both be dropped. The P-
value is less than 0.0001.
7.22) The addition of the other four predictors could have resulted in a model with
multicollinearity. This could inflate the standard errors of the estimated coefficients, causing
many of them to be non-significant. However, the predictive ability of the model would not be
hampered by the multicollinearity. In general, when extraneous predictors are added to a model,
the model’s predictions will not be worsened (and may even be improved), but the model and the
coefficients will be more difficult to meaningfully interpret.
7.23) If the only goal of the analysis was to make predictions and estimations about the response,
then this comment is reasonable. But if the authors wanted to determine the specific nature of
each predictor’s effect on the response, then the problem mentioned is critical.
7.24) a) Estimated regression equation for SLR model:
.425.4775.50
ˆ
1
XY
(b) The value of b1 is exactly the same in the SLR model as in the MLR model from 6.5(b).
(c) From SAS, SSR(X1) = 1566.45. And SSR(X1 | X2) = SSE(X2) – SSE(X1, X2) = 1660.75 –
94.3 = 1566.45, exactly the same.
(d) From the correlation matrix, we note that X1 and X2 are uncorrelated. This implies that the
effect of X1 on the response is the same whether or not X2 is in the model.
7.28) (b) For the first test, it is SSR(X5 | X1, X2, X3, X4), the difference between the SSE of a
model with X1, X2, X3, X4 and the SSE of a model with all five predictors.
For the second test, it is SSR(X2, X4 | X1, X3, X5), the difference between the SSE of a model with
X1, X3, X5 and the SSE of a model with all five predictors.
7.31) (1) Reduced model:
iiii
XXY
22110
(2) Reduced model:
iiiii
XXXY
3422110
(3) Reduced model:
iiiiiii
XXXXXY
34213210
55
(4) Reduced model:
iiiiiii
XXXXXY
321322110
7
10.18) (a) The scatter plot shows some possible mild correlation between X2 and X3 and little
else. The correlation matrix reveals that each pair of predictors has quite weak sample
correlation.
(b) All VIFs are near 1, so there is not a serious multicollinearity problem here.
8.3) (a) The criticism is probably correct. If we fit a very high-order polynomial to any data set,
we can get a curve that comes very close to the data. But it’s unlikely that the true trend is so
complicated – the high-order curve is probably just “following the noise, not the signal.”
(b) Yes. Since adjusted R2 penalizes the number of terms in the model, it might be relatively low
for the high-order model having many extraneous terms.
pf3

Partial preview of the text

Download Examples on Data Analysis I with Solution - Homework 6 | STAT 704 and more Assignments Statistics in PDF only on Docsity!

STAT 704 HW 6 example solutions 7.2, 7.8, 7.22, 7.23, 7.24, 7.28(b), 7.31, 10.18, 8.3, 8.8(a,b,c), 8.11, 8.29, 9.3, 9.4, 9.5, 9.8, 9.10(c), 9.11, 9.18, 9.21. 7.2) SSR(X 1 ) is an extra sum of squares in the sense that it measures the reduction in SSE from adding X 1 to a model having no predictors at all. 7.8) We test H 0 :  2 =  3 = 0 versus Ha:  2 and  3 not both zero. From SAS, F* = 10.94. Since F* > F(.99, 2, 76) = 4.9, we reject H 0 and conclude X 2 and X 3 cannot both be dropped. The P- value is less than 0.0001. 7.22) The addition of the other four predictors could have resulted in a model with multicollinearity. This could inflate the standard errors of the estimated coefficients, causing many of them to be non-significant. However, the predictive ability of the model would not be hampered by the multicollinearity. In general, when extraneous predictors are added to a model, the model’s predictions will not be worsened (and may even be improved), but the model and the coefficients will be more difficult to meaningfully interpret. 7.23) If the only goal of the analysis was to make predictions and estimations about the response, then this comment is reasonable. But if the authors wanted to determine the specific nature of each predictor’s effect on the response, then the problem mentioned is critical. 7.24) a) Estimated regression equation for SLR model: (^) Y ˆ^  50. 775  4. 425 X 1. (b) The value of b 1 is exactly the same in the SLR model as in the MLR model from 6.5(b). (c) From SAS, SSR(X 1 ) = 1566.45. And SSR(X 1 | X 2 ) = SSE(X 2 ) – SSE(X 1 , X 2 ) = 1660.75 – 94.3 = 1566.45, exactly the same. (d) From the correlation matrix, we note that X 1 and X 2 are uncorrelated. This implies that the effect of X 1 on the response is the same whether or not X 2 is in the model. 7.28) (b) For the first test, it is SSR(X 5 | X 1 , X 2 , X 3 , X 4 ), the difference between the SSE of a model with X 1 , X 2 , X 3 , X 4 and the SSE of a model with all five predictors. For the second test, it is SSR(X 2 , X 4 | X 1 , X 3 , X 5 ), the difference between the SSE of a model with X 1 , X 3 , X 5 and the SSE of a model with all five predictors. 7.31) (1) Reduced model: Yi ^ ^0 ^  1 Xi 1 ^  2 Xi 2 ^  i (2) Reduced model: Yi ^ ^0 ^  1 Xi 1 ^  2 Xi 2 ^  4 Xi 3 ^  i (3) Reduced model: Yi ^ ^0 ^5 Xi 1 ^5 Xi 2 ^  3 Xi 1 Xi 2 ^  4 Xi 3 ^  i (4) Reduced model: Yi ^ ^0 ^  1 Xi 1 ^  2 Xi 2 ^  3 Xi 1 Xi 2 ^7 Xi 3 ^  i 10.18) (a) The scatter plot shows some possible mild correlation between X 2 and X 3 and little else. The correlation matrix reveals that each pair of predictors has quite weak sample correlation. (b) All VIFs are near 1, so there is not a serious multicollinearity problem here. 8.3) (a) The criticism is probably correct. If we fit a very high-order polynomial to any data set, we can get a curve that comes very close to the data. But it’s unlikely that the true trend is so complicated – the high-order curve is probably just “following the noise, not the signal.” (b) Yes. Since adjusted R^2 penalizes the number of terms in the model, it might be relatively low for the high-order model having many extraneous terms.

8.8) a) Estimated regression equation: Y ˆ^  10. 189  0. 182 x 1  0. 014 x 12  0. 314 X 2  0. 000008 X 4 .Based on the R^2 of 0.61, the fit seems decent although not spectacular. See plot of Y vs. (^) Y ˆ^ (with 45-degree line) on last page, which shows the observed response values are generally similar to the model’s predicted response values. b) From SAS, Ra^2 = 0.5927. This measures the proportion of sample variability in rental rates explained by this model, penalizing the number of parameters in the model. c) If we test H 0 :  2 = 0 against H 0 :  2 ≠ 0 with a t-test, SAS gives the P-value of this test as 0.0174. Since 0.0174 < 0.05, we reject H 0 and conclude that the quadratic term should remain in the model. (We could also have done an F-test, using the TEST statement in SAS.) 8.11) a) Estimated regression equation: Y ˆ^  27. 15  5. 925 X 1  7. 875 X 2  0. 5 X 1 X 2. b) We can do a t-test of H 0 :  3 = 0 against H 0 :  3 ≠ 0; SAS gives the P-value of this test as 0.0975. Since 0.0975 > 0.05, so we fail to reject H 0. The interaction term may be dropped from the model. (We could also have done an F-test, using the TEST statement in SAS.) 8.29) Relevant R output:

set.1.X <- c(1.0,1.5,1.1,1.3,1.9,.8,1.2,1.4) set.1.x <- set.1.X - mean(set.1.X) set.2.X <- c(12,1,123,17,415,71,283,38) set.2.x <- set.2.X - mean(set.2.X) cor(set.1.X, (set.1.X)^2)

[1] 0.

cor(set.1.x, (set.1.x)^2) [1] 0. cor(set.2.X, (set.2.X)^2) [1] 0. cor(set.2.x, (set.2.x)^2) [1] 0. cor(set.1.X, (set.1.X)^3) [1] 0. cor(set.1.x, (set.1.x)^3) [1] 0. cor(set.2.X, (set.2.X)^3) [1] 0. cor(set.2.x, (set.2.x)^3) [1] 0. In each case, the correlation between the centered x-values and their powers is smaller than the correlation between the original X-values and their powers. However, we see the reduction in correlation from centering is much more pronounced when the X’s are closely spaced (as in Set

  1. than when they are widely varying (as in Set 2). 9.3) a) The two types of summers represent different populations in a sense, so we could do two separate regressions. But a better solution would be to include a variable measuring temperature (or which summer each observation came from), so that the regression model could account for this factor. b) No. While we hope our set of predictors is strongly associated with the response, we cannot assume a causal relationship. 9.4) Using a relatively small -to-enter value will ensure that not many unimportant variables will be included in the model. Using a relatively large -to-enter value will ensure that not many important variables will be excluded from the model. 9.5) If this is true, we could have a variable (whose P-value is between -to-enter and -to-leave) continually entering the model and leaving the model in successive steps.