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

- 1. 2. [01.09.

2014]

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

1 2 ] . ,
T

N ( 0, 2 I ) n - .
Y X :
1
2

Y = 3 ;

4
5

1
1

X = 1

1
1

0
1
0
1
1

0
0
0 .

0
1


0
1/2 1/ 2
5 3 1
1

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

A. .
B. ( ).

C. TSS = i =1 Yi Y
n

D.
.

E. RSS = i =1 Yi Yi .
n

F. R 2 ?
.
G. ,
2 .
H. , 80%-
2 .
I. , 80%-
.
J. ,
-.
K. , 90%-
1 .
. . .

- 1. 2. [01.09.2014]
L. ,
1 .
M. 95%-
+ 1 + 2 .
N. 95%-
+ 1 2 .
O. 95%-
+ 21 2 2 .
P. 95%-
+ 21 3 2 .
Q. Y Y = + 1 x1 + 2 x2 ,
x1 = 1 x2 = 2 .
R. .
S. 90%-
Q.
2. Yi = + 1 xi1 + 2 xi 2 + i , i = 1,..., n ,
Y = X + , = [

1 2 ] . ,
T

N ( 0, 2 I ) n - .

Y X :
1
2

Y = 3 ;

4
5

1
1

X = 1

1
1

0
1
0
1
1

0
0
0 .

1
0


0
1/2 1/ 2
5 3 1
1

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

A. .
B. ( ).

C. TSS = i =1 Yi Y
n

D.
.
. . .

- 1. 2. [01.09.2014]

E. RSS = i =1 Yi Yi .
n

F. R 2 ?
.
G. ,
2 .
H. , 80%-
2 .
I. , 80%-
.
J. ,
-.
K. , 90%-
1 .
L. ,
1 .
M. 95%-
+ 1 + 2 .
N. 95%-
+ 1 2 .
O. 95%-
+ 21 2 2 .
P. 95%-
+ 21 3 2 .
Q. Y Y = + 1 x1 + 2 x2 ,
x1 = 1 x2 = 2 .
R. .
S. 90%-
Q.
3. Yi = + 1 xi1 + 2 xi 2 + i , i = 1,..., n ,
Y = X + , = [

1 2 ] . ,
T

N ( 0, 2 I ) n - .

Y X :
. . .

- 1. 2. [01.09.2014]
1
2

Y = 3 ;

4
5

1
1

X = 1

1
1

0
1
0
1
1

0
1
0 .

0
0


0
1/2 1/ 2
5 3 1
1

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

A. .
B. ( ).

C. TSS = i =1 Yi Y
n

D.
.

E. RSS = i =1 Yi Yi .
n

F. R 2 ?
.
G. ,
2 .
H. , 80%-
2 .
I. , 80%-
.
J. ,
-.
K. , 90%-
1 .
L. ,
1 .
M. 95%-
+ 1 + 2 .
N. 95%-
+ 1 2 .
. . .

- 1. 2. [01.09.2014]
O. 95%-
+ 21 2 2 .
P. 95%-
+ 21 3 2 .
Q. Y Y = + 1 x1 + 2 x2 ,
x1 = 1 x2 = 2 .
R. .
S. 90%-
Q.
4. Yi = + 1 xi1 + 2 xi 2 + i ,
1 , , n
2 . n = 13
2 :
RSS
(a) ( 0; 4.8652
),
(b)

RSS
RSS
; 3.9403
( 18.3070
),
RSS
;) .
( 15.9872

(c)
: 90%.
5.
Yi = + 1 xi1 + 2 xi 2 + i , i = 1,..., n ,
1 ,..., n -
0 2 . .


R
R-
R-

0,70
???
???
???
25,00


df

Y-
X1
X2

SS
2,00
22,00
24,00

MS
???
109,00
215,19

F
53,10
4,95

???

t- P-
4,72
1,37
???
0,00
0,58
0,21
2,76
0,01
???
???
4,20
0,00

F
0,00

95%
95%
1,88
7,57
0,14
1,02
0,51
1,50

.
A.
R2 =
B.

2
Radj
=

C.

. . .

- 1. 2. ..
D.

ESS =

E.

F=

F.

t =

G.

2 =

H.

=
2

.
RSS
109
R2 = 1
= 1
= 0.49
TSS
215.19
RSS / ( n k 1)
109 / ( 25 2 1)
2
Radj
= 1
= 1
= 0.45
TSS / ( n 1)
215.19 / ( 25 1)
RSS
109
=
= 2.23
n k 1
25 2 1
ESS = TSS RSS = 215.19 109 = 106.19
0.49 25 2 1
R2 n k 1
F=

= 10.57
2
1 R
1 0.49
2
k
4.72
=
= 3.45
t =
1.37
, 95%
2

2 t0.975,22 ,
2

2 + t0.975,22 ,
2

t0.975,22 0.975 t 22
. 1
,
2 t0.975,22 2 = 0.51 , (1)

2 + t0.975,22 = 1.5 .
2

(2)

(1) (2), ,
2 2 = 2.01.
,
2 = 1.005 .

t =
2

, t0.975,22 - ,

t 22 .

t0.975,22

f t22 ( x ) dx = 0.975 , ft22 ( x ) -

- 1. 2. ..
,

= 0.24 .
2

,
A.

R2 =

0.49

B.

2
Radj
=

0.45

C.

2.23

D.

ESS =

106.19

E.

F=

10.57

F.

t =

3.45

G.

2 =

1.005

H.

0.24

6.
Yi = + 1 xi1 + 2 xi 2 + i , i = 1,..., n ,
1 ,..., n -
0 2 . .


R
R-
R-

0,83
???
0,66
???
25,00


df

Y-
X1
X2

SS
2,00
22,00
24,00

MS
96,94
???
140,04

F
48,47
1,96

???

t- P-
???
7,34
8,50
0,00
???
0,78
0,13
0,00
0,75
???
???
0,00

F
0,00

95%
95%
5,55
9,13
0,51
1,06
0,44
1,06

.
A.
R2 =
B.

C.

RSS =

D.

F=
7

- 1. 2. ..
E.

F.

t =

G.

H.

t =

A.

R2 =

0.69

B.

1.40

C.

RSS =

43.11

D.

F=

24.74

E.

0.86

F.

t =
1

5.88

G.

=
2

0.15

H.

t =

4.97

7.
Yi = + 1 xi1 + 2 xi 2 + i , i = 1,..., n ,
1 ,..., n -
0 2 . .


R
R-
R-

0,84
0,71
0,68
???
25,00


df

Y-
X1
X2

SS
2,00
22,00
24,00

MS
???
???
177,07

F
62,77
2,34

???

t- P-
???
0,94
7,22
0,00
???
0,80
5,52
0,00
???
???
5,83
0,00

F
0,00

95%
95%
4,86
8,77
0,50
1,11
0,62
1,30

.
8

- 1. 2. ..
A.

B.

ESS =

C.

RSS =

D.

F=

E.

F.

G.

2 =

H.

A.

1.53

B.

ESS =

125.53

C.

RSS =

51.53

D.

F=

26.80

E.

6.81

F.

=
1

0.15

G.

2 =

0.96

H.

0.16

- 1. 2. ..

1.
A. n = 5 ;

K.

[ 3.12;5.12] ;

B.

k +1 = 3 ;

L.

10%;

C.

TSS = 10 ;

[ 1.08;11.08] ;

D.

= [ 2 1 2] ;

M.
N.

E.

RSS = 4 ;

[ 9.53;11.53] ;

F.

R 2 = 0.6 .

O.

[ 21.51; 21.51] ;

P.

[ 30.54; 26.54] ;

G.

2 = 2 ;

Q.

Y = 7 ;

H.

[0.86;18.98] ;

R.

EY = + 1 1 + 2 2 ;

I.

[0.93; 4.35] ;

S.

[ 1.75;15.75] .

J.

1 1 0

V = 1 2 1 ;
0 1 3

( )

2.
A. n = 5 ;

K. [ 3.76;6.76] ;

B. k + 1 = 3 ;

L. 10%;

C. TSS = 10 ;
D. = [ 2 3 / 2 1/ 2] ;
T

E. RSS = 6.5 ;
F. R 2 = 0.35 .

M. [ 3.75;11.75] ;
N. [ 10.43;16.43] ;
O. [ 23.42;31.42] ;

[ 32.88;39.88] ;

P.

G. 2 = 13 / 4 ;

Q. Y = 4.5 ;

H. [1.41;30.84] ;

R. EY = + 1 1 + 2 2 ;

I.

[1.18;5.55] ;

S.

[ 6.66;15.66] .

0
13/8 13 / 8

J. V = 13 / 8 13 / 4 13 / 8 ;
0
13 / 8 39 / 8

( )

10

- 1. 2. ..

3.
A. n = 5 ;

K. [ 0.76;5.76] ;

B. k + 1 = 3 ;

L. 10%;

C. TSS = 10 ;
T
D. = [ 2 5 / 2 5 / 2] ;

E. RSS = 2.5 ;
F. R 2 = 0.75 .

M. [ 2.81;6.81] ;
N. [ 1.33;15.33] ;
O. [ 5.01; 29.01] ;

[ 8.06;37.06] ;

P.

G. 2 = 5 / 4 ;

Q. Y = 0.5 ;

H. [ 0.54;11.86] ;

R. EY = + 1 1 + 2 2 ;

I.

[0.73;3.44] ;

S.

[ 7.42;6.42] .

0
5/8 5 / 8

= 5 / 8 5 / 4 5 / 8 ;
J. V

0
5 / 8 15 / 8

( )

1 MATLAB
clc; clear;
Y = [1 2 3 4 5]';
X = [[1 1 1 1 1]', [0 1 0 1 1]', [0 0 0 0 1]'];
sign_level_H = 0.2;
sign_level_I = 0.2;
sign_level_K = 0.1;
sign_level_M = 0.05;
sign_level_N = 0.05;
sign_level_O = 0.05;
sign_level_P = 0.05;
sign_level_S = 0.1;
x1 = 1; x2 = 2;
%% 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;
RSS = sum((Y - Y_hat).^2);
ans_E = RSS;
%% F.
R_sq = 1 - RSS / TSS;
ans_F = R_sq;
%% G.
sigma_hat_sq = RSS / (n - k - 1);
ans_G = sigma_hat_sq;
%% H.
A = chi2inv(sign_level_H / 2, n - k - 1); B = chi2inv(1 - sign_level_H / 2, n - k - 1);
LB = sigma_hat_sq * (n - k - 1) / B;
UB = sigma_hat_sq * (n - k - 1) / A;
ans_H = [LB, UB];
%% I.

11

- 1. 2. ..
A = chi2inv(sign_level_I / 2, n - k - 1); B = chi2inv(1 - sign_level_I / 2,
LB = sqrt(sigma_hat_sq * (n - k - 1) / B);
UB = sqrt(sigma_hat_sq * (n - k - 1) / A);
ans_I = [LB, UB];
%% J.
V_hat_b_hat = sigma_hat_sq * inv(X' * X);
ans_J = V_hat_b_hat;
%% K.
A = tinv(sign_level_K / 2, n - k - 1); B = tinv(1 - sign_level_K / 2, n - k
LB = b_hat(2) - B * sqrt(V_hat_b_hat(2,2));
UB = b_hat(2) - A * sqrt(V_hat_b_hat(2,2));
ans_K = [LB, UB];
%% L.
ans_L = sign_level_K;
%% M.
A = tinv(sign_level_M / 2, n - k - 1); B = tinv(1 - sign_level_M / 2, n - k
LB = [1 1 1] * b_hat - B * sqrt([1 1 1] * V_hat_b_hat * [1 1 1]');
UB = [1 1 1] * b_hat - A * sqrt([1 1 1] * V_hat_b_hat * [1 1 1]');
ans_M = [LB, UB];
%% N.
A = tinv(sign_level_N / 2, n - k - 1); B = tinv(1 - sign_level_N / 2, n - k
LB = [1 1 -1] * b_hat - B * sqrt([1 1 -1] * V_hat_b_hat * [1 1 -1]');
UB = [1 1 -1] * b_hat - A * sqrt([1 1 -1] * V_hat_b_hat * [1 1 -1]');
ans_N = [LB, UB];
%% O.
A = tinv(sign_level_O / 2, n - k - 1); B = tinv(1 - sign_level_O / 2, n - k
LB = [1 2 -2] * b_hat - B * sqrt([1 2 -2] * V_hat_b_hat * [1 2 -2]');
UB = [1 2 -2] * b_hat - A * sqrt([1 2 -2] * V_hat_b_hat * [1 2 -2]');
ans_O = [LB, UB];
%% P.
A = tinv(sign_level_P / 2, n - k - 1); B = tinv(1 - sign_level_P / 2, n - k
LB = [1 2 -3] * b_hat - B * sqrt([1 2 -3] * V_hat_b_hat * [1 2 -3]');
UB = [1 2 -3] * b_hat - A * sqrt([1 2 -3] * V_hat_b_hat * [1 2 -3]');
ans_P = [LB, UB];
%% Q.
ans_Q = [1 x1 x2] * b_hat;
%% R.
ans_R = 'E(Y_hat) = alpha + beta1 * x1 + beta2 * x2';
%% S.
A = tinv(sign_level_S / 2, n - k - 1); B = tinv(1 - sign_level_S / 2, n - k
LB = [1 x1 x2] * b_hat - B * sqrt([1 x1 x2] * V_hat_b_hat * [1 x1 x2]');
UB = [1 x1 x2] * b_hat - A * sqrt([1 x1 x2] * V_hat_b_hat * [1 x1 x2]');
ans_S = [LB, UB];

n - k - 1);

- 1);

- 1);

- 1);

- 1);

- 1);

- 1);

12