Escolar Documentos
Profissional Documentos
Cultura Documentos
2014-15 Term 2
Assignment #2 Solutions
Problem 1:
'Y
) tr E X(X' X) 1 X' Y ' X(X' X) 1 X' Y
E (Y
tr ( E ( Y' X(X' X) 1 X' X(X' X) 1 X' Y ))
(a)
(b) E (Y' Y) tr( E (' X' X e'e 2X' ' e)) tr(' X' X 2 I n 0) ' X' X tr( 2 I n ) ' X' X n 2
Hence, E(Y' Y) XX ( p 1) 2 (n p 1) 2 E(Y ' Y ) E(e' e ) .
Problem 2: (Please refer to the R codes at the last page)
(a)
(b) R outputs: 0 36.8759, 1 0.5821, 2 8.4562 71.5039 , SE ( 0 ) 64.4728, SE ( 1 ) 0.3892
(c) R outputs:
Df
Sum Sq
Mean Sq
F value Pr(>F)
x
1
159.95
159.947
2.237 0.1731
Residuals
8
572.01
71.502
Hypotheses: H0: y= 0 vs H1: y= 0 + 1x
Decision: Since p-value =Pr(F1,8 >2.237)=0.1731>0.05, we do not reject H0 at =0.05.
Conclusion: We do not have sufficient evidence that the response and the predictor are dependent.
(d) R outputs:
Estimate
0.5821
Std. Error
0.3892
t value Pr(>|t|)
1.496
0.173
1/ 2
1 ( x x )2
0 1 x t8,0.025
SXX
n
(53.94598, 66.49078).
1/ 2
1 ( x x )2
0 1 x* t8,0.005 1 *
SXX
n
(30.41346, 90.02330)
Problem 3:
1
3
y1 y2 y3
y,
3
1 1 1
1
2
2
2
1 1 , Y' (I H)Y (2Y1 2Y2 2Y3 2Y1Y2 2Y1Y3 2Y2Y3 )
3
3
1 1 1
1
E ( 2Y12 2Y22 2Y32 2Y1Y2 2Y1Y3 2Y2Y3 )
3
1
2(3 2 2 ) 2(1 ( 1) 2 ) 2(1 12 ) 2( 1 2( 1)) 2(0 2(1)) 2(0 ( 1)1)
3
(14 4 4 6 4 2) / 3 26 / 3
E[Y' (I H)Y ]
(c)
2
E ( YY' ) E (Y1Y2 ) E (Y2 ) E (Y2Y3 ) 1 ( 1)( 2)
1 ( 1) 2
0 ( 1)(1) 3 2 1
2
E (Y1Y3 ) E (Y2Y3 ) E (Y32 ) 0 ( 2)(1)
2 1 2
0
1
)(
1
)
1
2 1 1 7 3 2
15 7 3
1
1
( I H) E ( YY' ) 1 2 1 3 2 1 15 8 6 ,
3
1 3
1 1 2 2 1 2
0
15 8 3 26
3
3
Problem 4:
(a) From the R Codes, SYY=517.875, RSS=145.0752, SSreg=372.7998, 2 =29.01503. R2= 0.7198
16.5784
10.1144 ,
8.3464
21.88235
0.88235
32.49020
7.49020
23.65033
4.65033
17.35213 21.05012
24.74812
21.88235
2.11765
Y
,
e
,
V
ar
(
17
.
35213
41.62614 43.99665
28.95425
7.04575
10.0000
0.00000
df
1
SS
42.98
MS
42.98
Residual
Total
5
6
145.07
188.05
29.014
F0
1.4814
p-value
0.2779
Page 3/4
Page 4/4