STAT 704 Fall 2026 ------------------ Homework 5 ---------- Do the following problems from the textbook: 7.2, 7.8, 7.22, 7.23, 7.24, 7.28(b), 7.31, 10.18, 8.3, 8.8(a,b,c), 8.11, 8.29, 9.3, 9.4, 9.5, 9.8, 9.10(c), 9.11, 9.18, 9.21, and the following extra problem, which is probably most easily done in R, so see the R example code for polynomial regression: Consider a regression to relate fuel economy (Y, in miles per gallon) to speed (X, in miles per hour) that a car is driven. Suppose the following sample values for Y_i and X_i were obtained: speed <- c(5,10,15,20,25,30,35,40,45,50,55,60,65,70,75) economy <- c(12,15,23,26,28,29,29.5,30,30.5,30.5,29.5,28,26,25,23) (a) After centering the predictor variable speed, fit a quadratic regression model that includes an intercept term, a linear term, and a quadratic term. Then fit another regression model that includes just an intercept term and a quadratic term. For each fitted model, plot the raw data and the fitted regression equation on top of it. Which model gives the better fit? [Hint: For the second model, at what (centered) X value is the turning point forced to be?] (b) Now, without centering the predictor variable speed, fit a quadratic regression model that includes an intercept term, a linear term, and a quadratic term. Also, without centering the predictor variable speed, another regression model that includes just an intercept term and a quadratic term. Compare the inferences about the quadratic term in the corresponding models from (a) and (b). For which model are the inferences invariant to the shift in the X values? NOTE: Problems 7.8, 7.24, 10.18, 8.8, 8.11, 9.10(c), 9.11, 9.18, and 9.21 require analysis using a computer package such as SAS or R. NOTE: For 8.29, in the book's notation, the capital X refers to the uncentered values, and the lowercase x refers to the centered values. This problem can be done most easily using R, I think. The "Job Proficiency", "Brand Preference", and "Commercial Properties" data sets are given on the course web page. Please write your answers neatly and clearly!