{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

# 420Hw09ans - STAT 420 Spring 2010 Homework#9(due Friday...

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

STAT 420 Spring 2010 Homework #9 (due Friday, April 9, by 4:00 p.m.) 1. Recall Problem 5.6 : In order to determine the profitability of hiring an additional salesman, the sales manager decided to determine the relationship between the number of salesmen and the average sales in thousands of dollars. After looking at a scatter diagram of the data ( obtained over several years ), X ( number of salesmen ) 2 3 4 5 6 Y ( sales in \$1000’s ) 20 27 33 38 43 he postulates the model Y i = α + β x i + ε i , i = 1, 2, … , 5, where the ε i ’s are uncorrelated normal variables with mean zero and variance σ 2 . After examining the residuals vs. fitted values plot ( Homework 5 ) it was concluded that linear model does NOT seem to be appropriate here. Consider the second-order model Y i = β 0 + β 1 x i + β 2 x i 2 + ε i , i = 1, 2, … , 5, where the ε i ’s are uncorrelated normal variables with mean zero and variance σ 2 . a) Obtain the least squares estimates 0 β ˆ , 1 β ˆ , and 2 β ˆ . > x = c( 2, 3, 4, 5, 6) > y = c(20,27,33,38,43) > fit2 = lm(y ~ x + I(x^2)) > summary(fit2) Call: lm(formula = y ~ x + I(x^2)) Residuals: 1 2 3 4 5 -0.08571 0.14286 0.08571 -0.25714 0.11429

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

View Full Document
Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 4.40000 0.95019 4.631 0.04361 * x 8.55714 0.51666 16.562 0.00363 ** I(x^2) -0.35714 0.06389 -5.590 0.03054 * --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 Residual standard error: 0.239 on 2 degrees of freedom Multiple R-squared: 0.9997, Adjusted R-squared: 0.9993 F-statistic: 2858 on 2 and 2 DF, p-value: 0.0003497 b) Is the second-order term significant? That is, test H 0 : β 2 = 0 vs. H 1 : β 2 0. Use a 5% level of significance. P-value = 0.03054 < 0.05. Reject H 0 : β 2 = 0 at α = 0.05. c) Plot the residuals vs. the fitted values. Comment on the appearance of the plot. ( Does quadratic model seem to be appropriate here? ) Residuals do not seem to have a pattern. Quadratic model seems to be appropriate.
> plot(x,y) > xx = seq(2,6,by=0.1) > yy = fit2\$coeff[1]+fit2\$coeff[2]*xx+fit2\$coeff[3]*xx^2 > lines(xx,yy) > > abline(lm(y ~ x)\$coeff,lty=2,col=2)

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

View Full Document
The data in the table below came from a recent time study of a sample of 15 employees performing a particular task on an automobile assembly line. Time to Assemble, y (minutes) Months of Experience, x 10 24 20 1 15 10 11 15 11 17 19 3 11 20 13 9 17 3 18 1 16 7 16 9 17 7 18 5 10 20 The data are stored in http://www.stat.uiuc.edu/~stepanov/Hw09_2.csv a) Fit the quadratic model Y = β 0 + β 1 x 1 + β 2 x 1 2 + ε > Hw09_2.dat = read.table("http://www.stat.uiuc.edu/~stepanov/Hw09_2.csv", sep=",", header=T) > Hw09_2.fit2 = lm(y ~ x + I(x^2), data=Hw09_2.dat) > summary(Hw09_2.fit2) Call: lm(formula = y ~ x + I(x^2), data = Hw09_2.dat) Residuals: Min 1Q Median 3Q Max -1.8287 -0.8300 0.5054 0.7476 1.1713 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 20.091108 0.724705 27.723 3e-12 *** x -0.670522 0.154706 -4.334 0.000972 ***
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 16

420Hw09ans - STAT 420 Spring 2010 Homework#9(due Friday...

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

View Full Document
Ask a homework question - tutors are online