Вы находитесь на странице: 1из 14

- 1. 1. [01.09.

2014]

1. .
1. Yi = + 1 xi1 + 2 xi 2 + i , i = 1,..., n ,
Y = X + , = [

1 2 ] . ,
T

E ( ) = 0 V ( ) = 2 I . Y X :
1
2

Y = 3 ;

4
5

1
1

X = 1

1
1

0
0
0
1
1

0
0
0 .

0
1


1/3 1/ 3 0
5 2 1
1

T
X X = 2 2 1 ( X X ) = 1/ 3 4 / 3 1 .
1 1 1
0
2
1
T

A. .
B. ( ).

C. TSS = i =1 Yi Y
n

D.

.
E. 5 - , 5- ?

F. RSS = i =1 Yi Yi .
n

G. R 2 ?

.
H. ,

2 .

( )

I. V -

( )
K. D ( ) - .
J. D - .
1

. . .

- 1. 1. [01.09.2014]

( )
M. cov ( , ) -

L. cov , 1 - 1 .
2

2 .

N. cov 1 , 2 - 1

2 .

(
)
P. D ( ) .
Q. D ( + + ) .
R. D ( + + 2 ) .
S. corr ( , ) -
O. D 1 + 2 .
1

2 .
T. s - 1 .
1

2. Yi = + 1 xi1 + 2 xi 2 + i , i = 1,..., n ,

Y = X + , = [

1 2 ] . ,
T

E ( ) = 0 V ( ) = 2 I . Y X :

1
2

Y = 3 ;

4
5

1
1

X = 1

1
1

0
0
1
1
1

0
0
0 .

0
1


0.5 -0.5 0.0
5 3 1
1

T
X X = 3 3 1 ( X X ) = -0.5 1.0 -0.5 .
1 1 1
0.0 -0.5 1.5
T

A. .
B. ( ).

C. TSS = i =1 Yi Y
n

. . .

- 1. 1. [01.09.2014]
D.

.
E. 5 - , 5- ?

F. RSS = i =1 Yi Yi .
n

G. R 2 ?

.
H. ,

2 .

( )

I. V -

( )
K. D ( ) - .
L. cov ( , ) - .
M. cov ( , ) -
J. D - .
1

2 .

N. cov 1 , 2 - 1

2 .

(
)
P. D ( ) .
Q. D ( + + ) .
R. D ( + + 2 ) .
S. corr ( , ) -
O. D 1 + 2 .
1

2 .
T. s - 1 .
1

. . .

- 1. 1. [01.09.2014]
3. Yi = + 1 xi1 + 2 xi 2 + i , i = 1,..., n ,

Y = X + , = [

1 2 ] . ,
T

E ( ) = 0 V ( ) = 2 I . Y X :

1
2

Y = 3 ;

4
5

1
1

X = 1

1
1

0
0
1
1
1

0
0
1 .

0
0


0.5 -0.5 0.0
5 3 1
1

T
X X = 3 3 1 ( X X ) = -0.5 1.0 -0.5 .
1 1 1
0.0 -0.5 1.5
T

A. .
B. ( ).

C. TSS = i =1 Yi Y
n

D.

.
E. 5 - , 5- ?

F. RSS = i =1 Yi Yi .
n

G. R 2 ?

.
H. ,

2 .

( )

I. V -

( )
K. D ( ) - .
L. cov ( , ) - .
J. D - .
1

. . .

- 1. 1. [01.09.2014]

M. cov , 2 -

2 .
N. cov 1 , 2 - 1

2 .

(
)
P. D ( ) .
Q. D ( + + ) .
R. D ( + + 2 ) .
S. corr ( , ) -
O. D 1 + 2 .
1

2 .
T. s - 1 .
1

4. Yi = + i , i = 1, , n ,

.
5. Yi = xi + i , i = 1, , n ,

.
6. Yi = + xi + i , i = 1, , n ,

.
7.

.
(a) Yi = + xi + i ,
(b) Yi = xi + i ,
(c) ln Yi = + ln xi + i ,
(d) Yi = + xi + i ,
(e) Yi = 1 + xi + i ,
(f) Yi = / xi + i ,
(g) Yi = xi1 + (1 ) xi 2 + i .

. . .

- 1. 1. [01.09.2014]
8. yi = 1 xi1 + 2 xi 2 + i , i = 1, , n .

: Q( 1 , 2 ) := i =1 ( yi 1 xi1 2 xi 2 ) 2 min .
n

1 , 2

= 0,
(a) , Q

0
=
2
x11 x21
y1
1


T
T
X X = X y , X =
, y = = .
2
x

y
n1 xn 2
n
Q
1


(b) = 1 (a). X T X

2
, = ( X T X ) 1 X T y .
n
n xi21
x x

=
=1 i1 i 2
i
1
i
. (a) , X X = n

n
2

x
x
x
i =1 i 2 i1 i =1 i 2
n xi1 yi
i =1
T
.
X y= n

x
y
i =1 i 2 i
9. , Yi = + xi + i , Z i = + xi + i
Y + Z = + x + - = + = + .
T

10. - Yi = + Yi + i .
11. Yi = + (Yi + Z i ) + i , Z i = + (Yi + Z i ) + i
, + = 0 + = 1 .
. Yi + Z i = + (Yi + Z i ) + i
9 10.
12. - , ,
Yi = + xi + i Z i = + xi + i , Z i = 2Yi .
13. Yi = 1 + i , i = 1, , m , RSS1 = q1 ,
Yi = 2 + i , i = m + 1, , n , RSS2 = q2 . RSS Yi = 1 xi1 + 2 xi 2 + i ,

1 i {1, , m}
0 i {1, , m}
i = 1, , n , xi1 =
xi 2 =
.
0 i {m + 1, , n}
1 i {m + 1, , n}
14. Yi = 1 xi1 + 2 xi 2 + i
: Q( 1 , 2 ) := i =1 (Yi 1 xi1 2 xi 2 ) 2 min .
n

1 + 2 =1

15. , a = (a1 , , an ) b = (b1 , , bn )



n
(a) i =1 (ai a ) = 0 ,

(b)
(c)

n
i =1
n
i =1

(ai a )(bi b ) = i =1 (ai a )bi ,


n

(ai a ) 2 = i =1 ( ai a )ai .
n

16. Yi = + i , E i = 0 , D i = 2 , cov( i , j ) = 0 i j .

(a) EY ,
. . .

- 1. 1. [01.09.2014]
(b) D Y ,
n
(c) E 1n i =1 (Yi Y ) 2 .

17. Yi = xi + i , E i = 0 , D i = 2 , cov( i , j ) = 0
i j . E . ?
(a) = Yx11 ,
(b) =
(c) =

1 Y1
2 x1
1
n

+ 12

Y1
x1

Yn
xn

+ + Yxnn ,

(d) = Yx ,
Y Y
(e) = n 1 ,
xn x1

(f) =

1 Y2 Y1
2 x2 x1

+ 12 Yxnn Yxnn11 ,

( xi x )Yi
,
(g) = in=1
i=1( xi x )2
n
( xi x )Yi
(h) = in=1
,
i=1( xi x ) xi
n
xi (Yi Y )
(i) = in=1
,
i=1 xi ( xi x )
n
xi (Yi Y )
(j) = in=1
,
i=1( xi x )2
n
xi (Yi Y )
(k) = in=1
,
i=1 xi ( xi x )
n
( xi x )(Yi Y )
(l) = i=1 n
,
i=1( xi x )2
n
( xi x )(Yi Y )
(m) = i=1 n
,
i=1( xi x )2
n
( xi x )(Y Yi )
,
(n) = i=1 n
i=1( xi x )2
n
n
n
n xiYi ( xi )( Yi )
i =1
i =1
i =1

(o) =
,
2
n
n
n xi2 ( xi )
i =1
i =1
(p) = xY X Y ,
n

X 2 ( X )2

+ nYn
(q) = Yx11 ++22Yx22 ++
+ nxn ,
Y + 2Y ++ nY
(r) = x11 + 2 x22 ++ nxnn ,
i (Yi Y )
,
(s) = in=1
i=1i ( xi x )
n
(t) = 1n i =1 Yxii Yx ,
n

(u) =

1
n 1

Yi Y1
i = 2 xi x1
n

18. Yi = xi + i , E i = 0 , D i = 2 , cov( i , j ) = 0
i j . D .

(a) = Yx11 ,

. . .

- 1. 1. [01.09.2014]
(b) =
(c) =

1 Y1
2 x1
1
n

+ 12

Y1
x1

Yn
xn

+ + Yxnn ,

(d) = Yx ,
Y Y
(e) = n 1 ,
xn x1

( xi x )Yi
,
(f) = in=1
i=1( xi x )2
n
( xi x )Yi
(g) = in=1
,
i=1( xi x ) xi
n
xi (Yi Y )
(h) = i=n1
,
i=1( xi x )2
n
xi (Yi Y )
(i) = in=1
,
i=1 xi ( xi x )
n
( xi x )(Yi Y )
(j) = i=1 n
,
i=1( xi x )2
n
( xi x )(Yi Y )
,
(k) = i=1 n
i=1( xi x )2
n
( xi x )(Y Yi )
,
(l) = i=1 n
i=1( xi x )2
n
n
n
n xiYi ( xi )( Yi )
(m) = i=1 n 2 i=1 n 2i=1 ,
n xi ( xi )
i =1
i =1
xY X Y

,
(n) =
n

X 2 ( X )2

Y + 2Y ++ nY
(o) = x11 + 2 x22 ++ nxnn ,
Y + 2Y ++ nY
(p) = x11 + 2 x22 ++ nxnn ,
i (Yi Y )
,
(q) = in=1
i=1i ( xi x )
n Yi Y1
(r) = 1
.
n

n 1

i = 2 xi x1

19. Yt = t + t , E t = 0 , D t = 2 , cov( t , s ) = 0
t s . ?

(a) = Y1 = Y22 ,
(b) = Y1 = 12 Y1 + 12 Y22 ,
1Y ++ nY
(c) = 1n Y11 + + Ynn = 112 ++ n2n .

20. Yi = + 1 xi1 + 2 xi 2 + i , i = 1, , n ,

Y = X + , = [

1 2 ]T . ,

E = 0 V( ) = 4 I . ,

. . .

- 1. 1. [01.09.2014]
1
1
2
1

Y = 3 , X = 1

4
1
5
1

0
0
1
1
1

0
0
0 .

0
1


5 3 1
0.5 -0.5 0.0

T
1
X X = 3 3 1 ( X X ) = -0.5 1.0 -0.5 .
1 1 1
0.0 -0.5 1.5
T

(a) D 1 ,
(b) D ,
(c) D ,
,
(d) D

(e) E[ 2 ] 2 ,
(f) cov( 1 , 2 ) ,
(g) cov( 1 , 2 ) ,
(h) D( 1 2 ) ,
) ,
(i) D(
1
2

(j) D( 1 2 ) ,
(k) corr( 1 , 2 ) ,
(l) corr( 1 , 2 ) ,
(m) E[ 2 ] ,
(n) 2 .
21. Yi = + i , E i = 0 , D i = 2 , cov( i , j ) = 0

i j . ci = i =1 ciYi
n

.
: ci = 1/ n .
22. Yi = xi + i , E i = 0 , D i = 2 , cov( i , j ) = 0
ciYi
i j . ci = in=1
c
i=1 i xi
.
: ci = xi .
n

. . .

- 1. 1. [01.09.2014]
23. Yi = + xi + i , E i = 0 , D i = 2 , cov( i , j ) = 0
ciYi
i j . ci = in=1
i=1ci xi
.
: ci = xi x .
n

24. Yi = + xi + i , E i = 0 , D i = 2 , cov( i , j ) = 0
ci (Yi Y )
i j . ci = in=1

i=1ci ( xi x )
.
: ci = xi x .
n

25. Yi = + i , E i = 0 , D i = 2 , cov( i , j ) = 0 i j -

. E D .
26. Yi = xi + i , E i = 0 , D i = 2 , cov( i , j ) = 0 i j
- . E D .
27. Yi = + xi + i , E i = 0 , D i = 2 , cov( i , j ) = 0 i j ,

- .
(a) E D ,
(b) E D .
28. r = [r1 r2

r3

r4

r5 ]T 5- ,

E[r ] = [5 10 20 30 40]T ,
D r1 = 0 , D r2 = 10 , D r3 = 20 , D r3 = 40 , D r5 = 40 ,

0
0
0
0
0
0
1
0.3 0.2 0.1

corr(r ) = 0 0.3
1
0.3 0.2 .

1
0.3
0 0.2 0.3
0 0.1 0.2 0.3
1
(a) r .
,

(b) = [0.2 0.2 0.2 0.2 0.2] ,
(c) = [0.0 0.1 0.2 0.3 0.4] ,
(d) = [0.0 0.4 0.3 0.2 0.1] .
(e) 5 ,
.
:
0
0
0
0
0
0 1.00
0.42 0.34 0.20

(a) V(r ) 0 0.42 2.00 0.73 0.56 ,

0 0.34 0.73 3.00 1.03


0 0.20 0.56 1.03
4.00
(b) E[ ] = 21 , D( ) 5.1 ,
(c) E[ ] = 30 , D( ) 12.5 ,
. . .

10

- 1. 1. [01.09.2014]
(d) E[ ] = 20 , D( ) 6.5 .
29. Yi = + xi + i ,
1 , , n
2 . n = 22
(a) E[ RSS ] ,
(b) D( RSS ) ,
(c) P{RSS > 10 2 } ,
(d) P{10 2 < RSS < 30 2 } .
: RSS / 2 ~ 2 (n k 1) .
: (a) E[ RSS ] = 20 2 , (b) D( RSS ) = 40 4 , () P{RSS > 10 2 } 0.9682 ,
(d) P{10 2 < RSS < 30 2 } 0.8983 .
30. Yi = + 1 xi1 + 2 xi 2 + i ,
1 , , n
2 . n = 13
(a) E[ RSS ] ,
(b) D( RSS ) ,
(c) P{RSS > 10 2 } ,
(d) P{5 2 < RSS < 10 2 } .
: RSS / 2 ~ 2 (n k 1) .
: (a) E[ RSS ] = 10 2 , (b) D( RSS ) = 20 4 , () P{RSS > 10 2 } 0.4404 ,
(d) P{5 2 < RSS < 10 2 } 0.4507 .
31. Yi = + xi + i ,
1 , , n
2 . n = 12
(a) P { > } ,
(b) P { > 0} ,

{
(d) P { > +
(e) P { <

}
) ,
D(
}
) ,
D(
}

) ,
(c) P | | < D(

(f) E


)
D(

(g) E + ( + ) ,
D( + )
(h) D ,
D( )

(i) D + ( + ) ,
D( + )
(j) P { > } ,

(k) P { < } .
. . .

11

- 1. 1. [01.09.2014]
32. Y T = [1 2 3 4 5]

Y T = [2 2 2 4 5] . R 2 .

1.
A. n = 5 ;
B. k + 1 = 3 ;
C. TSS = 10 ;
T
D. = [ 2 2 1] ;

E. 5 = 0 ;
F. RSS = 2 ;
G. R 2 = 0.8 .

.
H. 2 = 1 ;
1/3 1/ 3 0
= 1/ 3 4 / 3 1 ;
I. V

0
1
2

( )

( )
D( ) = 4 / 3;

J. D = 1/ 3 ;
K.

T. s = 1.15 .
1

2.
A. n = 5 ;
B. k + 1 = 3 ;
C. TSS = 10 ;
T
D. = [3 / 2 2 3 / 2] ;

E. 5 = 0 ;
F. RSS = 1 ;
G. R 2 = 0.9 .

.
H. = 1/ 2 ;
2

I.

( )
M. cov ( , ) = 0 ;
N. cov ( , ) = 1 ;
O. D ( + ) = 4 / 3 ;
P. D ( ) = 16 / 3 ;
Q. D ( + + ) = 1 ;
R. D ( + + 2 ) = 19 / 3 ;
S. corr ( , ) = 0.61 ;
L. cov , 1 = 1/ 3 ;

0
1/4 1/ 4

V = 1/ 4 1/ 2 1/ 4 ;
0
1/ 4 3 / 4

( )

( )
K. D ( ) = 1 / 2 ;
L. cov ( , ) = 1/ 4 ;
M. cov ( , ) = 0 ;
N. cov ( , ) = 1/ 4 ;
O. D ( + ) = 3 / 4 ;
P. D ( ) = 7 / 4 ;
Q. D ( + + ) = 1 / 2 ;
J. D = 1/ 4 ;
1

. . .

12

- 1. 1. [01.09.2014]

R. D + 1 + 2 2 = 13 / 4 ;

T. s = 0.71 .
1

S. corr 1 , 2 = 0.41 ;
3.
A. n = 5 ;
B. k + 1 = 3 ;
C. TSS = 10 ;

T
D. = [3 / 2 3 3 / 2] ;

E. 5 = 1/ 2 ;
F. RSS = 1 ;
G. R 2 = 0.9 .

0
1/4 1/ 4

= 1/ 4 1/ 2 1/ 4 ;
V

0
1/ 4 3 / 4

( )

T. s = 0.71 .

( )
D ( ) = 1/ 2 ;

J. D = 1/ 4 ;
K.

H. 2 = 1/ 2 ;
I.

( )
M. cov ( , ) = 0 ;
N. cov ( , ) = 1/ 4 ;
O. D ( + ) = 3 / 4 ;
P. D ( ) = 7 / 4 ;
Q. D ( + + ) = 1 / 2 ;
R. D ( + + 2 ) = 13 / 4 ;
S. corr ( , ) = 0.41 ;
L. cov , 1 = 1/ 4 ;

7.
n
n
n
(1+ xi )Yi
= in=1(1 xi )Yi , (c) = ln Y ln x , (d) = Y x , (e) = i=1 xni (Yi 1) ,
(a) = in=1
,
(b)

i=1(1+ xi )2
i=1(1 xi )2
i=1 xi2
(Yi xi 2 )( xi 1 xi 2 )
Yi
(f) = ni=1 x1i , (g) = i=1 n
.
i=1 xi
i=1( xi1 xi 2 )2
n

10.
= 0 , = 1 .

. . .

13

- 1. 1. [01.09.2014]

1 MATLAB
clc; clear;
Y = [1 2 3 4 5]';
X = [[1 1 1 1 1]', [0 0 0 1 1]', [0 0 0 0 1]'];
%% A.
[n,~] = size(X);
ans_A = n;
%% B.
[~,num_of_regressors] = size(X); k = num_of_regressors - 1;
ans_B = num_of_regressors;
%% C.
TSS = sum((Y - mean(Y)).^2);
ans_C = TSS;
%% D.
b_hat = (X' * X) \ (X' * Y);
ans_D = b_hat;
%% E.
Y_hat = X * b_hat;
e_hat = Y - Y_hat;
ans_E = e_hat(5);
%% F.
RSS = sum((Y - Y_hat).^2);
ans_F = RSS;
%% G.
R_sq = 1 - RSS / TSS;
ans_G = R_sq;
%% H.
sigma_hat_sq = RSS / (n - k - 1);
ans_H = sigma_hat_sq;
%% I.
V_hat_b_hat = sigma_hat_sq * inv(X' * X);
ans_I = V_hat_b_hat;
%% J.
ans_J = V_hat_b_hat(1,1);
%% K.
ans_K = V_hat_b_hat(2,2);
%% L.
ans_L = V_hat_b_hat(1,2);
%% M.
ans_M = V_hat_b_hat(1,3);
%% N.
ans_N = V_hat_b_hat(2,3);
%% O.
ans_O = [0 1 1] * V_hat_b_hat * [0 1 1]';
%% P.
ans_P = [0 1 -1] * V_hat_b_hat * [0 1 -1]';
%% Q.
ans_Q = [1 1 1] * V_hat_b_hat * [1 1 1]';
%% R.
ans_R = [-1 1 2] * V_hat_b_hat * [-1 1 2]';
%% S.
ans_S = V_hat_b_hat(2,3) / sqrt(V_hat_b_hat(2,2) * V_hat_b_hat(3,3));
%% T.
ans_T = sqrt(V_hat_b_hat(2,2));

. . .

14