Practice_Quiz3

advertisement
NCSU ST512 – Sum2 2011
Quiz 3 Practice
The following exercises were taken from Dr. D. Dickey WEB site for ST512
http://www.stat.ncsu.edu/people/dickey/courses/st512/
1. A multiple regression equation
Yt = Beta0 + Betal Xlt + Beta2 X2t + Beta3 X3t + et
is fit to some data.
df
We obtain:
Sum of Squares
Type I
Type II
Xl
l
l80
X2
l
90
l00
X3
l
50
50
20
300
Error
+
:
:
-1 :
(X'X) = :
:
:
:
+
40
.03
.05
.04
.05
.30
.20
.04
.20
.48
.01
.l2
.l0
+
.0l :
:
.l2 :
:
.l0 :
:
.0l :
+
Give, if possible, the computed F statistic for testing:
(a)
H0:
Beta2 = Beta3 = 0
F =
(b)
H0:
Beta2 = 0
F =
(c)
H0:
Beta1 = Beta3 = 0
F =
2. I ran a regression of Y on X1, X2, X3, X4 and X5 to estimate the
parameters of this model:
Y = beta_0 + beta_1 X1 + beta_2 X2 + beta_3 X3 + beta_4 X4 + beta_5 X5 + e
PROC REG gave me this fitted model
^
Y = 50 + 3 X1 + 5 X2 - 4 X3 + 2 X4 + 7 X5
and these sums of squares and error mean square:
intercept
X1
X2
X3
X4
X5
Type I SS
10000
800
600
200
150
50
Type II SS
5000
550
350
220
110
50
MSE = 100 with 20 degrees of freedom.
a) Compute the overall model F test (as PROC REG does)
F = _________
b) Write down the hypothesis being tested.
ST512
SUMMER2 jul19 2011
1
NCSU ST512 – Sum2 2011
Quiz 3 Practice
3) I have 2 replicates for each of 4 treatments A, B, C, and D in a
completely randomized design.
a) Fill blanks in X matrix, Use dummy variables to identify each
treatment. Note that X matrix is such that X’X matrix is nonsingular
(i.e., it has an inverse).
A
1
__
__
__
A
1
__
__
__
B
1
__
__
__
1
__
__
__
C
1
__
__
__
C
1
__
__
__
D
1
__
__
__
D
1
__
__
__
B
X =
Instead of PROC REG, I ran this:
PROC GLM; CLASS TRT; MODEL Y = TRT/ SOLUTION;
and here is part of my output:
Source
TRT
DF
3
Parameter
Type III SS
156.00000
Estimate
INTERCEPT
TRT
A
B
C
D
29.00000000
-9.00000000
-2.00000000
3.00000000
0.00000000
B
B
B
B
B
Mean Square
52.00000
F Value
5.78
Pr > F
0.0616
T for H0:
Parameter=0
Pr > |T|
Std Error of
Estimate
13.67
-3.00
-0.67
1.00
.
0.0002
0.0399
0.5415
0.3739
.
2.12132034
3.00000000
3.00000000
3.00000000
.
NOTE: The X'X matrix has been found to be singular and a generalized
inverse was used to solve the normal equations.
Estimates
followed by the letter 'B' are biased, and are not unique
estimators of the parameters.
_
_
2
_
(a) Compute, if possible, sum of (Yi. - Y..) where Yi. is the ith
treatment mean, as usual.
(b) Compute the predicted mean value for each treatment. Calculate
the standard error of the mean
ST512
SUMMER2 jul19 2011
2
NCSU ST512 – Sum2 2011
Quiz 3 Practice
4) On the next page is the output from a PROC REG run. You can see that I
have a dependent variable Y and 3 explanatory variables W, X, and Z so I
am fitting a model of the form
Y = B0 + B1 W + B2 X + B3 Z + e
-1
Below the printout are the usual matrices X'X,
need them.
X'Y, and (X'X)
in case you
a) Fill in the blanks in the regression printout.
b) I see Prob>F listed as 0.0001. In terms of my parameters B0, B1, B2,
and B3, what hypothesis is being tested by this F
H0: ________________________________
and what do I decide about that hypothesis?
(Reject, do not reject)
c) My obnoxious friend notices that all the P-values of my t-tests exceed
0.05, for example 0.2847 > 0.05 for variable W. She states that none
of my coefficients is significant and thus I have failed to find any
important explanatory variable to explain the variation in Y. How
should I reply to her accusation? Is there some flaw in her arguments?
d) If I omit W from the model and regress Y on just X and Z with an
intercept, what will be my new error sum of squares ________
e) My model tells me something about the population of Ys having X=12,
W=12, and Z=12 and about the population of Ys having X=12, W=12, and
Z=10 (so only Z is different).
f) If possible, estimate the difference in the means of these populations
_____________ and estimate the variances of the two populations
______________
============================== PROC REG output ==============================
Model: MODEL1
Dependent Variable: Y
Analysis of Variance
Source
DF
Model
Error
C Total
Sum of
Squares
(__) 20705.45989
(__)
499.74011
19 21205.20000
Root MSE
Dep Mean
C.V.
5.58872
202.80000
2.75578
Mean
Square
(__________)
31.23376
R-square
F Value
Prob>F
(______)
0.0001
.9764
Parameter Estimates
ST512
Variable
DF
Parameter
Estimate
Standard
Error
T for H0:
Parameter=0
Prob > |T|
INTERCEP
1
1.818409
11.94605523
0.152
0.8809
SUMMER2 jul19 2011
3
NCSU ST512 – Sum2 2011
W
X
Z
1
1
1
=====================
X'X =
-1
(X'X)
ST512
|
|
|
|
20
399
1209
1613
| 4.5690
| -0.4901
| -0.4067
| 0.3700
3.586294
5.023960
-2.160736
Quiz 3 Practice
3.23983701
(___________)
3.12524165
Some Matrices
399
8213
23878
32195
-0.4901
0.3361
0.3269
-0.3221
1209
23878
75835
100046
-0.4067
0.3269
0.3218
-0.3170
1.107
XXXXXX
-0.691
0.2847
0.1326
0.4992
===============================
1613
32195
100046
132683
0.3700
-0.3221
-0.3170
0.3127
SUMMER2 jul19 2011
|
|
|
|
X'Y =
|
4056 |
| 80577 |
| 252651 |
| 334328 |
|
|
|
|
4
Download