# 420Pr2 - x 1 x 2 y 3 5 13 3 7 18 2 5 10 2 6 10 2 7 14 1 5 8...

This preview shows pages 1–4. Sign up to view the full content.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: x 1 x 2 y 3 5 13 3 7 18 2 5 10 2 6 10 2 7 14 1 5 8 1. Consider the model of the form: Y i = β + β 1 X i 1 + β 2 X i 2 + ε i , i = 1, 2, … , 7, where ε i ’s are independent N ( , σ 2 ) random variables. 1 7 11 X T X = & & & & ¡ ¢ £ £ £ £ ¤ ¥ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ 2 2 2 1 2 2 1 2 1 1 2 1 i i i i i i i i i i x x x x x x x x x x n = & & & ¡ ¢ £ £ £ ¤ ¥ 258 84 42 84 32 14 42 14 7 , ( X T X ) – 1 = & & & ¡ ¢ £ £ £ ¤ ¥---- ⋅ 28 168 42 84 168 84 1200 168 1 , X T Y = & & & ¡ ¢ £ £ £ ¤ ¥ ¦ ¦ ¦ 2 1 i i i i i y x y x y = & & & ¡ ¢ £ £ £ ¤ ¥ 516 180 84 . a) Fill in the blanks. (You can give a range for the p-values.) Call: lm(formula = Y ~ X1 + X2) Residuals: 1 2 3 4 5 6 7 0 1 0 -2 0 1 0 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) X1 X2 --- Signif. codes: 0 `***' 0.001 `**' 0.01 `*' 0.05 `.' 0.1 ` ' 1 Residual standard error: on degrees of freedom Multiple R-Squared: , Adjusted R-squared: F-statistic: on and DF, p-value: b) Construct a 95% prediction interval for the value of Y at x 1 = 3 and x 2 = 6. 2. Listed below are the price quotations of used cars along with their age and odometer mileage. A multiple linear regression analysis was performed using R, the output is given below. Age (years) X1 Mileage (thousand miles) X2 Price (thousand dollars) Y 1 1 8.1 9.45 2 2 17 8.4 3 2 12.6 8.6 4 3 18.4 6.8 5 3 19.5 6.5 6 4 29.2 5.6 7 6 40.4 4.75 8 7 51.6 3.89 9 8 62.6 2.7 10 10 80.1 1.47 > autos.fit <- lm(Y ~ X1 + X2) > summary(autos.fit) Call: lm(formula = Y ~ X1 + X2) Residuals: Min 1Q Median 3Q Max -0.7390 -0.2545 0.1114 0.3066 0.5674 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 9.98543 0.34289 29.121 1.45e-08 *** X1 -1.38474 & ¡ X2 0.06481 ¢ £--- Signif. codes: 0 `***' 0.001 `**' 0.01 `*' 0.05 `.' 0.1 ` ' 1 Residual standard error: ¤ on ¥ degrees of freedom Multiple R-Squared: ¦ , Adjusted R-squared: § F-statistic: ¨ on © 1 and © 2 DF, p-value: > X <- cbind(c(rep(1,10)), X1, X2) > X [,1] [,2] [,3] [1,] 1 1 8.1 [2,] 1 2 17.0 [3,] 1 2 12.6 [4,] 1 3 18.4 [5,] 1 3 19.5 [6,] 1 4 29.2 [7,] 1 6 40.4 [8,] 1 7 51.6 [9,] 1 8 62.6 [10,] 1 10 80.1 > solve(t(X) %*% X) [,1] [,2] [,3] [1,] 0.47166883 -0.3716589 0.03940979 [2,] -0.37165893 0.9238623 -0.11422997 [3,] 0.03940979 -0.1142300 0.01431659 > sum(autos.fit\$residuals^2) # RSS [1] 1.744894 > sum((Y-mean(Y))^2) # SYY [1] 62.55944 a) Fill in & and ¡ . b) Fill in ¢ and £ . c) Fill in ¤ and ¥ . Is regression significant at a 1% level of significance?...
View Full Document

## This note was uploaded on 02/10/2009 for the course STAT 420 taught by Professor Stepanov during the Spring '08 term at University of Illinois at Urbana–Champaign.

### Page1 / 17

420Pr2 - x 1 x 2 y 3 5 13 3 7 18 2 5 10 2 6 10 2 7 14 1 5 8...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online