Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

full answers please thank you Q. 3 The following are the design matrix X, respon

ID: 3333492 • Letter: F

Question

full answers please thank you Q. 3 The following are the design matrix X, response vector Y and (X'X)1 for a multiple 2 of 3 regression model 6 -0.15 0.40 0.00 -0.15 0.00 005 0.65-0.20 X= -0.20 a) Calculate the least squares estimates of the model Y = ++ Axit A½x2+ b) Calculate the fitted values from your model and hence calculate an unbiased estimate of the error variance 2 c) Construct 95% confidence intervals for 1 and 2 d) Conduct a test of the hypothesis Ho : A = 1 against the alternative H! : #1 e) Give a point estimate and 95% confidence interval for the quantity -At +3Ba f) Predict the response value for a new observation with x1 = 0 and x2 = 5 and give a 95% prediction interval

Explanation / Answer

a)

inv = inv(x'*x)

inv =

    0.6500   -0.2000   -0.1500
   -0.2000    0.4000         0
   -0.1500         0    0.0500

b = inv*x'*y

b =

    1.0500
   -0.6000
    1.4500

hence y^ = 1.05 - 0.6 *x1 + 1.45 *x2


b)

fitted values

x*b

ans =

    2.5000
    3.9500
    5.4000
    6.8500
    8.3000
    1.9000
    3.3500
    4.8000
    6.2500
    7.7000


(y - x*b)' * (y - x*b)

ans =

   21.9500

SSE = 21.95

error variance = SSE/ (n-k-1) = 21.95/ (10 -2-1) = 3.1357
error_Variance = SSE/(length(y) -k-1)


c)

covariance matrix

3.1357*inv

ans =

    2.0382   -0.6271   -0.4704
   -0.6271    1.2543         0
   -0.4704         0      0.1568

var (b1^) = 1.2543

var(b2^) = 0.1568

df = n-k-1= 10 -2-1 = 7

t-critical = 2.364624

95% confidence interval of b1^ =

(-0.6 - 2.364624 * sqrt(1.2543) , ((-0.6 + 2.364624 * sqrt(1.2543)

=(-3.24826,2.048259)

similarly b2^

(0.513699,2.386301)

d) TS = ( 1.45 -1)/ sqrt(0.1568 )

= 1.13642

since TS < critical value ,we fail to reject the null