text stringlengths 270 6.81k |
|---|
of y for a given value of x The sample of n pairs of observations have been chosen from a population in which the average value of y is related to the value of the predictor variable x by the line of means, E( y) a bx an unknown line, shown as a broken line in Figure 12.12. Remember that for a fixed value of x—say, x0—the particular values of y deviate from the line of means. These values of y are assumed to have a normal distribution with mean equal to a bx0 and variance s 2, as shown in Figure 12.12. FI GUR E 1 2. 12 Distribution of y for x x0 ● y Line of means E(y) = α + βx x = x0 x Since the computed values of a and b vary from sample to sample, each new sample produces a different regression line yˆ a bx, which can be used either to estimate the line of means or to predict a particular value of y. Figure 12.13 shows one of the possible configurations of the fitted line (blue), the unknown line of means (gray), and a particular value of y (the blue dot). 528 ❍ CHAPTER 12 LINEAR REGRESSION AND CORRELATION F IG URE 12. 13 Error in estimating E (y) and in predicting y ● y Error of estimating E(y) x0 Actual value of y you are attempting to predict ) Predicted value of y x How far will our estimator yˆ a bx0 be from the quantity to be estimated or predicted? This depends, as always, on the variability in our estimator, measured by its standard error. It can be shown that yˆ a bx0 the estimated value of y when x x0, is an unbiased estimator of the line of means, a bx0, and that yˆ is normally distributed with the standard error of yˆ estimated by SE(yˆ) MSE1 (x0 x)2 n S xx For a given value of x, the prediction interval is always wider than the confidence interval. Estimation and testing are based on the statistic y) E t yˆ ( yˆ E( ) S which has a t distribution with (n 2) degrees of freedom. To form a (1 a)100% confidence interval |
for the average value of y when x x0, measured by the line of means, a bx0, you can use the usual form for a confidence interval based on the t distribution: yˆ ta/2SE( yˆ) If you choose to predict a particular value of y when x x0, however, there is some additional error in the prediction because of the deviation of y from the line of means. If you examine Figure 12.13, you can see that the error in prediction has two components: • The error in using the fitted line to estimate the line of means • The error caused by the deviation of y from the line of means, measured by s 2 The variance of the difference between y and yˆ is the sum of these two variances and forms the basis for the standard error of ( y yˆ) used for prediction: SE( y yˆ) MSE1 1 x)2 (x0 S n xx and the (1 a)100% prediction interval is formed as yˆ ta/2SE( y yˆ) 12.7 ESTIMATION AND PREDICTION USING THE FITTED LINE ❍ 529 (1 a)100% CONFIDENCE AND PREDICTION INTERVALS • For estimating the average value of y when x x0: x)2 yˆ ta/2MSE1 (x0 n S xx • For predicting a particular value of y when x x0: (x0 yˆ ta/2MSE1 1 x)2 n S x x EXAMPLE 12.4 where ta/2 is the value of t with (n 2) degrees of freedom and area a/2 to its right. Use the information in Example 12.1 to estimate the average calculus grade for students whose achievement score is 50, with a 95% confidence interval. Solution The point estimate of E(yx0 50), the average calculus grade for students whose achievement score is 50, is yˆ 40.78424.76556(50) 79.06 The standard error of yˆ is MSE1 (x0 75.7532 x)2 474 (50 1 0 1 2 2.840 46)2 n S xx EXAMPLE 12.5 and the 95% confidence interval is 79.06 2.306(2.840) 79. |
06 6.55 Our results indicate that the average calculus grade for students who score 50 on the achievement test will lie between 72.51 and 85.61. A student took the achievement test and scored 50 but has not yet taken the calculus test. Using the information in Example 12.1, predict the calculus grade for this student with a 95% prediction interval. Solution The predicted value of y is yˆ 79.06, as in Example 12.4. However, the error in prediction is measured by SE( y yˆ), and the 95% prediction interval is 474 (50 79.06 2.30675.75321 79.06 2.306(9.155) 79.06 21.11 46)2 1 0 1 2 or from 57.95 to 100.17. The prediction interval is wider than the confidence interval in Example 12.4 because of the extra variability in predicting the actual value of the response y. 530 ❍ CHAPTER 12 LINEAR REGRESSION AND CORRELATION EXAMPLE 12.6 One particular point on the line of means is often of interest to experimenters, the y-intercept a—the average value of y when x0 0. Prior to fitting a line to the calculus grade-achievement score data, you may have thought that a score of 0 on the achievement test would predict a grade of 0 on the calculus test. This implies that we should fit a model with a equal to 0. Do the data support the hypothesis of a 0 intercept? Solution You can answer this question by constructing a 95% confidence interval for the y-intercept a, which is the average value of y when x 0. The estimate of a is yˆ 40.784.76556(0) 40.784 a and the 95% confidence interval is n yˆ ta/2MSE1 40.784 2.30675.7532 40.784 19.617 x)2 (x0 474 (0 1 0 1 S 2 xx 6)2 4 or from 21.167 to 60.401, an interval that does not contain the value a 0. Hence, it is unlikely that the y-intercept is 0. You should include a nonzero intercept in the model y a bx e. For this special situation in which you are interested in testing or estimating the y-intercept a |
for the line of means, the inferences involve the sample estimate a. The test for a 0 intercept is given in Figure 12.14 in the shaded line labeled “Constant.” The coefficient given as 40.784 is a, with standard error given in the column labeled “SE Coef ” as 8.507, which agrees with the value calculated in Example 12.6. The value of t 4.79 is found by dividing a by its standard error with p-value.001. F IG URE 12. 14 Portion of the MINITAB output for Example 12.6 ● Predictor Coef SE Coef T P Constant 40.784 8.507 4.79 0.001 x 0.7656 0.1750 4.38 0.002 You can see that it is quite time-consuming to calculate these estimation and prediction intervals by hand. Moreover, it is difficult to maintain accuracy in your calculations. Fortunately, computer programs can perform these calculations for you. The MINITAB regression command provides an option for either estimation or prediction when you specify the necessary value(s) of x. The printout in Figure 12.15 gives the values of yˆ 79.06 labeled “Fit,” the standard error of yˆ, SE( yˆ), labeled “SE Fit,” the confidence interval for the average value of y when x 50, labeled “95.0% CI,” and the prediction interval for y when x 50, labeled “95.0% PI.” F IG URE 12. 15 MINITAB option for estimation and prediction ● Predicted Values for New Observations New Obs Fit SE Fit 95% CI 95% PI 1 79.06 2.84 (72.51, 85.61) (57.95, 100.17) Values of Predictors for New Observations New Obs x 1 50.0 12.7 ESTIMATION AND PREDICTION USING THE FITTED LINE ❍ 531 The confidence bands and prediction bands generated by MINITAB for the calculus grades data are shown in Figure 12.16. Notice that in general the confidence bands are narrower than the prediction bands for every value of the achievement test score x. Certainly you would expect predictions for an individual value to be much more variable than estimates of the average value. Also notice that the bands seem to |
get wider as the value of x0 gets farther from the mean x. This is because the standard errors used in the confidence and prediction intervals contain the term (x0 x)2, which gets larger as the two values diverge. In practice, this means that estimation and prediction are more accurate when x0 is near the center of the range of the x-values. You can locate the calculated confidence and prediction intervals when x 50 in Figure 12.16. ● FI GUR E 1 2. 16 Confidence and prediction intervals for the data in Table 12.1 e d a r G 120 110 100 90 80 70 60 50 40 30 Fitted Line Plot y 40.78 0.7656 x Regression 95% CI 95% PI S R-Sq R-Sq(adj) 8.70363 70.5% 66.8% 20 30 40 50 Score 60 70 80 12.7 EXERCISES BASIC TECHNIQUES 12.36 Refer to Exercise 12.6. a. Estimate the average value of y when x 1, using a 90% confidence interval. b. Find a 90% prediction interval for some value of y to be observed in the future when x 1. 12.37 Refer to Exercise 12.7. Portions of the MINITAB printout are shown here. MINITAB output for Exercise 12.37 Regression Analysis: y versus x The regression equation is y = 6.00 - 0.557 x Predictor Coef SE Coef T P Constant 6.0000 0.1759 34.10 0.000 x -0.55714 0.04518 -12.33 0.000 Predicted Values for New Observations New Obs Fit SE Fit 95.0% CI 95.0% PI 1 4.8857 0.1027 (4.6006, 5.1708) (4.2886, 5.4829) 2 1.5429 0.2174 (0.9392, 2.1466) (0.7430, 2.3427) X X denotes a point that is an outlier in the predictors. Values of Predictors for New Observations New Obs x 1 2.00 2 8.00 a. Find a 95% confidence interval for the average value of y when x 2. b. Find a 95% prediction interval for |
some value of y to be observed in the future when x 2. c. The last line in the third section of the printout indicates a problem with one of the fitted values. What value of x corresponds to the fitted value yˆ 1.5429? What problem has the MINITAB program detected? APPLICATIONS 12.38 What to Buy? A marketing research experiment was conducted to study the rela- EX1238 tionship between the length of time necessary for a buyer to reach a decision and the number of alternative package designs of a product presented. Brand names were eliminated from the packages to reduce the effects of brand preferences. The buyers made their selections using the manufacturer’s product descriptions on the packages as the only buying guide. The length of time necessary to reach a decision was 532 ❍ CHAPTER 12 LINEAR REGRESSION AND CORRELATION recorded for 15 participants in the marketing research study. MINITAB output for Exercise 12.39 5, 8, 8, 7, 9 7, 9, 8, 9, 10 10, 11, 10, 12, 9 Regression Analysis: y versus x The regression equation is y = 251206 + 27.4 x Length of Decision Time, y (sec) Number of Alternatives, x 2 3 4 a. Find the least-squares line appropriate for these data. b. Plot the points and graph the line as a check on your calculations. c. Calculate s2. d. Do the data present sufficient evidence to indicate that the length of decision time is linearly related to the number of alternative package designs? (Test at the a.05 level of significance.) e. Find the approximate p-value for the test and inter- pret its value. f. If they are available, examine the diagnostic plots to check the validity of the regression assumptions. g. Estimate the average length of time necessary to reach a decision when three alternatives are presented, using a 95% confidence interval. EX1239 12.39 Housing Prices If you try to rent an apartment or buy a house, you find that real estate representatives establish apartment rents and house prices on the basis of square footage of heated floor space. The data in the table give the square footages and sales prices of n 12 houses randomly selected from those sold in a small city. Use the MINITAB printout to answer the questions. Square |
Feet, x Price, y Square Feet, x Price, y 1460 2108 1743 1499 1864 2391 $288,700 309,300 301,400 291,100 302,400 314,900 1977 1610 1530 1759 1821 2216 $305,400 297,000 292,400 298,200 304,300 311,700 Plot of data for Exercise 12.39 315,000 310,000 305,000 300,000 ) e c i r P ( y 295,000 290,000 Predictor Coef SE Coef T P Constant 251206 3389 74.13 0.000 x 27.406 1.828 14.99 0.000 S = 1792.72 R-Sq = 95.7% R-Sq(adj) = 95.3% Predicted Values for New Observations New Obs Fit SE Fit 95.0% CI 95.0% PI 1 299989 526 (298817, 301161) (295826, 304151) 2 306018 602 (304676, 307360) (301804, 310232) Values of Predictors for New Observations New Obs x 1 1780 2 2000 a. Can you see any pattern other than a linear relation- ship in the original plot? b. The value of r 2 for these data is.957. What does this tell you about the fit of the regression line? c. Look at the accompanying diagnostic plots for these data. Do you see any pattern in the residuals? Does this suggest that the relationship between price and square feet is something other than linear? MINITAB output for Exercise 12.39 Normal Probability Plot of the Residuals (response is y) 99 95 90 80 70 60 50 40 30 20 10 5 t n e c r e P 1 5000 4000 3000 2000 1000 0 Residual 1000 2000 3000 4000 Residuals versus the Fitted Values (response is y) 3000 2000 1000 0 1000 2000 3000 l a u d i s e R 1500 1600 1700 1800 1900 2000 2100 2200 2300 2400 290,000 295,000 300,000 x (Square Feet) 305,000 Fitted Value 310,000 315,000 320,000 12.40 Housing Prices II Refer to Exercise 12.39 and data set EX1239. a. Estimate the average increase in the price for an increase of 1 square foot for houses sold in the city. Use a 99 |
% confidence interval. Interpret your estimate. b. A real estate salesperson needs to estimate the average sales price of houses with a total of 2000 square feet of heated space. Use a 95% confidence interval and interpret your estimate. c. Calculate the price per square foot for each house and then calculate the sample mean. Why is this estimate of the average cost per square foot not equal to the answer in part a? Should it be? Explain. d. Suppose that a house with 1780 square feet of heated floor space is offered for sale. Construct a 95% prediction interval for the price at which the house will sell. 12.41 Strawberries III The following data (Exercises 12.16 and 12.24) were obtained in an experiment relating the dependent variable, y (texture of strawberries), with x (coded storage temperature). x 2 2 y 3.5 4.0 0 2.0 2 0.5 2 0.0 a. Estimate the expected strawberry texture for a coded storage temperature of x 1. Use a 99% confidence interval. b. Predict the particular value of y when x 1 with a 99% prediction interval. c. At what value of x will the width of the prediction interval for a particular value of y be a minimum, assuming n remains fixed? 12.42 Tom Brady The number of passes completed and the total number of passing EX1242 yards for Tom Brady, quarterback for the New England Patriots, were recorded for the 16 regular games in the 2006 football season.8 Week 6 was a bye and no data was reported. 12.8 CORRELATION ANALYSIS ❍ 533 Week Completions Total Yards 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 11 15 31 15 16 * 18 29 20 24 20 22 27 12 16 28 15 163 220 320 188 140 * 195 372 201 253 244 267 305 78 109 249 225 a. What is the least-squares line relating the total passing yards to the number of pass completions for Tom Brady? b. What proportion of the total variation is explained by the regression of total passing yards ( y) on the number of pass completions (x)? c. If they are available, examine the diagnostic plots to check the validity of the regression assumptions. 12.43 Tom Brady, continued Refer to Exercise 12.42. a. Estimate the average number of |
passing yards for games in which Brady throws 20 completed passes using a 95% confidence interval. b. Predict the actual number of passing yards for games in which Brady throws 20 completed passes using a 95% confidence interval. c. Would it be advisable to use the least-squares line from Exercise 12.42 to predict Brady’s total number of passing yards for a game in which he threw only 5 completed passes? Explain. 12.8 CORRELATION ANALYSIS In Chapter 3, we introduced the correlation coefficient as a measure of the strength of the linear relationship between two variables. The correlation coefficient, r— formally called the Pearson product moment sample coefficient of correlation—is defined next. 534 ❍ CHAPTER 12 LINEAR REGRESSION AND CORRELATION PEARSON PRODUCT MOMENT COEFFICIENT OF CORRELATION S s x y for 1 r 1 r x y Syy S s s x y x x r is always between 1 and 1. S s 2 sxy xy The variances and covariance can be found by direct calculation, by using a calculator with a two-variable statistics capacity, or by using a statistical package such as MINITAB. The variances and covariance are calculated as S s 2 x xx n S y yy n 1 and use Sxy, Sxx, and Syy, the same quantities used in regression analysis earlier in this chapter. In general, when a sample of n individuals or experimental units is selected and two variables are measured on each individual or unit so that both variables are random, the correlation coefficient r is the appropriate measure of linearity for use in this situation. 1 1 n EXAMPLE 12.7 The heights and weights of n 10 offensive backfield football players are randomly selected from a county’s football all-stars. Calculate the correlation coefficient for the heights (in inches) and weights (in pounds) given in Table 12.4. TABLE 12.4 ● Heights and Weights of n 10 Backfield All-Stars Player Height, x Weight 10 73 71 75 72 72 75 67 69 71 69 185 175 200 210 190 195 150 170 180 175 Solution You should use the appropriate data entry method of your scientific calculator to verify the calculations for the sums of squares and cross-products, Syy 2610 Sxx 60.4 Sxy 328 using the calculational formulas given earlier in this |
chapter. Then 2 8 3 r.8261 (2610) (60. ) 4 or r.83. This value of r is fairly close to 1, the largest possible value of r, which indicates a fairly strong positive linear relationship between height and weight. There is a direct relationship between the calculational formulas for the correlation coefficient r and the slope of the regression line b. Since the numerator of both quantities is Sxy, both r and b have the same sign. Therefore, the correlation coefficient has these general properties: • When r 0, the slope is b 0, and there is no linear relationship between x and y. • When r is positive, so is b, and there is a positive linear relationship between x and y. The sign of r is always the same as the sign of the slope b. • When r is negative, so is b, and there is a negative linear relationship between 12.8 CORRELATION ANALYSIS ❍ 535 x and y. In Section 12.5, we showed that SSE S Tota S R S S r 2 SS al t o ta SS l To l T In this form, you can see that r 2 can never be greater than 1, so that 1 r 1. Moreover, you can see the relationship between the random variation (measured by SSE) and r 2. • • If there is no random variation and all the points fall on the regression line, then SSE 0 and r 2 1. If the points are randomly scattered and there is no variation explained by regression, then SSR 0 and r 2 0. You can use the Exploring Correlation shown in Figure 12.17 applet to visualize the connection between the value of r and the pattern of points shown in the scatterplot. Use your mouse to move the slider at the bottom of the scatterplot. You will see the value of r change as the pattern of the points changes. Try to reproduce the patterns described above for r 2 1 and r 2 0. FI GUR E 1 2. 17 Exploring Correlation applet ● Figure 12.18 shows four typical scatterplots and their associated correlation coefficients. Notice that in scatterplot (d) there appears to be a curvilinear relationship between x and y, but r is approximately 0, which reinforces the fact that r is a measure of a linear (not curvilinear) relationship between two variables. 536 ❍ CHAPTER 12 LINEAR |
REGRESSION AND CORRELATION F IG URE 12. 18 Some typical scatterplots with approximate values of r ● y (a) Strong positive linear correlation; r is near 1 y y y x x (b) Strong negative linear correlation; r is near –1 x x (c) No apparent linear correlation; r is near 0 (d) Curvilinear, but not linear, correlation; r is near 0 Consider a population generated by measuring two random variables on each experimental unit. In this bivariate population, the population correlation coefficient r (Greek lowercase rho) is calculated and interpreted as it is in the sample. In this situation, the experimenter can test the hypothesis that there is no correlation between the variables x and y using a test statistic that is exactly equivalent to the test of the slope b in Section 12.5. The test procedure is shown next. TEST OF HYPOTHESIS CONCERNING THE CORRELATION COEFFICIENT r 1. Null hypothesis: H0 : r 0 2. Alternative hypothesis: One-Tailed Test Ha : r 0 (or r 0) Two-Tailed Test Ha : r 0 3. Test statistic: t r 22 n 1 r When the assumptions given in Section 12.2 are satisfied, the test statistic will have a Student’s t distribution with (n 2) degrees of freedom. 4. Rejection region: Reject H0 when Two-Tailed Test t ta/2 or t ta/2 One-Tailed Test t ta (or t ta when the alternative hypothesis is Ha : r 0) or when p-value a You can prove that t r 2 2 r n 1 0 b. Sxx M S E/ 12.8 CORRELATION ANALYSIS ❍ 537 The values of ta and ta/2 can be found using Table 4 in Appendix I or the t-Probabilities applet. Use the values of t corresponding to (n 2) degrees of freedom. EXAMPLE 12.8 Refer to the height and weight data in Example 12.7. The correlation of height and weight was calculated to be r.8261. Is this correlation significantly different from 0? The t-value and p-value for testing H0 : r 0 will be identical to the t- and p-value for testing H0 : b 0. Solution To test the hypotheses versus Ha : r 0 H0 : r |
0 the value of the test statistic is t r.8261 10 1 (. 826 4.15 2 1)2 2 2 r n 1 which for n 10 has a t distribution with 8 degrees of freedom. Since this value is greater than t.005 3.355, the two-tailed p-value is less than 2(.005).01, and the correlation is declared significant at the 1% level (P.01). The value r 2.82612.6824 means that about 68% of the variation in one of the variables is explained by the other. The MINITAB printout in Figure 12.19 displays the correlation r and the exact p-value for testing its significance. FI GUR E 1 2. 19 MINITAB output for Example 12.8 ● Correlations: x, y Pearson correlation of x and y = 0.826 P-Value = 0.003 If the linear coefficients of correlation between y and each of two variables x1 and x2 are calculated to be.4 and.5, respectively, it does not follow that a predictor using both variables will account for [(.4)2 (.5)2].41, or a 41% reduction in the sum of squares of deviations. Actually, x1 and x2 might be highly correlated and therefore contribute virtually the same information for the prediction of y. Finally, remember that r is a measure of linear correlation and that x and y could be perfectly related by some curvilinear function when the observed value of r is equal to 0. The problem of estimating or predicting y using information given by several independent variables, x1, x2,..., xk, is the subject of Chapter 13. 12.8 EXERCISES BASIC TECHNIQUES 12.44 How does the coefficient of correlation measure the strength of the linear relationship between two variables y and x? 12.45 Describe the significance of the algebraic sign and the magnitude of r. 12.46 What value does r assume if all the data points fall on the same straight line in these cases? a. The line has positive slope. b. The line has negative slope. 12.47 You are given these data. Plot the data points. Based on your graph, what will be the sign of the sample correlation coefficient? b. Calculate r and r 2 and interpret their values. 538 |
❍ CHAPTER 12 LINEAR REGRESSION AND CORRELATION 12.48 You are given these data. Plot the six points on graph paper. b. Calculate the sample coefficient of correlation r and 0 interpret. c. By what percentage was the sum of squares of deviations reduced by using the least-squares predictor yˆ a bx rather than y as a predictor of y? 12.49 Reverse the slope of the line in Exercise 12.48 by reordering the y observations, as follows Repeat the steps of Exercise 12.48. Notice the change in the sign of r and the relationship between the values of r 2 of Exercise 12.48 and this exercise. APPLICATIONS EX1250 12.50 Lobster The table gives the numbers of Octolasmis tridens and O. lowei barnacles on each of 10 lobsters.9 Does it appear that the barnacles compete for space on the surface of a lobster? Lobster Field Number O. tridens O. lowei AO61 AO62 AO66 AO70 AO67 AO69 AO64 AO68 AO65 AO63 645 320 401 364 327 73 20 221 3 5 6 23 40 9 24 5 86 0 109 350 a. If they do compete, do you expect the number x of O. tridens and the number y of O. lowei barnacles to be positively or negatively correlated? Explain. b. If you want to test the theory that the two types of barnacles compete for space by conducting a test of the null hypothesis “the population correlation coefficient r equals 0,” what is your alternative hypothesis? c. Conduct the test in part b and state your conclusions. 12.51 Social Skills Training A social skills training program was implemented with seven EX1251 mildly challenged students in a study to determine whether the program caused improvement in pre/post measures and behavior ratings. For one such test, the pre- and posttest scores for the seven students are given in the table.10 Subject Pretest Posttest Earl Ned Jasper Charlie Tom Susie Lori 101 89 112 105 90 91 89 113 89 121 99 104 94 99 a. What type of correlation, if any, do you expect to see between the pre- and posttest scores? Plot the data. Does the correlation appear to be positive or negative? b. Calculate the correlation coefficient, r. Is there a significant positive correlation? |
12.52 Hockey G. W. Marino investigated the variables related to a hockey player’s ability to make a fast start from a stopped position.11 In the experiment, each skater started from a stopped position and attempted to move as rapidly as possible over a 6-meter distance. The correlation coefficient r between a skater’s stride rate (number of strides per second) and the length of time to cover the 6-meter distance for the sample of 69 skaters was.37. a. Do the data provide sufficient evidence to indicate a correlation between stride rate and time to cover the distance? Test using a.05. b. Find the approximate p-value for the test. c. What are the practical implications of the test in part a? 12.53 Hockey II Refer to Exercise 12.52. Marino calculated the sample correlation coefficient r for the stride rate and the average acceleration rate for the 69 skaters to be.36. Do the data provide sufficient evidence to indicate a correlation between stride rate and average acceleration for the skaters? Use the p-value approach. EX1254 12.54 Geothermal Power Geothermal power is an important source of energy. Since the amount of energy contained in 1 pound of water is a function of its temperature, you might wonder whether water obtained from deeper wells contains more energy per pound. The data in the table are reproduced from an article on geothermal systems by A.J. Ellis.12 Location of Well El Tateo, Chile Ahuachapan, El Salvador Namafjall, Iceland Larderello (region), Italy Matsukawa, Japan Cerro Prieto, Mexico Wairakei, New Zealand Kizildere, Turkey The Geysers, United States Average (max.) Drill Hole Depth (m) Average (max.) Temperature (°C) 650 1000 1000 600 1000 800 800 700 1500 230 230 250 200 220 300 230 190 250 Is there a significant positive correlation between average maximum drill hole depth and average maximum temperature? 12.55 Cheese, Please! The demand for healthy foods that are low in fat and calories has resulted in a large number of “low-fat” or “fat-free” products. The table shows the number of calories and the amount of sodium (in milligrams) per slice for five different brands of fat-free American cheese. Brand Sodium (mg) Calories Kraft Fat Free Singles Ralphs Fat Free |
Singles Borden® Fat Free Healthy Choice® Fat Free Smart Beat® American 300 300 320 290 180 30 30 30 30 25 a. Should you use the methods of linear regression analysis or correlation analysis to analyze the data? Explain. b. Analyze the data to determine the nature of the relationship between sodium and calories in fat-free American cheese. Use any statistical tests that are appropriate. 12.56 Body Temperature and Heart Rate Is there any relationship between these two EX1256 variables? To find out, we randomly selected 12 people from a data set constructed by Allen Shoemaker (Journal of Statistics Education) and recorded their body temperature and heart rate.13 12.8 CORRELATION ANALYSIS ❍ 539 Person Temperature (degrees) Heart Rate (beats per minute) Person Temperature (degrees) Heart Rate (beats per minute) 1 2 3 4 5 6 96.3 97.4 98.9 99.0 99.0 96.8 70 68 80 75 79 75 7 8 9 10 11 12 98.4 98.4 98.8 98.8 99.2 99.3 74 84 73 84 66 68 a. Find the correlation coefficient r, relating body temperature to heart rate. b. Is there sufficient evidence to indicate that there is a correlation between these two variables? Test at the 5% level of significance. EX1257 12.57 Baseball Stats Does a team’s batting average depend in any way on the number of home runs hit by the team? The data in the table show the number of team home runs and the overall team batting average for eight selected major league teams for the 2006 season.14 Team Total Home Runs Team Batting Average Atlanta Braves Baltimore Orioles Boston Red Sox Chicago White Sox Houston Astros Philadelphia Phillies New York Giants Seattle Mariners Source: ESPN.com 222 164 192 236 174 216 163 172.270.227.269.280.255.267.259.272 a. Plot the points using a scatterplot. Does it appear that there is any relationship between total home runs and team batting average? b. Is there a significant positive correlation between total home runs and team batting average? Test at the 5% level of significance. c. Do you think that the relationship between these two variables would be different if we had looked at the entire set of major league franchises? 540 ❍ CHAPTER 12 LINEAR REGRESSION AND CORREL |
ATION CHAPTER REVIEW Key Concepts and Formulas I. A Linear Probabilistic Model 1. When the data exhibit a linear relationship, the appropriate model is y a bx e. 2. The random error e has a normal distribution with mean 0 and variance s 2. II. Method of Least Squares 1. Estimates a and b, for a and b, are chosen to minimize SSE, the sum of squared deviations about the regression line, yˆ a bx. 2. The least-squares estimates are b Sxy/Sxx and a y bx. 3. Use residual plots to check for nonnormality, inequality of variances, or an incorrectly fit model. 4. Confidence intervals can be constructed to estimate the intercept a and slope b of the regression line and to estimate the average value of y, E( y), for a given value of x. 5. Prediction intervals can be constructed to predict a particular observation, y, for a given value of x. For a given x, prediction intervals are always wider than confidence intervals. III. Analysis of Variance V. Correlation Analysis 1. Total SS SSR SSE, where Total SS Syy and SSR (Sxy)2/Sxx. 2. The best estimate of s 2 is MSE SSE/(n 2). 1. Use the correlation coefficient to measure the relationship between x and y when both variables are random: IV. Testing, Estimation, and Prediction 1. A test for the significance of the linear regression—H0 : b 0—can be implemented using one of two test statistics: b S R or F M t E/Sxx MS E S M 2. The strength of the relationship between x and y can be measured using R S S r 2 l SS ta To S x y r Syy S x x 2. The sign of r indicates the direction of the relationship; r near 0 indicates no linear relationship, and r near 1 or 1 indicates a strong linear relationship. 3. A test of the significance of the correlation coefficient uses the statistic t r 22 n 1 r which gets closer to 1 as the relationship gets stronger. and is identical to the test of the slope b. Linear Regression Procedures In Chapter 3, we used some of the linear regression procedures available in MINITAB to obtain a graph of the best-fit |
ting least-squares regression line and to calculate the correlation coefficient r for a bivariate data set. Now that you have studied the testing and estimation techniques for a simple linear regression analysis, more MINITAB options are available to you. MY MINITAB ❍ 541 Consider the relationship between x mathematics achievement test score and y final calculus grade, which was used as an example throughout this chapter. Enter the data into the first two columns of a MINITAB worksheet. If you use Graph Scatterplot Simple, you can generate the scatterplot for the data, as shown in Figure 12.2. However, the main inferential tools for linear regression analysis are generated using Stat Regression Regression. (You will use this same sequence of commands in Chapter 13 when you study multiple regression analysis.) The Dialog box for the Regression command is shown in Figure 12.20. Select y for the “Response” variable and x for the “Predictor” variable. You may now choose to generate some residual plots to check the validity of your regression assumptions before you use the model for estimation or prediction. Choose Graphs to display the Dialog box in Figure 12.21. FI GUR E 1 2. 20 ● FI GUR E 1 2. 21 ● 542 ❍ CHAPTER 12 LINEAR REGRESSION AND CORRELATION We have used Regular residual plots, checking the boxes for “Normal plot of residuals” and “Residuals versus fits.” Click OK to return to the main Dialog box. If you now choose Options, you can obtain confidence and prediction intervals for either of these cases: • A single value of x (typed in the box marked “Prediction intervals for new observations”) • Several values of x stored in a column (say, C3) of the worksheet Enter the value x 50 in Figure 12.22 to match the output given in Figure 12.15. When you click OK twice, the regression output is generated as shown in Figure 12.23. The two diagnostic plots will appear in separate graphics windows. F IG URE 12. 22 ● F IG URE 12. 23 ● SUPPLEMENTARY EXERCISES ❍ 543 If you wish, you can now plot the data points, the regression line, and the upper and lower confidence and prediction limits (see |
Figure 12.16) using Stat Regression Fitted Line Plot. Select y and x for the response and predictor variables and click “Display confidence interval” and “Display prediction interval” in the Options Dialog box. Make sure that Linear is selected as the “Type of Regression Model,” so that you will obtain a linear fit to the data. Recall that in Chapter 3, we used the command Stat Basic Statistics Correlation to obtain the value of the correlation coefficient r. Make sure that the box marked “Display p-values” is checked. The output for this command (using the test/grade data) is shown in Figure 12.24. Notice that the p-value for the test of H0 : r 0 is identical to the p-value for the test of H0 : b 0 because the tests are exactly equivalent! FI GUR E 1 2. 24 ● Supplementary Exercises 12.58 Potency of an Antibiotic An experiment was conducted to observe the effect of EX1258 an increase in temperature on the potency of an antibiotic. Three 1-ounce portions of the antibiotic were stored for equal lengths of time at each of these temperatures: 30°, 50°, 70°, and 90°. The potency readings observed at each temperature of the experimental period are listed here: Potency Readings, y 38, 43, 29 32, 26, 33 19, 27, 23 14, 19, 21 Temperature, x 30° 50° 70° 90° Use an appropriate computer program to answer these questions: a. Find the least-squares line appropriate for these data. b. Plot the points and graph the line as a check on your calculations. c. Construct the ANOVA table for linear regression. d. If they are available, examine the diagnostic plots to check the validity of the regression assumptions. e. Estimate the change in potency for a 1-unit change in temperature. Use a 95% confidence interval. f. Estimate the average potency corresponding to a temperature of 50°. Use a 95% confidence interval. g. Suppose that a batch of the antibiotic was stored at 50° for the same length of time as the experimental period. Predict the potency of the batch at the end of the storage period. Use a 95% prediction interval. 12.59 Plant Science An experiment was conducted to determine the effect of soil appli- EX |
1259 cations of various levels of phosphorus on the inorganic phosphorus levels in a particular plant. The data in the table represent the levels of inorganic phosphorus in micromoles (mmol) per gram dry weight of Sudan grass roots grown in the greenhouse for 28 days, in the absence of zinc. Use the MINITAB output to answer the questions. 544 ❍ CHAPTER 12 LINEAR REGRESSION AND CORRELATION Phosphorus Applied, x.5 mmol.25 mmol.10 mmol Phosphorus in Plant, y 204 195 247 245 159 127 95 144 128 192 84 71 a. Plot the data. Do the data appear to exhibit a linear Use an appropriate computer software package to analyze these data. State any conclusions you can draw. 12.61 Nematodes Some varieties of nematodes, roundworms that live in the soil and fre- EX1261 quently are so small as to be invisible to the naked eye, feed on the roots of lawn grasses and other plants. This pest, which is particularly troublesome in warm climates, can be treated by the application of nematicides. Data collected on the percent kill of nematodes for various rates of application (dosages given in pounds per acre of active ingredient) are as follows: Rate of Application, x 2 Percent Kill, y 3 4 5 50, 56, 48 63, 69, 71 86, 82, 76 94, 99, 97 relationship? MINITAB diagnostic plots for Exercise 12.61 b. Find the least-squares line relating the plant phosphorus levels y to the amount of phosphorus applied to the soil x. Graph the least-squares line as a check on your answer. c. Do the data provide sufficient evidence to indicate that the amount of phosphorus present in the plant is linearly related to the amount of phosphorus applied to the soil? d. Estimate the mean amount of phosphorus in the plant if.20 mmol of phosphorus is applied to the soil, in the absence of zinc. Use a 90% confidence interval. MINITAB output for Exercise 12.59 Regression Analysis: y versus x The regression equation is y = 80.9 + 271 x Predictor Coef SE Coef T P Constant 80.85 22.40 3.61 0.005 x 270.82 68.31 3.96 0.003 S = 39.0419 R-Sq = 61.1% R-Sq(adj) = 57. |
2% Predicted Values for New Observations New Obs Fit SE Fit 90.0% CI 90.0% PI 1 135.0 12.6 (112.1, 157.9) (60.6, 209.4) Values of Predictors for New Observations New Obs x 1 0.200 Normal Probability Plot of the Residuals (response is y) 99 95 90 80 70 60 50 40 30 20 10 5 t n e c r e P 1 10 5 0 Residual 5 10 Residuals versus the Fitted Values (response is y) 5.0 2.5 0.0 2.5 5.0 l a u d i s e R EX1260 12.60 Track Stats! An experiment was conducted to investigate the effect of a training program on the length of time for a typical male college student to complete the 100-yard dash. Nine students were placed in the program. The reduction y in time to complete the 100-yard dash was measured for three students at the end of 2 weeks, for three at the end of 4 weeks, and for three at the end of 6 weeks of training. The data are given in the table. Reduction in Time, y (sec) 1.6,.8, 1.0 2.1, 1.6, 2.5 3.8, 2.7, 3.1 Length of Training, x (wk) 2 4 6 50 60 70 80 90 100 Fitted Value Use an appropriate computer printout to answer these questions: a. Calculate the coefficient of correlation r between rates of application x and percent kill y. b. Calculate the coefficient of determination r 2 and interpret. c. Fit a least-squares line to the data. d. Suppose you wish to estimate the mean percent kill for an application of 4 pounds of the nematicide per acre. What do the diagnostic plots generated by MINITAB tell you about the validity of the regression assumptions? Which assumptions may have been violated? Can you explain why? sizes. The table that follows gives the actual and estimated lengths of the specified objects. Object Estimated (inches) Actual (inches) SUPPLEMENTARY EXERCISES ❍ 545 12.62 Knee Injuries Athletes and others suffering the same type of injury to the knee often require anterior and posterior ligament reconstruction. In order to determine the proper length of bone-patellar tendonbone grafts, experiments were done |
using three imaging techniques to determine the required length of the grafts, and these results were compared to the actual length required. A summary of the results of a simple linear regression analysis for each of these three methods is given in the following table.15 Imaging Technique Radiographs Standard MRI 3-dimensional MRI Coefficient of Determination, r 2 0.80 0.43 0.65 Intercept 3.75 20.29 1.80 p-value Slope 1.031 0.0001 0.497 0.011 0.977 0.0001 a. What can you say about the significance of each of the three regression analyses? b. How would you rank the effectiveness of the three regression analyses? What is the basis of your decision? c. How do the values of r 2 and the p-values compare in determining the best predictor of actual graft lengths of ligament required? EX1263 12.63 Achievement Tests II Refer to Exercise 12.11 and data set EX1211 regarding the relationship between the Academic Performance Index (API), a measure of school achievement based on the results of the Stanford 9 Achievement test, and the percentage of students who are considered English Language Learners (ELL). The following table shows the API for eight elementary schools in Riverside County, California, along with the percentage of students at that school who are considered English Language Learners.3 School 1 API ELL 588 58 2 659 22 3 4 710 14 657 30 5 669 11 6 641 26 7 557 39 8 743 6 a. Use an appropriate program to analyze the relation- ship between API and ELL. b. Explain all pertinent details of your analysis. 12.64 How Long Is It? Refer to Exercise 12.12 and data set EX1212 regarding a subject’s ability to estimate Pencil Dinner plate Book 1 Cell phone Photograph Toy Belt Clothespin Book 2 Calculator 7.00 9.50 7.50 4.00 14.50 3.75 42.00 2.75 10.00 3.50 6.00 10.25 6.75 4.25 15.75 5.00 41.50 3.75 9.25 4.75 a. Use an appropriate program to analyze the relationship between the actual and estimated lengths of the listed objects. b. Explain all pertinent details of your analysis. 12.65 Tennis, Anyone? If you play tennis, you know that tennis racquets vary in their EX1265 physical characteristics |
. The data in the accompanying table give measures of bending stiffness and twisting stiffness as measured by engineering tests for 12 tennis racquets: Racquet Bending Stiffness, x Twisting Stiffness 10 11 12 419 407 363 360 257 622 424 359 346 556 474 441 227 231 200 211 182 304 384 194 158 225 305 235 a. If a racquet has bending stiffness, is it also likely to have twisting stiffness? Do the data provide evidence that x and y are positively correlated? b. Calculate the coefficient of determination r 2 and interpret its value. 12.66 Avocado Research Movement of avocados into the United States from certain areas is EX1266 prohibited because of the possibility of bringing fruit flies into the country with the avocado shipments. However, certain avocado varieties supposedly are resistant to fruit fly infestation before they soften as a result of ripening. The data in the table resulted from an experiment in 546 ❍ CHAPTER 12 LINEAR REGRESSION AND CORRELATION which avocados ranging from 1 to 9 days after harvest were exposed to Mediterranean fruit flies. Penetrability of the avocados was measured on the day of exposure, and the percentage of the avocado fruit infested was assessed. Days after Harvest Penetrability Percentage Infected 1 2 4 5 6 7 9.91.81.95 1.04 1.22 1.38 1.77 30 40 45 57 60 75 100 Use the MINITAB printout of the regression of percentage infected ( y) on days after harvest (x) to analyze the relationship between these two variables. Explain all pertinent parts of the printout and interpret the results of any tests. MINITAB output for Exercise 12.66 Regression Analysis: Percent versus x The regression equation is Percent = 18.4 + 8.18 x Predictor Coef SE Coef T P Constant 18.427 5.110 3.61 0.015 x 8.1768 0.9285 8.81 0.000 S = 6.35552 R-Sq = 93.9% R-Sq(adj) = 92.7% Analysis of Variance Source DF SS MS F P Regression 1 3132.9 3132.9 77.56 0.000 Residual Error 5 202.0 40.4 Total 6 3334.9 12.67 Avocados II Refer to Exercise 12.66. Suppose the experimenter wants to examine |
the relationship between the penetrability and the number of days after harvest. Does the method of linear regression discussed in this chapter provide an appropriate method of analysis? If not, what assumptions have been violated? Use the MINITAB diagnostic plots provided. MINITAB diagnostic plots for Exercise 12.67 Normal Probability Plot of the Residuals (response is Penetrability) t n e c r e P 99 95 90 80 70 60 50 40 30 20 10 5 1 0.3 0.2 0.1 0.0 Residual 0.1 0.2 0.3 Residuals versus the Fitted Values (response is Penetrability) 0.20 0.15 0.10 0.05 0.00 0.05 0.10 l a u d i s e R 0.6 0.8 1.0 1.2 1.4 1.6 Fitted Value 12.68 Metabolism and Weight Gain Why is it that one person may tend to gain weight, EX1268 even if he eats no more and exercises no less than a slim friend? Recent studies suggest that the factors that control metabolism may depend on your genetic makeup. One study involved 11 pairs of identical twins fed about 1000 calories per day more than needed to maintain initial weight. Activities were kept constant, and exercise was minimal. At the end of 100 days, the changes in body weight (in kilograms) were recorded for the 22 twins.16 Is there a significant positive correlation between the changes in body weight for the twins? Can you conclude that this similarity is caused by genetic similarities? Explain. Pair Twin A Twin 10 11 4.2 5.5 7.1 7.0 7.8 8.2 8.2 9.1 11.5 11.2 13.0 7.3 6.5 5.7 7.2 7.9 6.4 6.5 8.2 6.0 13.7 11.0 12.69 Movie Reviews How many weeks can a movie run and still make a reasonable EX1269 profit? The data that follow show the number of weeks in release (x) and the gross to date (y) for the top 10 movies during a recent week.17 Movie 1. The Prestige 2. The Departed 3. Flags of Our Fathers 4. Open Season 5. Flicka 6. The Grudge 2 7. Man of the Year 8. Marie Antoinette 9. The |
Texas Chainsaw Massacre: The Beginning 10. The Marine Source: Entertainment Weekly Gross to Date (in millions) Weeks in Release $14.8 $77.1 $10.2 $69.6 $ 7.7 $31.4 $22.5 $ 5.3 $36.0 $12.. Plot the points in a scatterplot. Does it appear that the relationship between x and y is linear? How would you describe the direction and strength of the relationship? b. Calculate the value of r 2. What percentage of the overall variation is explained by using the linear model rather than y to predict the response variable y? c. What is the regression equation? Do the data provide evidence to indicate that x and y are linearly related? Test using a 5% significance level. d. Given the results of parts b and c, is it appropriate to use the regression line for estimation and prediction? Explain your answer. 12.70 In addition to increasingly large bounds on error, why should an experimenter refrain from predicting y for values of x outside the experimental region? 12.71 If the experimenter stays within the experimental region, when will the error in predicting a particular value of y be maximum? EX1272 12.72 Oatmeal, Anyone? An agricultural experimenter, investigating the effect of the amount of nitrogen x applied in 100 pounds per acre on the yield of oats y measured in bushels per acre, collected the following data: x y 1 22 19 2 38 41 3 57 54 4 68 65 a. Find the least-squares line for the data. b. Construct the ANOVA table. c. Is there sufficient evidence to indicate that the yield of oats is linearly related to the amount of nitrogen applied? Use a.05. d. Predict the expected yield of oats with 95% confi- dence if 250 pounds of nitrogen per acre are applied. SUPPLEMENTARY EXERCISES ❍ 547 e. Estimate the average increase in yield for an increase of 100 pounds of nitrogen per acre with 99% confidence. f. Calculate r 2 and explain its significance in terms of predicting y, the yield of oats. 12.73 Fresh Roses A horticulturalist devised a scale to measure the freshness EX1273 of roses that were packaged and stored for varying periods of time before transplanting. The freshness measurement y and the length of time |
in days that the rose is pack-aged and stored before transplanting x are given below. x y 5 15.3 16.8 10 13.6 13.8 15 9.8 8.7 20 5.5 4.7 25 1.8 1.0 a. Fit a least-squares line to the data. b. Construct the ANOVA table. c. Is there sufficient evidence to indicate that freshness is linearly related to storage time? Use a.05. d. Estimate the mean rate of change in freshness for a 1-day increase in storage time usig a 98% confidence interval. e. Estimate the expected freshness measurement for a storage time of 14 days with a 95% confidence interval. f. Of what value is the linear model in reference to y in predicting freshness? EX1274 12.74 Lexus, Inc. The makers of the Lexus automobile have steadily increased their sales since their U.S. launch in 1989. However, the rate of increase changed in 1996 when Lexus introduced a line of trucks. The sales of Lexus from 1996 to 2005 are shown in the table:18 Year 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 80 100 155 180 210 224 234 260 288 303 Sales (thousands of vehicles) Source: Adapted from: Automotive News, 26 January 2004 and 22 May 2006 a. Plot the data using a scatterplot. How would you describe the relationship between year and sales of Lexus? b. Find the least-squares regression line relating the sales of Lexus to the year being measured? c. Is there sufficient evidence to indicate that sales are linearly related to year? Use a.05. 548 ❍ CHAPTER 12 LINEAR REGRESSION AND CORRELATION d. Predict the sales of Lexus for the year 2006 using Data Display (continued) a 95% prediction interval. e. If they are available, examine the diagnostic plots to check the validity of the regression assumptions. f. If you were to predict the sales of Lexus in the year 2015, what problems might arise with your prediction? EX1275 12.75 Starbucks Here is some nutritional data for a sampling of Starbucks products (16 fluid ounces), taken from the company website, www.starbucks.com.19 The complete data set (starbucks.mtp) can be found with the other data sets on the Student Companion Website |
. Data Display Row Product 1 CaffèMocha-nowhip 2 CaramelFrappuccino® BlendedCoffee-nowhip 3 ChocolateBrownie Frappuccino® BlendedCoffee-nowhip 4 ChocolateMalt Frappuccino® BlendedCrème-whip 5 EggnogLatte-nowhip 6 HotChocolate-nowhip 7 IcedCaffèMocha-whip 8 IcedWhiteChocolate Mocha-whip 9 MochaFrappuccino® BlendedCoffee-whip 10 PeppermintMocha-nowhip 11 Tazo®ChaiCrème Frappuccino® BlendedTea-nowhip 12 ToffeeNutCrème-whip 13 ToffeNutLatte-nowhip 14 VanillaFrappuccino® BlendedCrème-whip 15 WhiteHotChocolate-whip Calories 300 280 Fat Calories 110 30 370 80 610 200 410 340 350 490 420 370 370 460 330 480 580 180 140 180 210 150 110 40 220 120 150 250 Total Fat (g) 12.0 3.5 9.0 22.0 20.0 15.0 20.0 24.0 16.0 12.0 4.5 24.0 13.0 17.0 28.0 Saturated Fat (g) 7 2 6 11 12 8 12 16 10 6 1 15 8 9 19 Row 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Cholesterol (mg) 40 15 15 65 115 50 75 75 65 40 5 100 50 55 95 Row Total Carbs (g) 41 57 69 90 41 42 37 58 61 59 69 45 41 66 65 Sugar (g) 31 48 56 72 38 35 27 54 51 49 64 44 38 62 64 Sodium (mg) 150 250 310 430 240 190 105 220 260 150 370 380 340 380 310 Protein (g) 13 5 7 15 17 15 9 11 6 13 15 14 13 15 17 Fiber (g 10 2 11 0 12 0 13 0 14 0 15 0 Use the appropriate statistical methods to analyze the relationships between some of the nutritional variables given in the table. Write a summary report explaining any conclusions that you can draw from your analysis. MYAPPLET EXERCISES ❍ 549 Exercises You can refresh your memory about regression lines and the correlation coefficient by doing the MyApplet Exercises at the end of Chapter 3. 12.76 a. Graph the line |
corresponding to the equation y 0.5x 3 by graphing the points corresponding to x 0, 1, and 2. Give the y-intercept and slope for the line. b. Check your graph using the How a Line Works applet. 12.77 a. Graph the line corresponding to the equation y 0.5x 3 by graphing the points corresponding to x 0, 1, and 2. Give the y-intercept and slope for the line. b. Check your graph using the How a Line Works applet. c. How is this line related to the line y 0.5x 3 of Exercise 12.76? 12.78 The MINITAB printout for the data in Table 12.1 is shown below. MINITAB output for Exercise 12.78. Regression Analysis: y versus x The regression equation is y = 40.8 + 0.766 x Predictor Coef SE Coef T P Constant 40.784 8.507 4.79 0.001 x 0.7656 0.1750 4.38 0.002 b. Find the values of SSE and r 2 on the Method of Least Squares applet. Find these values on the MINITAB printout and confirm that they are the same. c. Use the values of b and its standard error SE(b) from the MINITAB printout along with the t-Test for the Slope applet to verify the value of the t statistic and its p-value, given in the printout. 12.79 Use the first applet in Building a Scatterplot to create a scatterplot for the data in Table 12.1. Verify your plot using Figure 12.2. 12.80 Walking Shoes Is your overall satisfaction with your new pair of walking shoes EX1280 correlated with the cost of the shoes? Satisfaction scores and prices were recorded for nine different styles and brands of men’s walking shoes, with the following results:20 Brand and Style Price Score New Balance MW 791 Saucony Grid Omni Walker Asics Gel-Walk Tech New Balance MW 557 Etonic Lite Walker Nike Air Max Healthwalker V Rockport Astride Rockport WT Classic Reebok Move DMX Max $75 90 60 60 60 70 90 90 60 89 84 83 83 79 78 75 72 67 S = 8.70363 R-Sq = 70.5% R-Sq(adj) = |
66.8% Source: “Ratings: Walking Shoes,” Consumer Reports, October 2006, p. 52. Analysis of Variance Source DF SS MS F P Regression 1 1450.0 1450.0 19.14 0.002 Residual Error 8 606.0 75.8 Total 9 2056.0 a. Use the Method of Least Squares applet to find the values of a and b that determine the best fitting line, yˆ a bx. When you think that you have minimized SSE, click the button and see how well you did. What is the equation of the line? Does it match the regression equation given in the MINITAB printout? a. Calculate the correlation coefficient r between price and overall score. How would you describe the relationship between price and overall score? b. Use the applet called Correlation and the Scatterplot to plot the nine data points. What is the correlation coefficient shown on the applet? Compare with the value you calculated in part a. c. Describe the pattern that you see in the scatterplot. Are there any outliers? If so, how would you explain them? 550 ❍ CHAPTER 12 LINEAR REGRESSION AND CORRELATION CASE STUDY Foreign Cars Is Your Car “Made in the U.S.A.”? The phrase “made in the U.S.A.” has become a familiar battle cry as U.S. workers try to protect their jobs from overseas competition. For the past few decades, a major trade imbalance in the United States has been caused by a flood of imported goods that enter the country and are sold at lower cost than comparable American-made goods. One prime concern is the automotive industry, in which the number of imported cars steadily increased during the 1970s and 1980s. The U.S. automobile industry has been besieged with complaints about product quality, worker layoffs, and high prices, and has spent billions in advertising and research to produce an American-made car that will satisfy consumer demands. Have they been successful in stopping the flood of imported cars purchased by American consumers? The data in the table represent the numbers of imported cars y sold in the United States (in millions) for the years 1969–2005.21 To simplify the analysis, we have coded the year using the coded variable x Year 1969. Year (Year 1969), x Number of |
Imported Cars, y Year (Year 1969), x Number of Imported Cars, y 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 10 11 12 13 14 15 16 17 1.1 1.3 1.6 1.6 1.8 1.4 1.6 1.5 2.1 2.0 2.3 2.4 2.3 2.2 2.4 2.4 2.8 3.2 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 3.1 3.1 2.8 2.5 2.1 2.0 1.8 1.8 1.6 1.4 1.4 1.4 1.8 2.1 2.2 2.3 2.2 2.2 2.3 1. Using a scatterplot, plot the data for the years 1969–1988. Does there appear to be a linear relationship between the number of imported cars and the year? 2. Use a computer software package to find the least-squares line for predicting the number of imported cars as a function of year for the years 1969–1988. 3. Is there a significant linear relationship between the number of imported cars and the year? 4. Use the computer program to predict the number of cars that will be imported us- ing 95% prediction intervals for each of the years 2003, 2004, and 2005. 5. Now look at the actual data points for the years 2003–2005. Do the predictions obtained in step 4 provide accurate estimates of the actual values observed in these years? Explain. 6. Add the data for 1989–2005 to your database, and recalculate the regression line. What effect have the new data points had on the slope? What is the effect on SSE? 7. Given the form of the scatterplot for the years 1969–2005, does it appear that a straight line provides an accurate model for the data? What other type of model might be more appropriate? (Use residual plots to help answer this question.) 13 Multiple Regression Analysis GENERAL OBJECTIVES In this chapter, we extend the concepts of linear regression and correlation to a situation where the average value of a random variable y is related to several independent variables—x1, x2,..., xk—in models |
that are more flexible than the straight-line model of Chapter 12. With multiple regression analysis, we can use the information provided by the independent variables to fit various types of models to the sample data, to evaluate the usefulness of these models, and finally to estimate the average value of y or predict the actual value of y for given values of x1, x2,..., xk. CHAPTER INDEX ● Adjusted R 2 (13.3) ● The analysis of variance F-test (13.3) ● Analysis of variance for multiple regression (13.3) ● Causality and multicollinearity (13.9) ● The coefficient of determination R 2 (13.3) ● Estimation and prediction using the regression model (13.3) ● The general linear model and assumptions (13.2) ● The method of least squares (13.3) ● Polynomial regression model (13.4) ● Qualitative variables in a regression model (13.5) ● Residual plots (13.3) ● Sequential sums of squares (13.3) ● Stepwise regression analysis (13.8) ● Testing the partial regression coefficients (13.3) ● Testing sets of regression coefficients (13.6) © Will & Deni McIntyre/CORBIS “Made in the U.S.A.”— Another Look In Chapter 12, we used simple linear regression analysis to try to predict the number of cars imported into the United States over a period of years. Unfortunately, the number of imported cars does not really follow a linear trend pattern, and our predictions were far from accurate. We reexamine the same data at the end of this chapter, using the methods of multiple regression analysis. 551 552 ❍ CHAPTER 13 MULTIPLE REGRESSION ANALYSIS INTRODUCTION 13.1 Multiple linear regression is an extension of simple linear regression to allow for more than one independent variable. That is, instead of using only a single independent variable x to explain the variation in y, you can simultaneously use several independent (or predictor) variables. By using more than one independent variable, you should do a better job of explaining the variation in y and hence be able to make more accurate predictions. For example, a company’s regional sales y of a product might be related to three factors: • • • x1—the amount spent on |
television advertising x2—the amount spent on newspaper advertising x3—the number of sales representatives assigned to the region A researcher would collect data measuring the variables y, x1, x2, and x3, and then use these sample data to construct a prediction equation relating y to the three predictor variables. Of course, several questions arise, just as they did with simple linear regression: • How well does the model fit? • How strong is the relationship between y and the predictor variables? • Have any important assumptions been violated? • How good are estimates and predictions? The methods of multiple regression analysis—which are almost always done with a computer software program—can be used to answer these questions. This chapter provides a brief introduction to multiple regression analysis and the difficult task of model building—that is, choosing the correct model for a practical application. THE MULTIPLE REGRESSION MODEL 13.2 The general linear model for a multiple regression analysis describes a particular response y using the model given next. GENERAL LINEAR MODEL AND ASSUMPTIONS y b0 b1x1 b2x2 bkxk e where y is the response variable that you want to predict. • • b0, b1, b2,..., bk are unknown constants. • • x1, x2,..., xk are independent predictor variables that are measured without error. e is the random error, which allows each response to deviate from the average value of y by the amount e. You must assume that the values of e (1) are independent; (2) have a mean of 0 and a common variance s 2 for any set x1, x2,..., xk; and (3) are normally distributed. When these assumptions about e are met, the average value of y for a given set of values x1, x2,..., xk is equal to the deterministic part of the model: E(y) b0 b1x1 b2x2 bkxk 13.3 A MULTIPLE REGRESSION ANALYSIS ❍ 553 You will notice that the multiple regression model and assumptions are very similar to the model and assumptions used for linear regression. It will probably not surprise you that the testing and estimation procedures are also extensions of those used in Chapter 12. Multiple regression models are very flexible and can take many forms, depending on the way in |
which the independent variables x1, x2,..., xk are entered into the model. We begin with a simple multiple regression model, explaining the basic concepts and procedures with an example. As you become more familiar with the multiple regression procedures, we increase the complexity of the examples, and you will see that the same procedures can be used for models of different forms, depending on the particular application. EXAMPLE 13.1 Suppose you want to relate a random variable y to two independent variables x1 and x2. The multiple regression model is y b0 b1x1 b2x2 e with the mean value of y given as E(y) b0 b1x1 b2x2 This equation is a three-dimensional extension of the line of means from Chapter 12 and traces a plane in three-dimensional space (see Figure 13.1). The constant b0 is called the intercept—the average value of y when x1 and x2 are both 0. The coefficients b1 and b2 are called the partial slopes or partial regression coefficients. The partial slope bi (for i 1 or 2) measures the change in y for a one-unit change in xi when all other independent variables are held constant. The value of the partial regression coefficient—say, b1—with x1 and x2 in the model is generally not the same as the slope when you fit a line with x1 alone. These coefficients are the unknown constants, which must be estimated using sample data to obtain the prediction equation. Instead of x and y plotted in two-dimensional space, y and x1, x2,..., xk have to be plotted in (k 1) dimensions. F IGU RE 1 3. 1 Plane of means for Example 13.1 ● E(y) x1 x2 A MULTIPLE REGRESSION ANALYSIS 13.3 A multiple regression analysis involves estimation, testing, and diagnostic procedures designed to fit the multiple regression model E( y) b0 b1x1 b2x2 bkxk 554 ❍ CHAPTER 13 MULTIPLE REGRESSION ANALYSIS to a set of data. Because of the complexity of the calculations involved, these procedures are almost always implemented with a regression program from one of several computer software packages. All give similar output in slightly different forms. We follow the basic patterns set in simple linear regression, beginning with an outline of the |
general procedures and illustrated with an example. The Method of Least Squares The prediction equation yˆ b0 b1x1 b2x2 bkxk is the line that minimizes SSE, the sum of squares of the deviations of the observed values y from the predicted values yˆ. These values are calculated using a regression program. How do real estate agents decide on the asking price for a newly listed condominium? A computer database in a small community contains the listed selling price y (in thousands of dollars), the amount of living area x1 (in hundreds of square feet), and the numbers of floors x2, bedrooms x3, and bathrooms x4, for n 15 randomly selected condos currently on the market. The data are shown in Table 13.1. EXAMPLE 13.2 TABLE 13.1 ● Data on 15 Condominiums Observation List Price, y Living Area, x1 Floors, x2 Bedrooms, x3 Baths, x4 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 169.0 218.5 216.5 225.0 229.9 235.0 239.9 247.9 260.0 269.9 234.9 255.0 269.9 294.5 309.9 6 10 10 11 13 13 13 17 19 18 13 18 17 20 21.7 2.5 2 2.5 2 2 2 2 3 3 3 The multiple regression model is E(y) b0 b1x1 b2x2 b3x3 b4x4 which is fit using the MINITAB software package. You can find instructions for generating this output in the section “My MINITAB” at the end of this chapter. The first portion of the regression output is shown in Figure 13.2. You will find the fitted regression equation in the first two lines of the printout: yˆ 119 6.27x1 16.2x2 2.67x3 30.3x4 The partial regression coefficients are shown with slightly more accuracy in the second section. The columns list the name given to each independent predictor variable, its estimated regression coefficient, its standard error, and the t- and p-values that are used to test its significance in the presence of all the other predictor variables. We explain these tests in |
more detail in a later section. 13.3 A MULTIPLE REGRESSION ANALYSIS ❍ 555 F IG URE 13.2 A portion of the MINITAB printout for Example 13.2 ● Regression Analysis: List Price versus Square Feet, Number of Floors, Bedrooms, Baths The regression equation is List Price = 119 + 6.27 Square Feet - 16.2 Number of Floors - 2.67 Bedrooms + 30.3 Baths Predictor Coef SE Coef T P Constant 118.763 9.207 12.90 0.000 Square Feet 6.2698 0.7252 8.65 0.000 Number of Floors -16.203 6.212 -2.61 0.026 Bedrooms -2.673 4.494 -0.59 0.565 Baths 30.271 6.849 4.42 0.001 The Analysis of Variance for Multiple Regression The analysis of variance divides the total variation in the response variable y, Total SS Syi 2 (S yi)2 n into two portions: • SSR (sum of squares for regression) measures the amount of variation explained by using the regression equation. • SSE (sum of squares for error) measures the residual variation in the data that is not explained by the independent variables. so that Total SS SSR SSE The degrees of freedom for these sums of squares are found using the following argument. There are (n 1) total degrees of freedom. Estimating the regression line requires estimating k unknown coefficients; the constant b0 is a function of y and the other estimates. Hence, there are k regression degrees of freedom, leaving (n 1) k degrees of freedom for error. As in previous chapters, the mean squares are calculated as MS SS/df. The ANOVA table for the real estate data in Table 13.1 is shown in the second portion of the MINITAB printout in Figure 13.3. There are n 15 observations and k 4 independent predictor variables. You can verify that the total degrees of freedom, (n 1) 14, is divided into k 4 for regression and (n k 1) 10 for error. FI GUR E 13. 3 A portion of the MINITAB printout for Example 13.2 ● S = 6.84930 R-Sq = 97.1% R-Sq(adj) = 96.0% Analysis of Variance Source DF SS MS F P |
Regression 4 15913.0 3978.3 84.80 0.000 Residual Error 10 469.1 46.9 Total 14 16382.2 Source DF Seq SS Square Feet 1 14829.3 Number of Floors 1 0.9 Bedrooms 1 166.4 Baths 1 916.5 The best estimate of the random variation s 2 in the experiment—the variation that is unexplained by the predictor variables—is as usual given by E SS 46.9 s2 MSE 1 n k 556 ❍ CHAPTER 13 MULTIPLE REGRESSION ANALYSIS from the ANOVA table. The first line of Figure 13.3 also shows s s2 6.84930 using computer accuracy. The computer uses these values internally to produce test statistics, confidence intervals, and prediction intervals, which we discuss in subsequent sections. The last section of Figure 13.3 shows a decomposition of SSR 15,913.0 in which the conditional contribution of each predictor variable given the variables already entered into the model is shown for the order of entry that you specify in your regression program. For the real estate example, the MINITAB program entered the variables in this order: square feet, then numbers of floors, bedrooms, and baths. These conditional or sequential sums of squares each account for one of the k 4 regression degrees of freedom. It is interesting to notice that the predictor variable x1 alone accounts for 14,829.3/15,913.0.932 or 93.2% of the total variation explained by the regression model. However, if you change the order of entry, another variable may account for the major part of the regression sum of squares! Testing the Usefulness of the Regression Model Recall in Chapter 12 that you tested to see whether y and x were linearly related by testing H0 : b 0 with either a t-test or an equivalent F-test. In multiple regression, there is more than one partial slope—the partial regression coefficients. The t- and F-tests are no longer equivalent. The Analysis of Variance F-Test Is the regression equation that uses information provided by the predictor variables x1, x2,..., xk substantially better than the simple predictor y that does not rely on any of the x-values? This question is answered using an overall F-test with the hypotheses: The overall F-test |
(for the significance of the model) in multiple regression is one-tailed. H0 : b1 b2 bk 0 versus Ha : At least one of b1, b2,..., bk is not 0 The test statistic is found in the ANOVA table (Figure 13.3) as.3 84.80 7 39 9 which has an F distribution with df1 k 4 and df2 (n k 1) 10. Since the exact p-value, P.000, is given in the printout, you can declare the regression to be highly significant. That is, at least one of the predictor variables is contributing significant information for the prediction of the response variable y. The Coefficient of Determination, R 2 How well does the regression model fit? The regression printout provides a statistical measure of the strength of the model in the coefficient of determination, R2—the proportion of the total variation that is explained by the regression of y on x1, x2,..., xk—defined as MINITAB printouts report R 2 as a percentage rather than a proportion. 9 1, R S S R2 3, ta SS l To 5 6 1 3 1.971 or 97.1% 8 2 0 2.. 13.3 A MULTIPLE REGRESSION ANALYSIS ❍ 557 R 2 is the multivariate equivalent of r 2, used in linear regression. The coefficient of determination is sometimes called multiple R2 and is found in the first line of Figure 13.3, labeled “R-Sq.” Hence, for the real estate example, 97.1% of the total variation has been explained by the regression model. The model fits very well! It may be helpful to know that the value of the F statistic is related to R2 by the formula F R2/k (1 R2)/(n k 1) so that when R2 is large, F is large, and vice versa. Interpreting the Results of a Significant Regression Testing the Significance of the Partial Regression Coefficients Once you have determined that the model is useful for predicting y, you should explore the nature of the “usefulness’’ in more detail. Do all of the predictor variables add important |
information for prediction in the presence of other predictors already in the model? The individual t-tests in the first section of the regression printout are designed to test the hypotheses H0 : bi 0 versus Ha : bi 0 for each of the partial regression coefficients, given that the other predictor variables are already in the model. These tests are based on the Student’s t statistic given by b t b i i (b S i) E You can show that S R F M M E S R 2/k (1 R 2)/(n k 1) which has df (n k 1) degrees of freedom. The procedure is identical to the one used to test a hypothesis about the slope b in the simple linear regression model.† Figure 13.4 shows the t-tests and p-values from the upper portion of the MINITAB printout. By examining the p-values in the last column, you can see that all the variables except x3, the number of bedrooms, add very significant information for predicting y, even with all the other independent variables already in the model. Could the model be any better? It may be that x3 is an unnecessary predictor variable. One option is to remove this variable and refit the model with a new set of data! ● Predictor Coef SE Coef T P Constant 118.763 9.207 12.90 0.000 Square Feet 6.2698 0.7252 8.65 0.000 Number of Floors -16.203 6.212 -2.61 0.026 Bedrooms -2.673 4.494 -0.59 0.565 Baths 30.271 6.849 4.42 0.001 Test for the significance of the individual coefficient bi, using t-tests. F IG URE 13.4 A portion of the MINITAB printout for Example 13.2 The Adjusted Value of R 2 Notice from the definition of R2 SSR/Total SS that its value can never decrease with the addition of more variables into the regression model. Hence, R2 can be artificially inflated by the inclusion of more and more predictor variables. †Some packages use the t statistic just described, whereas others use the equivalent F statistic (F t2), since the square of a t statistic with v degrees of freedom is equal to an F |
statistic with 1 df in the numerator and v degrees of freedom in the denominator. 558 ❍ CHAPTER 13 MULTIPLE REGRESSION ANALYSIS An alternative measure of the strength of the regression model is adjusted for de- grees of freedom by using mean squares rather than sums of squares: R2(adj) 1 100% E S M n 1) /( SS Total Use R 2(adj) for comparing one or more possible models. For the real estate data in Figure 13.3, R2(adj) 1 9. 6 4 2/14. 2 8 16,3 100% 96.0% is found in the first line of the printout. The value “R-Sq(adj) 96.0%” represents the percentage of variation in the response y explained by the independent variables, corrected for degrees of freedom. The adjusted value of R2 is mainly used to compare two or more regression models that use different numbers of independent predictor variables. Checking the Regression Assumptions Before using the regression model for its main purpose—estimation and prediction of y—you should look at computer-generated residual plots to make sure that all the regression assumptions are valid. The normal probability plot and the plot of residuals versus fit are shown in Figure 13.5 for the real estate data. There appear to be three observations that do not fit the general pattern. You can see them as outliers in both graphs. These three observations should probably be investigated; however, they do not provide strong evidence that the assumptions are violated. FI GUR E 13. 5 MINITAB diagnostic plots ● Residuals versus the Fitted Values (response is List Price) 10 10 15 99 95 90 80 70 60 50 40 30 20 10 5 t n e c r e P 150 175 200 225 250 275 300 Fitted Value Normal Probability Plot of the Residuals (response is List Price) 1 15 10 5 0 Residual 5 10 15 For given values of x1, x2,..., xk, the prediction interval will always be wider than the confidence interval. 13.4 A POLYNOMIAL REGRESSION MODEL ❍ 559 Using the Regression Model for Estimation and Prediction Finally, once you have determined that the model is effective in describing the relationship between y and the predictor variables x1, x2,... |
, xk, the model can be used for these purposes: • Estimating the average value of y—E(y)—for given values of x1, x2,..., xk • Predicting a particular value of y for given values of x1, x2,..., xk The values of x1, x2,..., xk are entered into the computer, and the computer generates the fitted value yˆ together with its estimated standard error and the confidence and prediction intervals. Remember that the prediction interval is always wider than the confidence interval. Let’s see how well our prediction works for the real estate data, using another house from the computer database—a house with 1000 square feet of living area, one floor, three bedrooms, and two baths, which was listed at $221,500. The printout in Figure 13.6 shows the confidence and prediction intervals for these values. The actual value falls within both intervals, which indicates that the model is working very well! F IG URE 13.6 Confidence and prediction intervals for Example 13.2 ● Predicted Values for New Observations New Obs Fit SE Fit 95% CI 95% PI 1 217.78 3.11 (210.86, 224.70) (201.02, 234.54) Values of Predictors for New Observations New Square Number of Obs Feet Floors Bedrooms Baths 1 10.0 1.00 3.00 2.00 A POLYNOMIAL REGRESSION MODEL 13.4 In Section 13.3, we explained in detail the various portions of the multiple regression printout. When you perform a multiple regression analysis, you should use a step-bystep approach: 1. Obtain the fitted prediction model. 2. Use the analysis of variance F-test and R2 to determine how well the model fits the data. 3. Check the t-tests for the partial regression coefficients to see which ones are 4. contributing significant information in the presence of the others. If you choose to compare several different models, use R2(adj) to compare their effectiveness. 5. Use computer-generated residual plots to check for violation of the regression assumptions. A quadratic equation is y a bx cx2. The graph forms a |
parabola. Once all of these steps have been taken, you are ready to use your model for estimation and prediction. The predictor variables x1, x2,..., xk used in the general linear model do not have to represent different predictor variables. For example, if you suspect that one independent variable x affects the response y, but that the relationship is curvilinear rather than linear, then you might choose to fit a quadratic model: y b0 b1x b2 x2 e 560 ❍ CHAPTER 13 MULTIPLE REGRESSION ANALYSIS The quadratic model is an example of a second-order model because it involves a term whose exponents sum to 2 (in this case, x2).† It is also an example of a polynomial model—a model that takes the form y a bx cx 2 dx3 To fit this type of model using the multiple regression program, observed values of y, x, and x2 are entered into the computer, and the printout can be generated as in Section 13.3. In a study of variables that affect productivity in the retail grocery trade, W.S. Good uses value added per work-hour to measure the productivity of retail grocery outlets.1 He defines “value added” as “the surplus [money generated by the business] available to pay for labor, furniture and fixtures, and equipment.” Data consistent with the relationship between value added per work-hour y and the size x of a grocery outlet described in Good’s article are shown in Table 13.2 for 10 fictitious grocery outlets. Choose a model to relate y to x. EXAMPLE 13.3 TABLE 13.2 ● Data on Store Size and Value Added Store Value Added per Work-Hour, y Size of Store (thousand square feet), 10 $4.08 3.40 3.51 3.09 2.92 1.94 4.11 3.16 3.75 3.60 21.0 12.0 25.2 10.4 30.9 6.8 19.6 14.5 25.0 19.1 Solution You can investigate the relationship between y and x by looking at the plot of the data points in Figure 13.7. The graph suggests that productivity, y, increases as the size of the grocery outlet, x, increases until an optimal |
size is reached. Above that size, productivity tends to decrease. The relationship appears to be curvilinear, and a quadratic model, E(y) b0 b1x b2x2 ● FI GUR E 13. 7 Plot of store size x and value added y for Example 13.3 4.0 3.5 y 3.0 2.5 2.0 10 15 20 x 25 30 †The order of a term is determined by the sum of the exponents of variables making up that term. Terms involving x1 or x2 are first-order. Terms involving x2 2, or x1x2 are second-order. 1, x2 EXAMPLE 13.4 13.4 A POLYNOMIAL REGRESSION MODEL ❍ 561 may be appropriate. Remember that, in choosing to use this model, we are not saying that the true relationship is quadratic, but only that it may provide more accurate estimations and predictions than, say, a linear model. Refer to the data on grocery retail outlet productivity and outlet size in Example 13.3. MINITAB was used to fit a quadratic model to the data and to graph the quadratic prediction curve, along with the plotted data points. Discuss the adequacy of the fitted model. Solution From the printout in Figure 13.8, you can see that the regression equation is yˆ.159.392x.00949x2 The graph of this quadratic equation together with the data points is shown in Figure 13.9. FI GUR E 13. 8 MINITAB printout for Example 13.4 ● Regression Analysis: y versus x, x-sq The regression equation is y = - 0.159 + 0.392 x - 0.00949 x-sq Look at the computer printout and find the labels for “Predictor.” This will tell you what variables have been used in the model. Predictor Coef St Coef T P Constant -0.1594 0.5006 -0.32 0.760 x 0.39193 0.05801 6.76 0.000 x-sq -0.009495 0.001535 -6.19 0.000 S = 0.250298 R-Sq = 87.9% R-Sq(adj) = 84.5% Analysis of |
Variance Source DF SS MS F P Regression 2 3.1989 1.5994 25.53 0.001 Residual Error 7 0.4385 0.0626 Total 9 3.6374 Source DF Seq SS x 1 0.8003 x-sq 1 2.3986 FI GU RE 1 3.9 Fitted quadratic regression line for Example 13.4 ● Fitted Line Plot y 0.1594 0.3919 x 0.009495 x**2 S R-Sq R-Sq(adj) 0.250298 87.9% 84.5% 4.0 3.5 y 3.0 2.5 2.0 10 15 20 x 25 30 To assess the adequacy of the quadratic model, the test of H0 : b1 b2 0 versus Ha : Either b1 or b2 is not 0 is given in the printout as R S F M 25.53 S E M 562 ❍ CHAPTER 13 MULTIPLE REGRESSION ANALYSIS with p-value.001. Hence, the overall fit of the model is highly significant. Quadratic regression accounts for R2 87.9% of the variation in y [R2(adj) 84.5%]. From the t-tests for the individual variables in the model, you can see that both b1 and b2 are highly significant, with p-values equal to.000. Notice from the sequential sum of squares section that the sum of squares for linear regression is.8003, with an additional sum of squares of 2.3986 when the quadratic term is added. It is apparent that the simple linear regression model is inadequate in describing the data. One last look at the residual plots generated by MINITAB in Figure 13.10 ensures that the regression assumptions are valid. Notice the relatively linear appearance of the normal plot and the relative scatter of the residuals versus fits. The quadratic model provides accurate predictions for values of x that lie within the range of the sampled values of x. F IG URE 13.1 0 MINITAB diagnostic plots for Example 13.4 ● Normal Probability Plot of the Residuals (response is y) t n e c r e P 99 95 90 80 70 60 50 40 30 20 10.3 0.2 0.1 0.0 0. |
1 0.2 0.3 0.4 0.50 0.25 0.00 Residual 0.25 0.50 Residuals versus the Fitted Values (response is y) 10 15 20 Fitted Value 25 30 13.4 EXERCISES BASIC TECHNIQUES 13.1 Suppose that E(y) is related to two predictor variables, x1 and x2, by the equation b. What relationship do the lines in part a have to one another? E(y) 3 x1 2x2 a. Graph the relationship between E(y) and x1 when x2 2. Repeat for x2 1 and for x2 0. 13.2 Refer to Exercise 13.1. a. Graph the relationship between E(y) and x2 when x1 0. Repeat for x1 1 and for x1 2. b. What relationship do the lines in part a have to one another? c. Suppose, in a practical situation, you want to model the relationship between E(y) and two predictor variables x1 and x2. What is the implication of using the first-order model E(y) b0 b1x1 b2x2? 13.3 Suppose that you fit the model E(y) b0 b1x1 b2x2 b3x3 to 15 data points and found F equal to 57.44. a. Do the data provide sufficient evidence to indicate that the model contributes information for the prediction of y? Test using a 5% level of significance. b. Use the value of F to calculate R2. Interpret its value. 13.4 The computer output for the multiple regression analysis for Exercise 13.3 provides this information: b0 1.04 b2 2.72 SE(b2).65 b1 1.29 SE(b1).42 b3.41 SE(b3).17 a. Which, if any, of the independent variables x1, x2, and x3 contribute information for the prediction of y? b. Give the least-squares prediction equation. c. On the same sheet of graph paper, graph y versus x1 when x2 1 and x3 0 and when x2 1 and x3.5. What relationship do the two lines have to each other? d. What is the practical interpretation of the parameter b1? 13.5 |
Suppose that you fit the model E(y) b0 b1x b2x2 13.4 A POLYNOMIAL REGRESSION MODEL ❍ 563 a. What type of model have you chosen to fit the data? b. How well does the model fit the data? Explain. c. Do the data provide sufficient evidence to indicate that the model contributes information for the prediction of y? Use the p-value approach. 13.6 Refer to Exercise 13.5. a. What is the prediction equation? b. Graph the prediction equation over the interval 0 x 6. 13.7 Refer to Exercise 13.5. a. What is your estimate of the average value of y when x 0? b. Do the data provide sufficient evidence to indicate that the average value of y differs from 0 when x 0? 13.8 Refer to Exercise 13.5. a. Suppose that the relationship between E(y) and x is a straight line. What would you know about the value of b 2? b. Do the data provide sufficient evidence to indicate curvature in the relationship between y and x? 13.9 Refer to Exercise 13.5. Suppose that y is the profit for some business and x is the amount of capital invested, and you know that the rate of increase in profit for a unit increase in capital invested can only decrease as x increases. You want to know whether the data provide sufficient evidence to indicate a decreasing rate of increase in profit as the amount of capital invested increases. a. The circumstances described imply a one-tailed sta- tistical test. Why? b. Conduct the test at the 1% level of significance. State your conclusions. to 20 data points and obtained the accompanying MINITAB printout. APPLICATIONS MINITAB output for Exercise 13.5 Regression Analysis: y versus x, x-sq The regression equation is y = 10.6 + 4.44 x - 0.648 x-sq Predictor Coef SE Coef T P Constant 10.5638 0.6951 15.20 0.000 x 4.4366 0.5150 8.61 0.000 x-sq -0.64754 0.07988 -8.11 0.000 S = 1.191 R-Sq = 81.5% R-Sq(adj) = 79 |
.3% Analysis of Variance Source DF SS MS F P Regression 2 106.072 53.036 37.37 0.000 Residual Error 17 24.128 1.419 Total 19 130.200 EX1310 13.10 College Textbooks A publisher of college textbooks conducted a study to relate profit per text y to cost of sales x over a 6-year period when its sales force (and sales costs) were growing rapidly. These inflation-adjusted data (in thousands of dollars) were collected: Profit per Text, y 16.5 22.4 24.9 28.8 31.5 35.8 Sales Cost per Text, x 5.0 5.6 6.1 6.8 7.4 8.6 Expecting profit per book to rise and then plateau, the publisher fitted the model E(y) b0 b1x b2x 2 to the data. 564 ❍ CHAPTER 13 MULTIPLE REGRESSION ANALYSIS MINITAB output for Exercise 13.10 Regression Analysis: y versus x, x-sq The regression equation is y = - 44.2 + 16.3 x - 0.820 x-sq Predictor Coef SE Coef T P Constant -44.192 8.287 -5.33 0.013 x 16.334 2.490 6.56 0.007 x-sq -0.8198 0.1824 -4.49 0.021 S = 0.594379 R-Sq = 99.6% R-Sq(adj) = 99.3% Analysis of Variance Source DF SS MS F P Regression 2 234.96 117.48 332.53 0.000 Residual Error 3 1.06 0.35 Total 5 236.02 Source DF Seq SS x 1 227.82 x-sq 1 7.14 a. Plot the data points. Does it look as though the quadratic model is necessary? b. Find s on the printout. Confirm that kE s n 1 SS c. Do the data provide sufficient evidence to indicate that the model contributes information for the prediction of y? What is the p-value for this test, and what does it mean? d. How much of the regression sum of squares is accounted for by the quadratic term? The linear term? e. |
What sign would you expect the actual value of b2 to have? Find the value of b2 in the printout. Does this value confirm your expectation? f. Do the data indicate a significant curvature in the relationship between y and x? Test at the 5% level of significance. g. What conclusions can you draw from the accompa- nying residual plots? MINITAB plots for Exercise 13.10 Residuals versus the Fitted Values (response is y.00 0.75 0.50 0.25 0.00 0.25 0.50 15 20 25 Fitted Value 30 35 13.11 College Textbooks II Refer to Exercise 13.10. a. Use the values of SSR and Total SS to calculate R2. Compare this value with the value given in the printout. b. Calculate R2(adj). When would it be appropriate to use this value rather than R2 to assess the fit of the model? c. The value of R2(adj) was 95.7% when a simple linear model was fit to the data. Does the linear or the quadratic model fit better? 13.12 Veggie Burgers You have a hot grill and an empty hamburger bun, but you have EX1312 sworn off greasy hamburgers. Would a meatless hamburger do? The data in the table record a flavor and texture score (between 0 and 100) for 12 brands of meatless hamburgers along with the price, number of calories, amount of fat, and amount of sodium per burger.2 Some of these brands try to mimic the taste of meat, while others do not. The MINITAB printout shows the regression of the taste score y on the four predictor variables: price, calories, fat, and sodium. Normal Probability Plot of the Residuals (response is y) Brand Score, y Price, x1 Calories, x2 Fat, x3 Sodium, x4 t n e c r e P 99 95 90 80 70 60 50 40 30 20 10 5 1 1.0 0.5 0.0 Residual 0.5 1. 10 11 12 70 45 43 41 39 30 68 56 40 34 30 26 91 68 92 75 88 67 73 92 71 67 92 95 110 90 80 120 90 140 120 170 130 110 100 130 310 420 |
280 370 410 440 430 520 180 180 330 340 MINITAB output for Exercise 13.12 Regression Analysis: y versus x1, x2, x3, x4 The regression equation is y = 59.8 + 0.129 x1 - 0.580 x2 + 8.50 x3 + 0.0488 x4 Predictor Coef SE Coef T P Constant 59.85 35.68 1.68 0.137 x1 0.1287 0.3391 0.38 0.716 x2 -0.5805 0.2888 -2.01 0.084 x3 8.498 3.472 2.45 0.044 x4 0.04876 0.04062 1.20 0.269 S = 12.7199 R-Sq = 49.9% R-Sq(adj) = 21.3% Analysis of Variance Source DF SS MS F P Regression 4 1128.4 282.1 1.74 0.244 Residual Error 7 1132.6 161.8 Total 11 2261.0 Source DF Seq SS x1 1 11.2 x2 1 19.6 x3 1 864.5 x4 1 233.2 a. Comment on the fit of the model using the statistical test for the overall fit and the coefficient of determination, R2. b. If you wanted to refit the model by eliminating one of the independent variables, which one would you eliminate? Why? 13.13 Veggie Burgers II Refer to Exercise 13.12. A command in the MINITAB regression menu provides output in which R2 and R2(adj) are calculated for all possible subsets of the four independent variables. The printout is provided here. MINITAB output for Exercise 13.13 Best Subsets Regression: y versus x1, x2, x3, x4 Response is y R-Sq Mallows x x x x Vars R-Sq (adj) C-p s 1 2 3 4 1 17.0 8.7 3.6 13.697 X 1 6.9 0.0 5.0 14.506 X 2 37.2 23.3 2.8 12.556 X X 2 20.3 2.5 5.1 14.153 X X 3 48.9 29.7 3.1 12.020 X X X 3 39. |
6 16.9 4.4 13.066 X X X 4 49.9 21.3 5.0 12.720 X X X X a. If you had to compare these models and choose the best one, which model would you choose? Explain. b. Comment on the usefulness of the model you chose in part a. Is your model valuable in predicting a taste score based on the chosen predictor variables? 13.14 Air Pollution III An experiment was designed to compare several different types of EX1314 air pollution monitors.3 Each monitor was set up and then exposed to different concentrations of ozone, ranging between 15 and 230 parts per million (ppm), for periods of 8–72 hours. Filters on the monitor were then analyzed, and the response of the monitor was 13.4 A POLYNOMIAL REGRESSION MODEL ❍ 565 measured. The results for one type of monitor showed a linear pattern (see Exercise 12.14). The results for another type of monitor are listed in the table. Ozone (ppm/hr), x Relative Fluorescence Density, y.06.12.18.31.57.65.68 1.29 8 18 27 33 42 47 52 61 a. Plot the data. What model would you expect to provide the best fit to the data? Write the equation of that model. b. Use a computer software package to fit the model from part a. c. Find the least-squares regression line relating the monitor’s response to the ozone concentration. d. Does the model contribute significant information for the prediction of the monitor’s response based on ozone exposure? Use the appropriate p-value to make your decision. e. Find R2 on the printout. What does this value tell you about the effectiveness of the multiple regression analysis? 13.15 Corporate Profits In order to study the relationship of advertising and capital EX1315 investment with corporate profits, the following data, recorded in units of $100,000, were collected for 10 medium-sized firms in the same year. The variable y represents profit for the year, x1 represents capital investment, and x2 represents advertising expenditures. y 15 16 2 3 12 x1 25 1 6 30 29 x2 4 5 3 1 2 y 1 16 18 13 2 x1 x2 20 12 15 6 16 0 4 5 |
4 2 a. Using the model y b0 b1x b2x2 and an appropriate computer software package, find the least-squares prediction equation for these data. b. Use the overall F-test to determine whether the model contributes significant information for the prediction of y. Use a.01. c. Does advertising expenditure x2 contribute significant information for the prediction of y, given that x1 is already in the model? Use a.01. d. Calculate the coefficient of determination, R2. What percentage of the overall variation is explained by the model? 566 ❍ CHAPTER 13 MULTIPLE REGRESSION ANALYSIS 13.16 YouTube The video-sharing site YouTube attracted 19.6 million visitors in EX1316 June 2006, an almost 300% increase from January of that same year. Despite YouTube’s phenomenal growth, some analysts have questioned whether the site can transition from a free service to one that can make money. The growth trend for YouTube from August 2005 to June 2006 is given the following table.4 Time 8/2005 9/2005 10/2005 11/2005 12/2005 1/2006 2/2006 3/2006 4/2006 5/2006 6/2006 Coded Time Total Unique Visitors (000 10 11 72 100 750 990 1600 2800 4100 5700 6600 12,600 12,800 Linear and quadratic fitted plots for these data follow. Fitted Line Plot y 886 691.9 x 166.1 x**2 S R-Sq R-Sq(adj) 944.385 96.7% 95.9% y 14,000 12,000 10,000 8000 6000 4000 2000 0 0 2 4 6 x 8 10 12 a. Based upon the summary statistics in the line plots, which of the two models better fits the data? b. Write the equation for the quadratic model. c. Use the following printout to determine if the quadratic term contributes significant information to the prediction of y, in the presence of the linear term. Fitted Line Plot y 3432 1301 x Regression Analysis: Number versus Time, Time-sq The regression equation is Number = 886 - 692 Time + 166 Time-sq S R-Sq R-Sq(adj) 1849.88 85.8% 84. |
2% Predictor Coef SE Coef T P Constant 886 1037 0.85 0.418 Time -691.9 397.2 -1.74 0.120 Time-sq 166.07 32.24 5.15 0.001 S = 944.381 R-Sq = 96.7% R-Sq(adj) = 95.9% Analysis of Variance Source DF SS MS F P Regression 2 209848944 104924472 117.65 0.000 Residual Error 8 7134840 891855 Total 10 216983783 15,000 10,000 y 5000 0 0 2 4 6 x 8 10 12 USING QUANTITATIVE AND QUALITATIVE PREDICTOR VARIABLES IN A REGRESSION MODEL 13.5 One reason multiple regression models are very flexible is that they allow for the use of both qualitative and quantitative predictor variables. For the multiple regression methods used in this chapter, the response variable y must be quantitative, measuring a numerical random variable that has a normal distribution (according to the assumptions of Section 13.2). However, each independent predictor variable can be either a quantitative variable or a qualitative variable, whose levels represent qualities or characteristics and can only be categorized. 13.5 USING QUANTITATIVE AND QUALITATIVE PREDICTOR VARIABLES IN A REGRESSION MODEL ❍ 567 Quantitative and qualitative variables enter the regression model in different ways. To make things more complicated, we can allow a combination of different types of variables in the model, and we can allow the variables to interact, a concept that may be familiar to you from the factorial experiment of Chapter 11. We consider these options one at a time. A quantitative variable x can be entered as a linear term, x, or to some higher power such as x2 or x3, as in the quadratic model in Example 13.3. When more than one quantitative variable is necessary, the interpretation of the possible models becomes more complicated. For example, with two quantitative variables x1 and x2, you could use a first-order model such as E(y) b0 b1x1 b2x2 which traces a plane in three-dimensional space (see Figure 13.1). However, it may be that one of the variables—say, x2—is not related to y in the same way when |
x1 1 as it is when x1 2. To allow x2 to behave differently depending on the value of x1, we add an interaction term, x1x2, and allow the two-dimensional plane to twist. The model is now a second-order model: E(y) b0 b1x1 b2x2 b3x1x2 The models become complicated quickly when you allow curvilinear relationships and interaction for the two variables. One way to decide on the type of model you need is to plot some of the data—perhaps y versus x1, y versus x2, and y versus x2 for various values of x1. In contrast to quantitative predictor variables, qualitative predictor variables are entered into a regression model through dummy or indicator variables. For example, in a model that relates the mean salary of a group of employees to a number of predictor variables, you may want to include the employee’s ethnic background. If each employee included in your study belongs to one of three ethnic groups—say, A, B, or C—you can enter the qualitative variable “ethnicity” into your model using two dummy variables: Enter quantitative variables as • a single x • a higher power, x 2 or x 3 • an interaction with another variable x1 1 0 if group B if not 1 if group C 0 if not Look at the effect these two variables have on the model E(y) b0 b1x1 b2x2: For employees in group A, x2 E(y) b0 b1(0) b2(0) b0 for employees in group B, E(y) b0 b1(1) b2(0) b0 b1 and for those in group C, E(y) b0 b1(0) b2(1) b0 b2 The model allows a different average response for each group. b1 measures the difference in the average responses between groups B and A, while b2 measures the difference between groups C and A. When a qualitative variable involves k categories or levels, (k 1) dummy variables should be added to the regression model. This model may contain other predictor variables—quantitative or qualitative—as well as cross-products (interactions) of the dummy variables with other variables that appear in the model. As you can see, the process of model building—deciding on the appropriate terms to enter into the regression model—can |
be quite complicated. However, you can become more proficient Qualitative variables are entered as dummy variables—one fewer than the number of categories or levels. 568 ❍ CHAPTER 13 MULTIPLE REGRESSION ANALYSIS EXAMPLE 13.5 at model building, gaining experience with the chapter exercises. The next example involves one quantitative and one qualitative variable that interact. A study was conducted to examine the relationship between university salary y, the number of years of experience of the faculty member, and the gender of the faculty member. If you expect a straight-line relationship between mean salary and years of experience for both men and women, write the model that relates mean salary to the two predictor variables: years of experience (quantitative) and gender of the professor (qualitative). Solution Since you may suspect the mean salary lines for women and men to be different, your model for mean salary E(y) may appear as shown in Figure 13.11. A straight-line relationship between E(y) and years of experience x1 implies the model E(y) b0 b1x1 (graphs as a straight line) F IG URE 13.1 1 Hypothetical relationship for mean salary E(y), years of experience (x1), and gender (x2) for Example 13.5 ● E(y Wom en 0 1 2 3 4 5 x1 Years of Experience The qualitative variable “gender” involves k 2 categories, men and women. Therefore, you need (k 1) 1 dummy variable, x2, defined as x2 1 0 if a man if a woman and the model is expanded to become E(y) b0 b1x1 b2x2 (graphs as two parallel lines) The fact that the slopes of the two lines may differ means that the two predictor variables interact; that is, the change in E(y) corresponding to a change in x1 depends on whether the professor is a man or a woman. To allow for this interaction (difference in slopes), the interaction term x1x2 is introduced into the model. The complete model that characterizes the graph in Figure 13.11 is dummy variable for gender E(y) b0 b1x1 b2x2 b3x1x2 interaction years of experience 13.5 USING QUANTITATIVE AND QUALITATIVE PREDICTOR VARIABLES IN A REGRESSION |
MODEL ❍ 569 where x1 Years of experience x2 if a man if a woman 1 0 You can see how the model works by assigning values to the dummy variable x2. When the faculty member is a woman, the model is E(y) b0 b1x1 b2(0) b3x1(0) b0 b1x1 which is a straight line with slope b1 and intercept b0. When the faculty member is a man, the model is E(y) b0 b1x1 b2(1) b3x1(1) (b0 b2) (b1 b3)x1 which is a straight line with slope (b1 b3) and intercept (b0 b2). The two lines have different slopes and different intercepts, which allows the relationship between salary y and years of experience x1 to behave differently for men and women. EXAMPLE 13.6 Random samples of six female and six male assistant professors were selected from among the assistant professors in a college of arts and sciences. The data on salary and years of experience are shown in Table 13.3. Note that each of the two samples (male and female) contained two professors with 3 years of experience, but no male professor had 2 years of experience. Interpret the output of the MINITAB regression printout and graph the predicted salary lines. TABLE 13.3 ● Salary versus Gender and Years of Experience Years of Experience, x1 Salary for Men, y Salary for Women60,710 — 63,160 63,210 64,140 65,760 65,590 $59,510 60,440 61,340 61,760 62,750 63,200 — Solution The MINITAB regression printout for the data in Table 13.3 is shown in Figure 13.12. You can use a step-by-step approach to interpret this regression analysis, beginning with the fitted prediction equation, yˆ 58,593 969x1 867x2 260x1x2. By substituting x2 0 or 1 into this equation, you get two straight lines— one for women and one for men—to predict the value of y for a given x1. These lines are Women: Men: yˆ 58,593 969x1 yˆ 59,460 1229x1 and are graphed in Figure 13.13. 570 ❍ CHAPTER 13 MULTIPLE REGRESSION |
ANALYSIS F IG URE 13.1 2 MINITAB output for Example 13.6 ● Regression Analysis: y versus x1, x2, x1x2 The regression equation is y = 58593 + 969 x1 + 867 x2 + 260 x1x2 Predictor Coef SE Coef T P Constant 58593.0 207.9 281.77 0.000 x1 969.00 63.67 15.22 0.000 x2 866.7 305.3 2.84 0.022 x1x2 260.13 87.06 2.99 0.017 S = 201.344 R-Sq = 99.2% R-Sq(adj) = 98.9% Analysis of Variance Source DF SS MS F P Regression 3 42108777 14036259 346.24 0.000 Residual Error 8 324315 40539 Total 11 42433092 Source DF Seq SS x1 1 33294036 x2 1 8452797 x1x2 1 361944 Next, consider the overall fit of the model using the analysis of variance F-test. Since the observed test statistic in the ANOVA portion of the printout is F 346.24 with P.000, you can conclude that at least one of the predictor variables is contributing information for the prediction of y. The strength of this model is further measured by the coefficient of determination, R2 99.2%. You can see that the model appears to fit very well. ● F IG URE 13.1 3 A graph of the faculty salary prediction lines for Example 13.6 y 56 55 54 53 52 51 50 49 48 ) en x1 Years of Experience To explore the effect of the predictor variables in more detail, look at the individual t-tests for the three predictor variables. The p-values for these tests—.000,.022, and.017, respectively—are all significant, which means that all of the predictor variables add significant information to the prediction with the other two variables already in 13.5 USING QUANTITATIVE AND QUALITATIVE PREDICTOR VARIABLES IN A REGRESSION MODEL ❍ 571 the model. Finally, check the residual plots to make sure that there are no strong violations of the regression assumptions. These plots, which behave as expected for a |
properly fit model, are shown in Figure 13.14. FI GUR E 13. 14 MINITAB residual plots for Example 13.6 ● Normal Probability Plot of the Residuals (response is y) Residuals versus the Fitted Values (response is y) 99 95 90 80 70 60 50 40 30 20 10 5 t n e c r e P 1 500 400 300 200 100 0 Residual l a u d i s e R 300 200 100 0 100 200 300 100 200 300 400 59,000 60,000 61,000 62,000 63,000 64,000 65,000 66,000 Fitted Value EXAMPLE 13.7 Refer to Example 13.6. Do the data provide sufficient evidence to indicate that the annual rate of increase in male junior faculty salaries exceeds the annual rate of increase in female junior faculty salaries? That is, do the data provide sufficient evidence to indicate that the slope of the men’s faculty salary line is greater than the slope of the women’s faculty salary line? Solution Since b3 measures the difference in slopes, the slopes of the two lines will be identical if b3 0. Therefore, you want to test the null hypothesis H0 : b3 0 —that is, the slopes of the two lines are identical—versus the alternative hypothesis Ha : b3 0 —that is, the slope of the men’s faculty salary line is greater than the slope of the women’s faculty salary line. The calculated value of t corresponding to b3, shown in the row labeled “x1x2” in Figure 13.12, is 2.99. Since the MINITAB regression output provides p-values for twotailed significance tests, the p-value in the printout,.017, is twice what it would be for a one-tailed test. For this one-tailed test, the p-value is.017/2.0085, and the null hypothesis is rejected. There is sufficient evidence to indicate that the annual rate of increase in men’s faculty salaries exceeds the rate for women.† †If you want to determine whether the data provide sufficient evidence to indicate that male faculty members start at higher salaries, you would test H0 : b2 0 versus the alternative hypothesis Ha : b2 0. 572 ❍ CHAPTER 13 MULTIPLE REGRESSION ANALYSIS 13.5 |
EXERCISES BASIC TECHNIQUES APPLICATIONS 13.17 Production Yield Suppose you wish to predict production yield y as a function of several independent predictor variables. Indicate whether each of the following independent variables is qualitative or quantitative. If qualitative, define the appropriate dummy variable(s). a. The prevailing interest rate in the area b. The price per pound of one item used in the produc- tion process c. The plant (A, B, or C) at which the production yield is measured d. The length of time that the production machine has been in operation e. The shift (night or day) in which the yield is mea- sured 13.18 Suppose E(y) is related to two predictor variables x1 and x2 by the equation E(y) 3 x1 2x2 x1x2 a. Graph the relationship between E(y) and x1 when x2 0. Repeat for x2 2 and for x2 2. b. Repeat the instructions of part a for the model E(y) 3 x1 2x2 c. Note that the equation for part a is exactly the same as the equation in part b except that we have added the term x1x2. How does the addition of the x1x2 term affect the graphs of the three lines? d. What flexibility is added to the first-order model E(y) b0 b1x1 b2x2 by the addition of the term b3x1x2, using the model E(y) b0 b1x1 b2x2 b3x1x2? 13.19 A multiple linear regression model involving one qualitative and one quantitative independent variable produced this prediction equation: yˆ 12.6.54x1 1.2x1x2 3.9x2 2 a. Which of the two variables is the quantitative vari- able? Explain. EX1320 13.20 Less Red Meat! Americans are very vocal about their attempts to improve personal well-being by “eating right and exercising more.” One desirable dietary change is to reduce the intake of red meat and to substitute poultry or fish. Researchers tracked beef and chicken consumption, y (in annual pounds per person), and found the consumption of beef declining and the consumption of chicken increasing over a period of seven years. A summary of their data is shown in the table. |
Year Beef Chicken 1 2 3 4 5 6 7 85 89 76 76 68 67 60 37 36 47 47 62 74 79 Consider fitting the following model, which allows for simultaneously fitting two simple linear regression lines: E(y) b0 b1x1 b2x2 b3x1x2 where y is the annual meat (either beef or chicken) consumption per person per year, x1 1 if beef 0 if chicken and x2 Year MINITAB output for Exercise 13.20 Regression Analysis: y versus x1, x2, x1x2 The regression equation is y = 23.6 + 69.0 x1 + 7.75 x2 - 12.3 x1x2 Predictor Coef SE Coef T P Constant 23.571 3.522 6.69 0.000 x1 69.000 4.981 13.85 0.000 x2 7.7500 0.7875 9.84 0.000 x1x2 -12.286 1.114 -11.03 0.000 S = 4.16705 R-Sq = 95.4% R-Sq(adj) = 94.1% Analysis of Variance Source DF SS MS F P Regression 3 3637.9 1212.6 69.83 0.000 Residual Error 10 173.6 17.4 Total 13 3811.5 Source DF Seq SS x1 1 1380.1 x2 1 144.6 x1x2 1 2113.1 b. If x1 can take only the values 0 or 1, find the two possible prediction equations for this experiment. c. Graph the two equations found in part b. Compare the shapes of the two curves. Predicted Values for New Observations New Obs Fit SE Fit 95% CI 95% PI 1 56.29 3.52 (48.44, 64.13) (44.13, 68.44) Values of Predictors for New Observations New Obs x1 x2 x1x2 1 1.00 8.00 8.00 13.5 USING QUANTITATIVE AND QUALITATIVE PREDICTOR VARIABLES IN A REGRESSION MODEL ❍ 573 MINITAB diagnostic plots for Exercise 13.20 Normal Probability Plot of the Residuals (response is y) 99 95 90 80 70 60 50 40 30 20 10 5 t |
n e c r e P 1 10 5 0 Residual 5 10 Residuals versus the Fitted Values (response is y.0 2.5 0.0 2.5 5.0 7.5 30 40 50 60 Fitted Value 70 80 90 a. How well does the model fit? Use any relevant statistics and diagnostic tools from the printout to answer this question. b. Write the equations of the two straight lines that describe the trend in consumption over the period of 7 years for beef and for chicken. c. Use the prediction equation to find a point estimate of the average per-person beef consumption in year 8. Compare this value with the value labeled “Fit” in the printout. d. Use the printout to find a 95% confidence interval for the average per-person beef consumption in year 8. What is the 95% prediction interval for the perperson beef consumption in year 8? Is there any problem with the validity of the 95% confidence level for these intervals? 13.21 Cotton versus Cucumber In Exercise 11.65, you used the analysis of variance EX1321 procedure to analyze a 2 3 factorial experiment in which each factor–level combination was replicated five times. The experiment involved the number of eggs laid by caged female whiteflies on two different plants at three different temperature levels. Suppose that several of the whiteflies died before the experiment was completed, so that the number of replications was no longer the same for each treatment. The analysis of variance formulas of Chapter 11 can no longer be used, but the experiment can be analyzed using a multiple regression analysis. The results of this 2 3 factorial experiment with unequal replications are shown in the table. Cotton Cucumber 70° 77° 82° 70° 77° 82° 37 21 36 43 31 46 32 41 34 54 40 42 50 53 25 37 48 59 53 31 69 51 43 62 71 49 a. Write a model to analyze this experiment. Make sure to include a term for the interaction between plant and temperature. b. Use a computer software package to perform the multiple regression analysis. c. Do the data provide sufficient evidence to indicate that the effect of temperature on the number of eggs laid is different depending on the type of plant? d. Based on the results of part c, do you suggest refitting a different model? |
If so, rerun the regression analysis using the new model and analyze the printout. e. Write a paragraph summarizing the results of your analyses. 13.22 Achievement Scores III The Academic Performance Index (API), described in EX1322 Exercise 12.11, is a measure of school achievement based on the results of the Stanford 9 Achievement Test. The API scores for eight elementary schools in Riverside County, California, are shown below, along with several other independent variables.5 School API Score y Awards x1 % Meals x2 1 2 3 4 5 6 7 8 588 659 710 657 669 641 557 743 Yes No Yes No No No No Yes 58 62 66 36 40 51 73 22 574 ❍ CHAPTER 13 MULTIPLE REGRESSION ANALYSIS School % ELL x3 % Emergency x4 Previous Year’s API x5 1 2 3 4 5 6 7 8 34 22 14 30 11 26 39 6 16 5 19 14 13 2 14 4 533 655 695 680 670 636 532 705 The variables are defined as x1 1 if the school was given a financial award for meeting growth goals, 0 if not. x2 % of students who qualify for free or reduced price meals x3 % of students who are English Language Learners x4 % of teachers on emergency credentials x5 API score in 2000 The MINITAB printout for a first-order regression model is given below. Regression Analysis: y versus x1, x2, x3, x4, x5 The regression equation is y = 269 + 33.2 x1 - 0.003 x2 - 1.02 x3 - 1.00 x4 + 0.636 x5 Predictor Coef STDev T P Constant 269.03 41.55 6.48 0.023 x1 33.227 4.373 7.60 0.017 x2 -0.0027 0.1396 -0.02 0.987 x3 -1.0159 0.3237 -3.14 0.088 x4 -1.0032 0.3391 -2.96 0.098 x5 0.63560 0.05209 12.20 0.007 S = 4.73394 R-Sq = 99.8% R-Sq(adj) = 99.4% Analysis of Variance Source DF SS |
MS F P Regression 5 25197.2 5039.4 224.87 0.004 Residual Error 2 44.8 22.4 Total 7 25242.0 a. What is the model that has been fit to this data? What is the least-squares prediction equation? b. How well does the model fit? Use any relevant statistics from the printout to answer this question. c. Which, if any, of the independent variables are useful in predicting the API, given the other independent variables already in the model? Explain. d. Use the values of R2 and R2(adj) in the following printout to choose the best model for prediction. Would you be confident in using the chosen model for predicting the API score for next year based on a model containing similar variables? Explain. Best Subsets Regression: y versus x1, x2, x3, x4, x5 Response is y R-Sq Mallows x x x x x Vars R-Sq (adj) C-p S 1 2 3 4 5 1 87.9 85.8 132.7 22.596 X 1 84.5 81.9 170.7 25.544 X 2 97.4 96.4 27.1 11.423 X X 2 94.6 92.4 58.8 16.512 X X 3 99.0 98.2 11.8 8.1361 X X X 3 98.9 98.2 11.9 8.1654 X X X 4 99.8 99.6 4.0 3.8656 X X X X 4 99.0 97.8 12.8 8.9626 X X X X 5 99.8 99.4 6.0 4.7339 X X X X X 13.23 Particle Board A quality control engineer is interested in predicting the strength of particle board y as a function of the size of the particles x1 and two types of bonding compounds. If the basic response is expected to be a quadratic function of particle size, write a linear model that incorporates the qualitative variable “bonding compound” into the predictor equation. 13.24 Construction Projects In a study to examine the relationship between the time EX1324 required to complete a construction project and several pertinent independent variables, an analyst compiled a list of four variables that might be useful in predicting the time to completion. These four variables were size of the |
contract, x1 (in $1000 unit), number of workdays adversely affected by the weather x2, number of subcontractors involved in the project x4, and a variable x3 that measured the presence (x3 1) or absence (x3 0) of a workers’ strike during the construction. Fifteen construction projects were randomly chosen, and each of the four variables as well as the time to completion were measured. y 29 15 60 10 70 15 75 30 45 90 7 21 28 50 30 x1 60 80 100 50 200 50 500 75 750 1200 70 80 300 2600 110 x2 7 10 8 14 12 4 15 5 10 20 5 3 8 14 7 x3 x4 7 8 10 5 11 3 12 6 10 12 3 6 8 13 4 An analysis of these data using a first-order model in x1, x2, x3, and x4 produced the following printout. Give a complete analysis of the printout and interpret your results. What can you say about the apparent contribution of x1 and x2 in predicting y? 13.6 TESTING SETS OF REGRESSION COEFFICIENTS ❍ 575 Residuals versus the Fitted Values (response is y) 10 20 30 40 Fitted Value 50 60 70 80 Regression Analysis: y versus x1, x2, x3, x4 The regression equation is y = -1.6 - 0.00784 x1 + 0.68 x2 + 28.0 x3 + 3.49 x4 Predictor Coef SE Coef T P Constant -1.59 11.66 -0.14 0.894 x1 -0.007843 0.006230 -1.26 0.237 x2 -0.6753 0.9998 0.68 0.515 x3 28.01 11.37 2.46 0.033 x4 3.489 1.935 1.80 0.102 S = 11.8450 R-Sq = 84.7% R-Sq(adj) = 78.6% Analysis of Variance Source DF SS MS F P Regression 4 7770.3 1942.6 13.85 0.000 Residual Error 10 1403.0 140.3 Total 14 9173.3 l a u d i s e R 20 10 0 10 20 Source Seq SS DF X1 1 1860.9 x2 1 2615. |
3 x3 1 2838.0 x4 1 456.0 Normal Probability Plot of the Residuals (response is y) 99 95 90 80 70 60 50 40 30 20 10 5 t n e c r e P 1 30 20 10 0 Residual 10 20 30 TESTING SETS OF REGRESSION COEFFICIENTS 13.6 In the preceding sections, you have tested the complete set of partial regression coefficients using the F-test for the overall fit of the model, and you have tested the partial regression coefficients individually using the Student’s t-test. Besides these two important tests, you might want to test hypotheses about some subsets of these regression coefficients. For example, suppose a company suspects that the demand y for some product could be related to as many as five independent variables, x1, x2, x3, x4, and x5. The cost of obtaining measurements on the variables x3, x4, and x5 is very high. If, in a small pilot study, the company could show that these three variables contribute little or no information for the prediction of y, they can be eliminated from the study at great savings to the company. If all five variables, x1, x2, x3, x4, and x5, are used to predict y, the regression model would be written as y b0 b1x1 b2x2 b3x3 b4x4 b5x5 e 576 ❍ CHAPTER 13 MULTIPLE REGRESSION ANALYSIS However, if x3, x4, and x5 contribute no information for the prediction of y, then they would not appear in the model—that is, b3 b4 b5 0—and the reduced model would be y b0 b1x1 b2x2 e Hence, you want to test the null hypothesis H0 : b3 b4 b5 0 —that is, the independent variables x3, x4, and x5 contribute no information for the prediction of y—versus the alternative hypothesis Ha : At least one of the parameters b3, b4, or b5 differs from 0 —that is, at least one of the variables x3, x4, or x5 contributes information for the prediction of y. Thus, in deciding whether the complete model is preferable to the reduced model in predicting demand |
, you are led to a test of hypothesis about a set of three parameters, b3, b4, and b5. A test of hypothesis concerning a set of model parameters involves two models: Model 1 (reduced model) E(y) b0 b1x1 b2x2 brxr Model 2 (complete model) E(y) b0 b1x1 b2x2 brxr br1xr1 br2xr2 bkxk 1444442444443 144444424444443 terms in model 1 additional terms in model 2 Suppose you fit both models to the data set and calculated the sum of squares for error for both regression analyses. If model 2 contributes more information for the prediction of y than model 1, then the errors of prediction for model 2 should be smaller than the corresponding errors for model 1, and SSE2 should be smaller than SSE1. In fact, the greater the difference between SSE1 and SSE2, the greater is the evidence to indicate that model 2 contributes more information for the prediction of y than model 1. The test of the null hypothesis H0 : br1 br2 bk 0 versus the alternative hypothesis Ha : At least one of the parameters br1, br2,..., bk differs from 0 uses the test statistic F (SSE1 SSE2)/(k r) MSE2 where F is based on df1 (k r) and df2 n (k 1). Note that the (k r) parameters involved in H0 are those added to model 1 to obtain model 2. The numerator degrees of freedom df1 always equals (k r), the number of parameters involved in H0. The denominator degrees of freedom df2 is the number of degrees of freedom associated with the sum of squares for error, SSE2, for the complete model. The rejection region for the test is identical to the rejection region for all of the analysis of variance F-tests—namely, F Fa 13.6 TESTING SETS OF REGRESSION COEFFICIENTS ❍ 577 EXAMPLE 13.8 Refer to the real estate data of Example 13.2 that relate the listed selling price y to the square feet of living area x1, the number of floors x2, the number of bedrooms x3, and the number of bathrooms, x4. The realtor suspects that the square footage of |
living area is the most important predictor variable and that the other variables might be eliminated from the model without loss of much prediction information. Test this claim with a.05. ● FI GUR E 13. 15 Portions of the MINITAB regression printouts for (a) complete and (b) reduced models for Example 13.8 Solution The hypothesis to be tested is H0 : b2 b3 b4 0 versus the alternative hypothesis that at least one of b2, b3, or b4 is different from 0. The complete model 2, given as y b0 b1x1 b2x2 b3x3 b4x4 e was fitted in Example 13.2. A portion of the MINITAB printout from Figure 13.3 is reproduced in Figure 13.15 along with a portion of the MINITAB printout for the simple linear regression analysis of the reduced model 1, given as y b0 b1x1 e Regression Analysis: (a) List Price versus Square Feet, Number of Floors, Bedrooms and Baths S = 6.84930 R-Sq = 97.1% R-Sq(adj) = 96.0% Analysis of Variance Source DF SS MS F P Regression 4 15913.0 3978.3 84.80 0.000 Residual Error 10 469.1 46.9 Total 14 16382.2 Regression Analysis: (b) List Price versus Square Feet S = 10.9294 R-Sq = 90.5% R-Sq(adj) = 89.8% Analysis of Variance Source DF SS MS F P Regression 1 14829 14829 124.14 0.000 Residual Error 13 1553 119 Total 14 16382 Then SSE1 1553 from Figure 13.15(b) and SSE2 469.1 and MSE2 46.9 from Figure 13.15(a). The test statistic is F (SSE1 SSE2)/(k r) MSE2 (1553 469.1)/(4 1) 46.9 7.70 The critical value of F with a.05, df1 3, and df2 n (k 1) 15 (4 1) 10 is F.05 3.71. Hence, H0 is rejected. There is evidence to indicate that at least one of the three variables—number of floors, bedrooms |
, or bathrooms—is contributing significant information for predicting the listed selling price. 578 ❍ CHAPTER 13 MULTIPLE REGRESSION ANALYSIS INTERPRETING RESIDUAL PLOTS 13.7 Once again, you can use residual plots to discover possible violations in the assumptions required for a regression analysis. There are several common patterns you should recognize because they occur frequently in practical applications. The variance of some types of data changes as the mean changes: • Poisson data exhibit variation that increases with the mean. • Binomial data exhibit variation that increases for values of p from.0 to.5, and then decreases for values of p from.5 to 1.0. Residual plots for these types of data have a pattern similar to that shown in Figure 13.16. F IG URE 13.1 6 Plots of residuals against yˆ ● 1 – 50 100 y (a) Poisson Data (b) Binomial Percentages If the range of the residuals increases as yˆ increases and you know that the data are measurements on Poisson variables, you can stabilize the variance of the response by running the regression analysis on y* y. Or if the percentages are calculated from binomial data, you can use the arcsin transformation, y* sin1y.† Even if you are not sure why the range of the residuals increases as yˆ increases, you can still use a transformation of y that affects larger values of y more than smaller values—say, y* y or y* ln y. These transformations have a tendency both to stabilize the variance of y* and to make the distribution of y* more nearly normal when the distribution of y is highly skewed. Plots of the residuals versus the fits yˆ or versus the individual predictor variables often show a pattern that indicates you have chosen an incorrect model. For example, if E(y) and a single independent variable x are linearly related—that is, E(y) b0 b1x and you fit a straight line to the data, then the observed y-values should vary in a random manner about yˆ, and a plot of the residuals against x will appear as shown in Figure 13.17. ● F IG URE 13.1 7 Residual plot when the model provides a good approximation to reality In Chapter 11 and earlier chapters, we represented the response variable by the symbol x |
. In the chapters on regression analysis, Chapters 12 and 13, the response variable is represented by the symbol y. 13.8 STEPWISE REGRESSION ANALYSIS ❍ 579 In Example 13.3, you fit a quadratic model relating productivity y to store size x. If you had incorrectly used a linear model to fit these data, the residual plot in Figure 13.18 would show that the unexplained variation exhibits a curved pattern, which suggests that there is a quadratic effect that has not been included in the model. Residuals versus the Fitted Values (response is y) ● FI GUR E 13. 18 Residual plot for linear fit of store size and productivity data in Example 13..5 0.0 0.5 1.0 3.0 3.2 3.4 3.6 3.8 Fitted Value For the data in Example 13.6, the residuals of a linear regression of salary with years of experience x1 without including gender, x2, would show one distinct set of positive residuals corresponding to the men and a set of negative residuals corresponding to the women (see Figure 13.19). This pattern signals that the “gender” variable was not included in the model. Residuals versus the Fitted Values (response is y) ● FI GUR E 13. 19 Residual plot for linear fit of salary data in Example 13.6 l a u d i s e R 1000 500 0 500 1000 1500 60,000 61,000 62,000 63,000 64,000 65,000 Fitted Value Unfortunately, not all residual plots give such a clear indication of the problem. You should examine the residual plots carefully, looking for nonrandomness in the pattern of residuals. If you can find an explanation for the behavior of the residuals, you may be able to modify your model to eliminate the problem. STEPWISE REGRESSION ANALYSIS 13.8 Sometimes there are a large number of independent predictor variables that might have an effect on the response variable y. For example, try to list all the variables that might affect a college freshman’s GPA: • Grades in high school courses, high school GPA, SAT score, ACT score • Major, number of units carried, number of courses taken • Work schedule, marital status, commute or live on campus 580 ❍ CHAPTER 13 MULT |
IPLE REGRESSION ANALYSIS Which of this large number of independent variables should be included in the model? Since the number of terms could quickly get unmanageable, you might choose to use a procedure called a stepwise regression analysis, which is implemented by computer and is available in most statistical packages. Suppose you have data available on y and a number of possible independent variables, x1, x2,..., xk. A stepwise regression analysis fits a variety of models to the data, adding and deleting variables as their significance in the presence of the other variables is either significant or nonsignificant, respectively. Once the program has performed a sufficient number of iterations and no more variables are significant when added to the model, and none of the variables in the model are nonsignificant when removed, the procedure stops. A stepwise regression analysis is an easy way to locate some variables that contribute information for predicting y, but it is not foolproof. Since these programs always fit first-order models of the form E(y) b0 b1x1 b2x2 bkxk they are not helpful in detecting curvature or interaction in the data. The stepwise regression analysis is best used as a preliminary tool for identifying which of a large number of variables should be considered in your model. You must then decide how to enter these variables into the actual model you will use for prediction. MISINTERPRETING A REGRESSION ANALYSIS 13.9 Several misinterpretations of the output of a regression analysis are common. We have already mentioned the importance of model selection. If a model does not fit a set of data, it does not mean that the variables included in the model contribute little or no information for the prediction of y. The variables may be very important contributors of information, but you may have entered the variables into the model in the wrong way. For example, a second-order model in the variables might provide a very good fit to the data when a first-order model appears to be completely useless in describing the response variable y. Causality You must be careful not to conclude that changes in x cause changes in y. This type of causal relationship can be detected only with a carefully designed experiment. For example, if you |
randomly assign experimental units to each of two levels of a variable x—say, x 5 and x 10—and the data show that the mean value of y is larger when x 10, then you can say that the change in the level of x caused a change in the mean value of y. But in most regression analyses, in which the experiments are not designed, there is no guarantee that an important predictor variable—say, x1— caused y to change. It is quite possible that some variable that is not even in the model causes both y and x1 to change. Multicollinearity Neither the size of a regression coefficient nor its t-value indicates the importance of the variable as a contributor of information. For example, suppose you intend to predict y, a college student’s calculus grade, based on x1 high school mathematics average and x2 score on mathematics aptitude test. Since these two variables contain 13.9 MISINTERPRETING A REGRESSION ANALYSIS ❍ 581 much of the same or shared information, it will not surprise you to learn that, once one of the variables is entered into the model, the other contributes very little additional information. The individual t-value is small. If the variables were entered in the reverse order, however, you would see the size of the t-values reversed. The situation described above is called multicollinearity, and it occurs when two or more of the predictor variables are highly correlated with one another. When multicollinearity is present in a regression problem, it can have these effects on the analysis: • The estimated regression coefficients will have large standard errors, causing imprecision in confidence and prediction intervals. • Adding or deleting a predictor variable may cause significant changes in the values of the other regression coefficients. How can you tell whether a regression analysis exhibits multicollinearity? Look for these clues: • The value of R2 is large, indicating a good fit, but the individual t-tests are nonsignificant. • The signs of the regression coefficients are contrary to what you would intuitively expect the contributions of those variables to be. • A matrix of correlations, generated by computer, shows you which predictor variables are highly correlated with each other and with the response y. Figure 13.20 displays the matrix of correlations generated for the real estate data from Example 13.2. The fir |
st column of the matrix shows the correlations of each predictor variable with the response variable y. They are all significantly nonzero, but the first variable, x1 living area, is the most highly correlated. The last three columns of the matrix show significant correlations between all but one pair of predictor variables. This is a strong indication of multicollinearity. If you try to eliminate one of the variables in the model, it may drastically change the effects of the other three! Another clue can be found by examining the coefficients of the prediction line, ListPrice = 119 + 6.27 Square Feet - 16.2 Number of Floors - 2.67 Bedrooms + 30.3 Baths Correlations: List Price, Square Feet, Number of Floors, Bedrooms, Baths ListPrice SqFeet Numflrs Bdrms Square Feet 0.951 0.000 Number of Fl 0.605 0.630 0.017 0.012 Bedrooms 0.746 0.711 0.375 0.001 0.003 0.168 Baths 0.834 0.720 0.760 0.675 0.000 0.002 0.001 0.006 Cell Contents: Pearson Correlation P-Value You would expect more floors and bedrooms to increase the list price, but their coefficients are negative. Since multicollinearity exists to some extent in all regression problems, you should think of the individual terms as information contributors, rather than try to measure the practical importance of each term. The primary decision to be made is whether a term contributes sufficient information to justify its inclusion in the model. ● FI GUR E 13. 20 Correlation matrix for the real estate data in Example 13.2 582 ❍ CHAPTER 13 MULTIPLE REGRESSION ANALYSIS STEPS TO FOLLOW WHEN BUILDING A MULTIPLE REGRESSION MODEL 13.10 The ultimate objective of a multiple regression analysis is to develop a model that will accurately predict y as a function of a set of predictor variables x1, x2,..., xk. The step-by-step procedure for developing this model was presented in Section 13.4 and is restated next with some additional detail. If you use this approach, what may appear to be a complicated problem can be made simpler. As with any statistical procedure, your confidence |
will grow as you gain experience with multiple regression analysis in a variety of practical situations. 1. Select the predictor variables to be included in the model. Since some of these variables may contain shared information, you can reduce the list by running a stepwise regression analysis (see Section 13.8). Keep the number of predictors small enough to be effective yet manageable. Be aware that the number of observations in your data set must exceed the number of terms in your model; the greater the excess, the better! 2. Write a model using the selected predictor variables. If the variables are qualitative, it is best to begin by including interaction terms. If the variables are quantitative, it is best to start with a second-order model. Unnecessary terms can be deleted later. Obtain the fitted prediction model. 3. Use the analysis of variance F-test and R2 to determine how well the model fits the data. 4. Check the t-tests for the partial regression coefficients to see which ones are contributing significant information in the presence of the others. If some terms appear to be nonsignificant, consider deleting them. If you choose to compare several different models, use R2(adj) to compare their effectiveness. 5. Use computer-generated residual plots to check for violation of the regression assumptions. CHAPTER REVIEW Key Concepts and Formulas I. The General Linear Model III. Analysis of Variance 1. y b0 b1x1 b2x2 bkxk e 2. The random error e has a normal distribution with mean 0 and variance s 2. II. Method of Least Squares 1. Total SS SSR SSE, where Total SS Syy. The ANOVA table is produced by computer. 2. Best estimate of s 2 is E SS MSE 1 n k 1. Estimates b0, b1,..., bk, for b0, b1,..., bk, are chosen to minimize SSE, the sum of squared deviations about the regression line, yˆ b0 b1x1 b2x2 bkxk. IV. Testing, Estimation, and Prediction 1. A test for the significance of the regression, H0 : b1 b2 bk 0, can be implemented using the analysis of variance F-test: 2. Least-squares estimates are produced by com- |
puter. R S F M S E M 2. The strength of the relationship between x and y can be measured using S R S R 2 SS l ta To which gets closer to 1 as the relationship gets stronger. 3. Use residual plots to check for nonnormality, inequality of variances, and an incorrectly fit model. 4. Significance tests for the partial regression coefficients can be performed using the Student’s t-test: b t b i with error df n k 1 i (b S i) E 5. Confidence intervals can be generated by computer to estimate the average value of y, E(y), for given values of x1, x2,..., xk. Computergenerated prediction intervals can be used to MY MININTAB ❍ 583 predict a particular observation y for given values of x1, x2,..., xk. For given x1, x2,..., xk, prediction intervals are always wider than confidence intervals. V. Model Building 1. The number of terms in a regression model cannot exceed the number of observations in the data set and should be considerably less! 2. To account for a curvilinear effect in a quantitative variable, use a second-order polynomial model. For a cubic effect, use a third-order polynomial model. 3. To add a qualitative variable with k categories, use (k 1) dummy or indicator variables. 4. There may be interactions between two quantitative variables or between a quantitative and qualitative variable. Interaction terms are entered as bxixj. 5. Compare models using R 2(adj). Multiple Regression Procedures In Chapter 12, you used the linear regression procedures available in MINITAB to perform estimation and testing for a simple linear regression analysis. You obtained a graph of the best-fitting least-squares regression line and calculated the correlation coefficient r and the coefficient of determination r 2. The testing and estimation techniques for a multiple regression analysis are also available with MINITAB and involve almost the same set of commands. You might want to review the section “My MINITAB ” at the end of Chapter 12 before continuing this section. For a response variable y that is related to several predictor variables, x1, x2,..., xk, the observed values of y and each of the |
k predictor variables must be entered into the first (k 1) columns of the MINITAB worksheet. Once this is done, the main inferential tools for linear regression analysis are generated using Stat Regression Regression. The Dialog box for the Regression command is shown in Figure 13.21. Select y for the Response variable and x1, x2,..., xk for the Predictor variables. You may now choose to generate some residual plots to check the validity of your regression assumptions before you use the model for estimation or prediction. Choose Graphs to display the Dialog box for residual plots, and choose the appropriate diagnostic plot. Once you have verified the appropriateness of your multiple regression model, you can choose Options and obtain confidence and prediction intervals for either of these cases: • A single set of values x1, x2,..., xk (typed in the box marked “Prediction intervals for new observations”) • Several sets of values x1, x2,..., xk stored in k columns of the worksheet When you click OK twice, the regression output is generated. 584 ❍ CHAPTER 13 MULTIPLE REGRESSION ANALYSIS F IG URE 13.2 1 ● The only difficulty in performing the multiple regression analysis using MINITAB might be properly entering the data for your particular model. If the model involves polynomial terms or interaction terms, the Calc Calculator command will help you. For example, suppose you want to fit the model E(y) b0 b1x1 b2x2 b3x 2 1 b4x1x2 You will need to enter the observed values of y, x1, and x2 into the first three columns of the MINITAB worksheet. Name column C4 “x1-sq” and name C5 “x1x2.” You can now use the calculator Dialog box shown in Figure 13.22 to generate these two columns. In the Expression box, select x1 * x1 or x1 ** 2 and store the results in C4 (x1-sq). Click OK. Similarly, to obtain the data for C5, select x1 * x2 and store the results in C5 (x1x2). Click OK. You are now ready to perform |
the multiple regression analysis. If you are fitting either a quadratic or a cubic model in one variable x, you can now plot the data points, the polynomial regression curve, and the upper and lower confidence and prediction limits using Stat Regression Fitted line Plot. Select y and x for the Response and Predictor variables, and click “Display confidence interval” and “Display prediction interval” in the Options Dialog box. Make sure that Quadratic or Cubic is selected as the “Type of Regression Model,” so that you will get the proper fit to the data. Recall that in Chapter 12, you used Stat Basic Statistics Correlation to obtain the value of the correlation coefficient r. In multiple regression analysis, the same command will generate a matrix of correlations, one for each pair of variables in the set y, x1, x2,..., xk. Make sure that the box marked “Display p-values” is checked. The p-values will provide information on the significant correlation between a particular pair, in the presence of all the other variables in the model, and they are identical to the p-values for the individual t-tests of the regression coefficients. FI GUR E 13. 22 ● SUPPLEMENTARY EXERCISES ❍ 585 Supplementary Exercises 13.25 Biotin Intake in Chicks Groups of 10-day-old chicks were randomly assigned to EX1325 seven treatment groups in which a basal diet was supplemented with 0, 50, 100, 150, 200, 250, or 300 micrograms/kilogram (mg/kg) of biotin. The table gives the average biotin intake (x) in micrograms per day and the average weight gain (y) in grams per day.6 Added Biotin Biotin Intake, x Weight Gain, y 0 50 100 150 200 250 300.14 2.01 6.06 6.34 7.15 9.65 12.50 8.0 17.1 22.3 24.4 26.5 23.4 23.3 In the MINITAB printout, the second-order polynomial model E(y) b0 b1x b2x 2 is fitted to the data. Use the printout to answer the questions. a. What is the |
fitted least-squares line? b. Find R2 and interpret its value. c. Do the data provide sufficient evidence to conclude that the model contributes significant information for predicting y? d. Find the results of the test of H0 : b2 0. Is there sufficient evidence to indicate that the quadratic model provides a better fit to the data than a simple linear model does? e. Do the residual plots indicate that any of the regression assumptions have been violated? Explain. 586 ❍ CHAPTER 13 MULTIPLE REGRESSION ANALYSIS MINITAB output for Exercise 13.25 Regression Analysis: y versus x, x-sq The regression equation is y = 8.59 + 3.82 x - 0.217 x-sq Predictor Coef SE Coef T P Constant 8.585 1.641 5.23 0.006 x 3.8208 0.5683 6.72 0.003 x-sq -0.21663 0.04390 -4.93 0.008 S = 1.83318 R-Sq = 94.4% R-Sq(adj) = 91.5% Analysis of Variance Source DF SS MS F P Regression 2 224.75 112.37 33.44 0.003 Residual Error 4 13.44 3.36 Total 6 238.19 Source DF Seq SS x 1 142.92 x-sq 1 81.83 women’s wear departments. Five weeks for observation were randomly selected from each department, and an advertising budget x1 (in hundreds of dollars) was assigned for each. The weekly sales (in thousands of dollars) are shown in the accompanying table for each of the 15 one-week sales periods. If we expect weekly sales E(y) to be linearly related to advertising expenditure x1, and if we expect the slopes of the lines corresponding to the three departments to differ, then an appropriate model for E(y) is E(y) b0 14243 quantitative variable “advertising expenditure” b1x1 b2x2 b3x3 b4x1x2 b5x1x3 1442443 interaction terms that introduce differences in slopes 1442443 dummy variables used to introduce the qualitative variable “department” into the model Residuals versus the Fitted Values (response is y) where x1 Advertising expenditure x2 1 if |
children’s wear department B 0 if not x3 1 0 if women’s wear department C if not 10 12 14 16 18 20 22 24 26 Fitted Value Advertising Expenditure (hundreds of dollars) Normal Probability Plot of the Residuals (response is y) Department Men’s wear A Children’s wear B Women’s wear C 1 $5.2 8.2 10.0 2 $5.9 9.0 10.3 3 $7.7 9.1 12.1 4 $7.9 10.5 12.7 5 $9.4 10.5 13.6 a. Find the equation of the line relating E( y) to advertising expenditure x1 for the men’s wear department A. [HINT: According to the coding used for the dummy variables, the model represents mean sales E( y) for the men’s wear department A when x2 x3 0. Substitute x2 x3 0 into the equation for E( y) to find the equation of this line.] b. Find the equation of the line relating E(y) to x1 for the children’s wear department B. [HINT: According to the coding, the model represents E(y) for the children’s wear department when x2 1 and x3 0.] c. Find the equation of the line relating E(y) to x1 for the women’s wear department C. 4 3 2 1 0 Residual 1 2 3 4 13.26 Advertising and Sales A department store conducted an experiment to investi- EX1326 gate the effects of advertising expenditures on the weekly sales for its men’s wear, children’s wear, and 99 95 90 80 70 60 50 40 30 20 10 5 1 d. Find the difference between the intercepts of the E( y) lines corresponding to the children’s wear B and men’s wear A departments. e. Find the difference in slopes between E(y) lines corresponding to the women’s wear C and men’s wear A departments. f. Refer to part e. Suppose you want to test the null hypothesis that the slopes of the lines corresponding to the three departments are equal. Express this as a test of hypothesis about one or more of the model parameters. 13.27 Advertising and Sales, continued Refer to Exercise 13.26. Use a computer software package |
to perform the multiple regression analysis and obtain diagnostic plots if possible. a. Comment on the fit of the model, using the analysis of variance F-test, R2, and the diagnostic plots to check the regression assumptions. b. Find the prediction equation, and graph the three department sales lines. c. Examine the graphs in part b. Do the slopes of the lines corresponding to the children’s wear B and men’s wear A departments appear to differ? Test the null hypothesis that the slopes do not differ (H0 : b4 0) versus the alternative hypothesis that the slopes are different. d. Are the interaction terms in the model significant? Use the methods described in Section 13.5 to test H0 : b4 b5 0. Do the results of this test suggest that the fitted model should be modified? e. Write a short explanation of the practical implica- tions of this regression analysis. 13.28 Demand for Utilities Utility companies, which must plan the operation and EX1328 expansion of electricity generation, are vitally interested in predicting customer demand over both short and long periods of time. A short-term study was conducted to investigate the effect of mean monthly daily temperature x1 and cost per kilowatt-hour x2 on the mean daily consumption (in kilowatt-hours, kWh) per household. The company expected the demand for electricity to rise in cold weather (due to heating), fall when the weather was moderate, and rise again when the temperature rose and there was need for air-conditioning. They expected demand to decrease as the cost per kilowatt-hour increased, reflecting greater attention to conservation. Data were available for 2 years, a SUPPLEMENTARY EXERCISES ❍ 587 period in which the cost per kilowatt-hour x2 increased owing to the increasing cost of fuel. The company fitted the model E(y) b0 b1x1 b2x2 1 b3x2 b4x1x2 b5x2 1x2 to the data shown in the table. The MINITAB printout for this multiple regression problem is also provided. Price per kWh, x2 Daily Temperature and Consumption Mean Daily Consumption (kWh) per Household 8¢ Mean daily temperature (°F), x1 Mean daily consumption, y 10¢ Mean daily temperature, x1 Mean daily |
consumption, y MINITAB output for Exercise 13.28 31 62 55 41 32 62 50 39 34 66 49 46 36 66 44 44 39 68 46 44 39 68 42 40 42 71 47 51 42 72 42 44 47 75 40 62 48 75 38 50 56 78 43 73 56 79 40 55 Regression Analysis: y versus x1, x1-sq, x2, x1x2, x1sqx2 The regression equation is y = 326 - 11.4 x1 + 0.113 x1-sq - 21.7 x2 + 0.873 x1x2 - 0.00887 x1sqx2 Predictor Coef SE Coef T P Constant 325.61 83.06 3.92 0.001 x1 -11.383 3.239 -3.51 0.002 x1-sq 0.11350 0.02945 3.85 0.001 x2 -21.699 9.224 -2.35 0.030 x1x2 0.8730 0.3589 2.43 0.026 x1sqx2 -0.008869 0.003257 -2.72 0.014 S = 2.90763 R-Sq = 89.8% R-Sq(adj) = 87.0% Analysis of Variance Source DF SS MS F P Regression 5 1346.45 269.29 31.85 0.000 Residual Error 18 152.18 8.45 Total 23 1498.63 Source DF Seq SS x1 1 140.71 x1-sq 1 892.78 x2 1 192.44 x1x2 1 57.84 x1sqx2 1 62.68 Unusual Observations Obs x1 y Fit SE Fit Residual St Resid 9 68.0 44.000 49.640 1.104 -5.640 -2.10R 12 78.0 73.000 67.767 2.012 5.233 2.49R R denotes an observation with a large standardized residual. a. Do the data provide sufficient evidence to indicate that the model contributes information for the prediction of mean daily kilowatt-hour consumption per household? Test at the 5% level of significance. b. Graph the curve depicting yˆ as a function of temperature x1 when the cost per kilowatt-hour is x2 8¢. Construct a similar graph for the case |
when x2 10¢ per kilowatt-hour. Are the consumption curves different? 588 ❍ CHAPTER 13 MULTIPLE REGRESSION ANALYSIS c. If cost per kilowatt-hour is unimportant in predicting use, then you do not need the terms involving x2 in the model. Therefore, the null hypothesis H0 : x2 does not contribute information for the prediction of y is equivalent to the null hypothesis H0 : b3 b4 b5 0 (if b3 b4 b5 0, the terms involving x2 disappear from the model). The MINITAB printout, obtained by fitting the reduced model E(y) b0 b1x1 b2x 2 1 to the data, is shown here. Use the methods of Section 13.5 to determine whether price per kilowatthour x2 contributes significant information for the prediction of y. MINITAB output for Exercise 13.28 Regression Analysis: y versus x1, x1-sq The regression equation is y = 130 - 3.50 x1 + 0.0334 x1-sq Predictor Coef SE Coef T P Constant 130.01 14.88 8.74 0.000 x1 -3.5017 0.5789 -6.05 0.000 x1-sq 0.033371 0.005256 6.35 0.000 S = 4.70630 R-Sq = 69.0% R-Sq(adj) = 66.0% Analysis of Variance Source DF SS MS F P Regression 2 1033.49 516.75 23.33 0.000 Residual Error 21 465.13 22.15 Total 23 1498.63 Source DF Seq SS x1 1 140.71 x1-sq 1 892.78 Unusual Observations Obs x1 y Fit SE Fit Residual St Resid 12 78.0 73.000 59.906 2.243 13.094 3.16R R denotes an observation with a large standardized residual. d. Compare the values of R2(adj) for the two models fit in this exercise. Which of the two models would you recommend? 13.29 Mercury Concentration in Dolphins Because dolphins (and other large marine EX1329 mammals) are considered to be the top predators in the marine food chain, the heavy metal concentrations in striped dolphins |
were measured as part of a marine pollution study. The concentration of mercury, the heavy metal reported in this study, is expected to differ in males and females because the mercury in a female is apparently transferred to her offspring during gestation and nursing. This study involved 28 males between the ages of.21 and 39.5 years, and 17 females between the ages of.80 and 34.5 years. For the data in the table, x1 Age of the dolphin (in years) x2 y Mercury concentration (in 0 if female 1 if male micrograms/gram) in the liver y 1.70 1.72 8.80 5.90 101.00 85.40 118.00 183.00 168.00 218.00 180.00 264.00 y 241.00 397.00 209.00 314.00 318.00 2.50 9.35 4.01 29.80 45.30 101.00 135.00 x1.21.33 2.00 2.20 8.50 11.50 11.50 13.50 16.50 16.50 17.50 20.50 x1 31.50 31.50 36.50 37.50 39.50.80 1.58 1.75 5.50 7.50 8.05 11.50 x2 x2 481.00 485.00 221.00 406.00 252.00 329.00 316.00 445.00 278.00 286.00 315.00 y 142.00 180.00 174.00 247.00 223.00 167.00 157.00 177.00 475.00 342.00 x1 22.50 24.50 24.50 25.50 26.50 26.50 26.50 26.50 27.50 28.50 29.50 x1 17.50 17.50 18.50 19.50 21.50 21.50 25.50 25.50 32.50 34.50 x2 x2. Write a second-order model relating y to x1 and x2. Allow for curvature in the relationship between age and mercury concentration, and allow for an interaction between gender and age. Use a computer software package to perform the multiple regression analysis. Refer to the printout to answer these questions. b. Comment on the fit of the model, using relevant statistics from the printout. c. What is the prediction equation for predicting the mercury concentration in a female dolphin as a function of her |
age? d. What is the prediction equation for predicting the mercury concentration in a male dolphin as a function of his age? e. Does the quadratic term in the prediction equation for females contribute significantly to the prediction of the mercury concentration in a female dolphin? f. Are there any other important conclusions that you feel were not considered regarding the fitted prediction equation? EX1330 13.30 The Cost of Flying Does the cost of a plane flight depend on the airline as well as the distance traveled? In Exercise 12.21, you explored the first part of this problem. The data shown in this table compare the average cost and distance traveled for two different airlines, measured for 11 heavily traveled air routes in the United States.7 Route Chicago–Detroit Chicago–Denver Chicago–St. Louis Chicago–Seattle Chicago–Cleveland Los Angeles–Chicago Chicago–Atlanta New York–Los Angeles New York–Chicago Los Angeles–Honolulu New York–San Francisco Distance Cost 238 901 262 1736 301 1757 593 2463 714 2556 2574 148 164 256 312 136 152 424 520 129 139 361 473 162 183 444 525 287 334 323 333 513 672 Airline American United American United American United American United American United American United American United American United American United American United American United Use a computer package to analyze the data with a multiple regression analysis. Comment on the fit of the model, the significant variables, any interactions that exist, and any regression assumptions that may have been violated. Summarize your results in a report, including printouts and graphs if possible. EX1331 13.31 On the Road Again Until recently, performance tires were fitted mostly on sporty or luxury vehicles. Now they come standard on many everyday sedans. Increased levels of handling and grip have come at the expense of tread wear. The data that follows is abstracted from a report on H-rated performance tires by Consumer Reports8 in which several aspects of performance were evaluated for n = 22 different tires where y overall score x2 wet braking x4 roll resistance x1 dry braking x3 handling x5 tread life SUPPLEMENTARY EXERCISES ❍ 589 Tire Cost y x1 x2 x3 x4 x5 Dunlop® SP Sport 5000 Michelin® Pilot Exalto A/S Falken® Ziex ZE 512 Continental® Conti |
ProContact Michelin Pilot XGT H4 Bridgestone® Potenza RE 950 BFGoodrich® Traction T/A Yokohama® Avid H4s Sumitomo® HTR H4 Bridgestone HP50 Michelin Energy MXV4 Plus Goodyear® Assurance Triple Tred Kumho Solus KH16 Pirelli® P6 Four Seasons Bridgestone Potenza G009 Dayton® Daytona HR Fuzion® HRi Continental ContiPremierContact Cooper® Lifeliner Touring SLE Bridgestone Turanza EL400 Hankook® Optimo H418 General Exclaim 81 78 56 77 98 80 68 62 56 79 103 85 49 71 62 46 49 91 61 91 51 53 85 83 83 81 81 80 78 77 76 75 73 72 72 70 70 69 69 68 65 63 62 50 The variables x1 through x5 are coded using the scale 5 excellent, 4 very good, 3 good, 2 fair, and 1 poor. a. Use a program of your choice to find the correlation matrix for the variables under study including cost. Is cost significantly correlated with any of the study variables? Which variables appear to be highly correlated with y, the total score? b. Write a model to describe y, total score, as a function of the variables x1 dry braking, x2 wet braking, x3 handling, x4 roll resistance, and x5 tread life. c. Use a regression program of your choice to fit the full model using all of the predictors. What proportion of the variation in y is explained by regression? Does this convey the impression that the model adequately explains the inherent variability in y? d. Which variable or variables appear to be good predictors of y? How might you refine the model in light of these results? Use these variables in refitting the model. What proportion of the variation is explained by this refitted model? Comment on the adequacy of this reduced model in comparison to the full model. EX1332 13.32 Tuna Fish The tuna fish data from Exercise 11.16 were analyzed as a completely randomized design with four treatments. However, we could also view the experimental design as a 2 2 590 ❍ CHAPTER 13 MULTIPLE REGRESSION ANALYSIS factorial experiment with unequal replications. The data are shown below.9 Light Tuna White Tuna.62 |
.66.62.65.60.67 Oil 2.56 1.92 1.30 1.79 1.23 1.27 1.22 1.19 1.22 Water.99 1.92 1.23.85.65.53 1.41 1.49 1.29 1.27 1.35 1.12.63.67.69.60.60.66 1.29 1.00 1.27 1.28 Source: Case Study “Tuna Goes Upscale” Copyright 2001 by Consumers Union of U.S., Inc., Yonkers, NY 10703-1057, a nonprofit organization. Reprinted with permission from the June 2001 issue of Consumer Reports® for educational purposes only. No commercial use or reproduction permitted. www.ConsumerReports.org. The data can be analyzed using the model y b0 b1x1 b2x2 b3x1x2 e where x1 0 if oil, 1 if water x2 0 if light tuna, 1 if white tuna a. Show how you would enter the data into a computer spreadsheet, entering the data into columns for y, x1, x2, and x1x2. b. The printout generated by MINITAB is shown below. What is the least-squares prediction equation? MINITAB output for Exercise 13.32 Regression Analysis: y versus x1, x2, x1x2 The regression equation is y = 1.15 - 0.251 x1 + 0.078 x2 + 0.306 x1x2 Predictor Coef SE Coef T P Constant 1.1473 0.1370 8.38 0.000 x1 -0.2508 0.1830 -1.37 0.180 x2 0.0777 0.2652 0.29 0.771 x1x2 0.3058 0.3330 0.92 0.365 S = 0.454287 R-Sq = 11.9% R-Sq(adj) = 3.9% Analysis of Variance Source DF SS MS F P Regression 3 0.9223 0.3074 1.49 0.235 Residual Error 33 6.8104 0.2064 Total 36 7.7328 13.33 Tuna, continued Refer to Exercise 13.32. The hypothesis tested in Chapter 11—that the average prices for the four types |
of tuna are the same—is equivalent to saying that E(y) will not change as x1 and x2 change. This can only happen when b1 b2 b3 0. Use the MINITAB printout for the one-way ANOVA shown below to perform the test for equality of treatment means. Verify that this test is identical to the test for significant regression in Exercise 13.32. MINITAB output for Exercise 13.33 One-Way ANOVA: Light Water, White Oil, White Water, Light Oil Source DF SS MS F P Factor 3 0.922 0.307 1.49 0.235 Error 33 6.810 0.206 Total 36 7.733 S = 0.4543 R-Sq = 11.93% R-Sq(adj) = 3.92% 13.34 Quality Control A manufacturer recorded the number of defective items (y) EX1334 produced on a given day by each of 10 machine operators and also recorded the average output per hour (x1) for each operator and the time in weeks from the last machine service (x2). y 13 1 11 2 20 15 27 5 26 1 x1 20 15 23 10 30 21 38 18 24 16 x2 3.0 2.0 1.5 4.0 1.0 3.5 0 2.0 5.0 1.5 The printout that follows resulted when these data were analyzed using the MINITAB package using the model: E(y) b0 b1x1 b2x2 Regression Analysis: y versus x1, x2 The regression equation is y = -28.4 + 1.46 x1 + 3.84 x2 Predictor Coef SE Coef T P Constant -28.3906 0.8273 -34.32 0.000 x1 1.46306 0.02699 -54.20 0.000 x2 3.8446 0.1426 26.97 0.000 S = 0.548433 R-Sq = 99.8% R-Sq(adj) = 99.7% c. Is there an interaction between type of tuna and Analysis of Variance type of packing liquid? d. Which, if any, of the main effects (type of tuna and type of packing liquid) contribute significant information for the prediction of y? e. How well does the model fit |
the data? Explain. Source DF SS MS F P Regression 2 884.79 442.40 1470.84 0.000 Residual Error 7 2.11 0.30 Total 9 886.90 Source DF Seq SS x1 1 666.04 x2 1 218.76 a. Interpret R2 and comment on the fit of the model. b. Is there evidence to indicate that the model contributes significantly to the prediction of y at the a.01 level of significance? c. What is the prediction equation relating yˆ and x1 when x2 4? d. Use the fitted prediction equation to predict the number of defective items produced for an operator whose average output per hour is 25 and whose machine was serviced three weeks ago. e. What do the residual plots tell you about the valid- ity of the regression assumptions? Normal Probability Plot of the Residuals (response is y) t n e c r e P 99 95 90 80 70 60 50 40 30 20 10.050 0.25 0.00 0.25 0.50 0.75 1.0 0.5 0.0 Residual 0.5 1.0 Residuals versus the Fitted Values (response is y) 0 5 10 15 Fitted Value 20 25 30 EX1335 13.35 Metal Corrosion and Soil Acids In an investigation to determine the relationship between the degree of metal corrosion and the length of time the metal is exposed to the action of soil acids, the percentage of corrosion and exposure time were measured weekly. SUPPLEMENTARY EXERCISES ❍ 591 y x 0.1 1 0.3 2 0.5 3 0.8 4 1.2 5 1.8 6 2.5 7 3.4 8 The data were fitted using the quadratic model, E( y) b0 b1x b2x 2, with the following results. Regression Analysis: y versus x, x-sq The regression equation is y = 0.196 - 0.100 x + 0.0619 x-sq Predictor Coef SE Coef T P Constant 0.19643 0.07395 2.66 0.045 x -0.10000 0.03770 -2.65 0.045 x-sq2 0.061905 0.004089 15. |
14 0.000 S = 0.0530049 R-Sq = 99.9% R-Sq(adj) = 99.8% Analysis of Variance Source DF SS MS F P Regression 2 9.4210 4.7105 1676.61 0.000 Residual Error 5 0.0140 0.0028 Total 7 9.4350 Source DF Seq SS x 1 8.7771 x-sq 1 0.6438 a. What percentage of the total variation is explained by the quadratic regression of y on x? b. Is the regression on x and x2 significant at the a.05 level of significance? c. Is the linear regression coefficient significant when x2 is in the model? d. Is the quadratic regression coefficient significant when x is in the model? e. The data were fitted to a linear model without the quadratic term with the results that follow. What can you say about the contribution of the quadratic term when it is included in the model? Regression Analysis: y versus x The regression equation is y = -0.732 + 0.457 x Predictor Coef SE Coef T P Constant -0.7321 0.2580 -2.84 0.030 x 0.45714 0.05109 8.95 0.000 S = 0.331124 R-Sq = 93.0% R-Sq(adj) = 91.9% Analysis of Variance Source DF SS MS F P Regression 1 8.7771 8.7771 80.05 0.000 Residual Error 6 0.6579 0.1096 Total 7 9.4350 f. The plot of the residuals from the linear regression model in part e shows a specific pattern. What is the term in the model that seems to be missing? 592 ❍ CHAPTER 13 MULTIPLE REGRESSION ANALYSIS Residuals versus the Fitted Values (response is y) The following computer printout resulted when the data were analyzed using MINITAB. Regression Analysis: y versus x1, x2, x3 The regression equation is y = -3.11 + 0.503 x1 - 1.61 x2 - 1.15 x3 Predictor |
Coef SE Coef T P Constant -3.112 3.600 -0.86 0.421 x1 0.50314 0.07670 6.56 0.001 x2 -1.6126 0.6579 -2.45 0.050 x3 -1.155 1.791 -0.64 0.543 S = 1.89646 R-Sq = 92.2% R-Sq(adj) = 88.4% Analysis of Variance Source DF SS MS F P Regression 3 256.621 85.540 23.78 0.001 Residual Error 6 21.579 3.597 Total 9 278.200 Source DF Seq SS x1 1 229.113 x2 1 26.012 x3 1 1.496 a. Interpret R2 and comment on the fit of the model. b. Test for a significant regression of y on x1, x2, and x3 at the 5% level of significance. c. Test the hypothesis H0 : b3 0 against Ha : b3 0 using a.05. Comment on the results of your test. d. What can be said about the utility of x3 as a pre- dictor variable in this problem.5 0.4 0.3 0.2 0.1 0.0 0.1 0.2 0.3 0.4 0.0 0.5 1.0 1.5 Fitted Value 2.0 2.5 3.0 13.36 Managing your Money A particular savings and loan corporation is interested in EX1336 determining how well the amount of money in family savings accounts can be predicted using the three independent variables—annual income, number in the family unit, and area in which the family lives. Suppose that there are two specific areas of interest to the corporation. The following data were collected, where y Amount in all savings accounts x1 Annual income x2 Number in family unit x3 0 if in Area 1; 1 if not Both y and x1 were recorded in units of $1000. y 0.5 0.3 1.3 0.2 5.4 1.3 12.8 1.5 0.5 15.2 x1 19.2 23.8 28.6 15.4 30.5 20.3 34.7 25.2 18.6 45.8 |
x2 x3 CASE STUDY Foreign Cars “Made in the U.S.A.”—Another Look The case study in Chapter 12 examined the effect of foreign competition in the automotive industry as the number of imported cars steadily increased during the 1970s and 1980s.10 The U.S. automobile industry has been besieged with complaints about product quality, worker layoffs, and high prices and has spent billions in advertising and research to produce an American-made car that will satisfy consumer demands. Have they been successful in stopping the flood of imported cars purchased by American consumers? The data shown in the table give the number of imported cars (y) sold in the United States (in millions) for the years 1969–2005. To simplify the analysis, we have coded the year using the coded variable x Year 1969. Year 1969, x Number of Imported Cars 10 11 12 13 14 15 16 17 1.1 1.3 1.6 1.6 1.8 1.4 1.6 1.5 2.1 2.0 2.3 2.4 2.3 2.2 2.4 2.4 2.8 3.2 Year 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 CASE STUDY ❍ 593 Year 1969, x Number of Imported Cars, y 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 3.1 3.1 2.8 2.5 2.1 2.0 1.8 1.8 1.6 1.4 1.4 1.4 1.8 2.1 2.2 2.3 2.2 2.2 2.3 Year 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 By examining a scatterplot of these data, you will find that the number of imported cars does not appear to follow a linear relationship over time, but rather exhibits a curvilinear response. The question, then, is to decide whether a second-, third-, or higher-order model adequately describes the data. 1. Plot the data and sketch what you consider to be the best-fitting linear, quadratic, and cubic models. 2. Find the residuals using the fitted linear regression model. Does there appear to be any pattern in the residuals when plotted against x? What model do the residuals indicate would produce a |
better fit? 3. What is the increase in R2 when you fit a quadratic rather than a linear model? Is the coefficient of the quadratic term significant? Is the fitted quadratic model significantly better than the fitted linear model? Plot the residuals from the fitted quadratic model. Does there seem to be any apparent pattern in the residuals when plotted against x? 4. What is the increase in R2 when you compare the fitted cubic with the fitted quadratic model? Is the fitted cubic model significantly better than the fitted quadratic? Are there any patterns in a plot of the residuals versus x? What proportion of the variation in the response y is not accounted for by fitting a cubic model? Should any higher-order polynomial model be considered? Why or why not? 14 Analysis of Categorical Data GENERAL OBJECTIVES Many types of surveys and experiments result in qualitative rather than quantitative response variables, so that the responses can be classified but not quantified. Data from these experiments consist of the count or number of observations that fall into each of the response categories included in the experiment. In this chapter, we are concerned with methods for analyzing categorical data. CHAPTER INDEX ● Assumptions for chi-square tests (14.7) ● Comparing several multinomial populations (14.5) ● Contingency tables (14.4) ● The multinomial experiment (14.1) ● Other applications (14.7) ● Pearson’s chi-square statistic (14.2) ● A test of specified cell probabilities (14.3) How Do I Determine the Appropriate Number of Degrees of Freedom? © Dave Bartruff/CORBIS Can a Marketing Approach Improve Library Services? How do you rate your library? Is the atmosphere friendly, dull, or too quiet? Is the library staff helpful? Are the signs clear and unambiguous? The modern consumer-led approach to marketing, in general, involves the systematic study by organizations of their customers’ wants and needs in order to improve their services or products. In the case study at the end of this chapter, we examine the results of a study to |
explore the attitudes of young adults toward the services provided by libraries. 594 14.1 A DESCRIPTION OF THE EXPERIMENT ❍ 595 A DESCRIPTION OF THE EXPERIMENT 14.1 Many experiments result in measurements that are qualitative or categorical rather than quantitative; that is, a quality or characteristic (rather than a numerical value) is measured for each experimental unit. You can summarize this type of data by creating a list of the categories or characteristics and reporting a count of the number of measurements that fall into each category. Here are a few examples: • People can be classified into five income brackets. • A mouse can respond in one of three ways to a stimulus. • An M&M’S candy can have one of six colors. • An industrial process manufactures items that can be classified as “acceptable,” “second quality,” or “defective.” These are some of the many situations in which the data set has characteristics appropriate for the multinomial experiment. THE MULTINOMIAL EXPERIMENT • The experiment consists of n identical trials. • The outcome of each trial falls into one of k categories. • The probability that the outcome of a single trial falls into a particular category—say, category i—is pi and remains constant from trial to trial. This probability must be between 0 and 1, for each of the k categories, and the sum of all k probabilities is Spi 1. • The trials are independent. • The experimenter counts the observed number of outcomes in each category, written as O1, O2,..., Ok, with O1 O2 Ok n. You can visualize the multinomial experiment by thinking of k boxes or cells into which n balls are tossed. The n tosses are independent, and on each toss the chance of hitting the ith box is the same. However, this chance can vary from box to box; it might be easier to hit box 1 than box 3 on each toss. Once all n balls have been tossed, the number in each box or cell—O1, O2,..., Ok—is counted. You have probably noticed the similarity between the multinomial experiment and the binomial experiment introduced in Chapter 5. In fact, when there are k 2 categories, the two experiments are identical, except for notation. Instead of p and q, we write p1 and |
p2 to represent the probabilities for the two categories, “success” and “failure.” Instead of x and (n x), we write O1 and O2 to represent the observed number of “successes” and “failures.” When we presented the binomial random variable, we made inferences about the binomial parameter p (and by default, q 1 p) using large-sample methods based on the z statistic. In this chapter, we extend this idea to make inferences about the multinomial parameters, p1, p2,..., pk, using a different type of statistic. This statistic, whose approximate sampling distribution was derived by a British statistician named Karl Pearson in 1900, is called the chi-square (or sometimes Pearson’s chi-square) statistic. The multinomial experiment is an extension of the binomial experiment. For a binomial experiment, k 2. 596 ❍ CHAPTER 14 ANALYSIS OF CATEGORICAL DATA 14.2 PEARSON’S CHI-SQUARE STATISTIC Suppose that n 100 balls are tossed at the cells (boxes) and you know that the probability of a ball falling into the first box is p1.1. How many balls would you expect to fall into the first box? Intuitively, you would expect to see 100(.1) 10 balls in the first box. This should remind you of the average or expected number of successes, m np, in the binomial experiment. In general, the expected number of balls that fall into cell i—written as Ei—can be calculated using the formula Ei npi for any of the cells i 1, 2,..., k. Now suppose that you hypothesize values for each of the probabilities p1, p2,..., pk and calculate the expected number for each category or cell. If your hypothesis is correct, the actual observed cell counts, Oi, should not be too different from the expected cell counts, Ei npi. The larger the differences, the more likely it is that the hypothesis is incorrect. The Pearson chi-square statistic uses the differences (Oi Ei) by first squaring these differences to eliminate negative contributions, and then forming a weighted average of the squared differences. The Pearson’s chi- |
square tests are always uppertailed tests. PEARSON’S CHI-SQUARE TEST STATISTIC X2 S(Oi Ei)2 Ei summed over all k cells, with Ei npi. Although the mathematical proof is beyond the scope of this book, it can be shown that when n is large, X2 has an approximate chi-square probability distribution in repeated sampling. If the hypothesized expected cell counts are correct, the differences (Oi Ei) are small and X2 is close to 0. But, if the hypothesized probabilities are incorrect, large differences (Oi Ei) result in a large value of X2. You should use a right-tailed statistical test and look for an unusually large value of the test statistic. The chi-square distribution was used in Chapter 10 to make inferences about a single population variance s 2. Like the F distribution, its shape is not symmetric and depends on a specific number of degrees of freedom. Once these degrees of freedom are specified, you can use Table 5 in Appendix I to find critical values or to bound the p-value for a particular chi-square statistic. As an alternative, you can use the Chi-Square Probabilities applet to find critical values or exact p-values for the test. The appropriate degrees of freedom for the chi-square statistic vary depending on the particular application you are using. Although we will specify the appropriate degrees of freedom for the applications presented in this chapter, you should use the general rule given next for determining degrees of freedom for the chi-square statistic. How Do I Determine the Appropriate Number of Degrees of Freedom? 1. Start with the number of categories or cells in the experiment. 2. Subtract one degree of freedom for each linear restriction on the cell probabili- ties. You will always lose one df because p1 p2 pk 1. 14.3 TESTING SPECIFIED CELL PROBABILITIES: THE GOODNESS-OF-FIT TEST ❍ 597 3. Sometimes the expected cell counts cannot be calculated directly but must be estimated using the sample data. Subtract one degree of freedom for every independent population parameter that must be estimated to obtain the estimated values of Ei. We begin with the simplest applications of the chi-square test statistic—the goodness- of-fit test. TESTING SPECIFIED CELL PROBA |
BILITIES: THE GOODNESS-OF-FIT TEST 14.3 The simplest hypothesis concerning the cell probabilities specifies a numerical value for each cell. The expected cell counts are easily calculated using the hypothesized probabilities, Ei npi, and are used to calculate the observed value of the X2 test statistic. For a multinomial experiment consisting of k categories or cells, the test statistic has an approximate x 2 distribution with df (k 1). EXAMPLE 14.1 A researcher designs an experiment in which a rat is attracted to the end of a ramp that divides, leading to doors of three different colors. The researcher sends the rat down the ramp n 90 times and observes the choices listed in Table 14.1. Does the rat have (or acquire) a preference for one of the three doors? TABLE 14.1 ● Rat’s Door Choices Door Green Red Blue Observed Count (Oi) 20 39 31 Solution If the rat has no preference in the choice of a door, you would expect in the long run that the rat would choose each door an equal number of times. That is, the null hypothesis is H0 : p1 p2 p3 1 3 versus the alternative hypothesis Ha : At least one pi is different from 1 3 where pi is the probability that the rat chooses door i, for i 1, 2, and 3. The expected cell counts are the same for each of the three categories—namely, npi 90(1/3) 30. The chi-square test statistic can now be calculated as The rejection region and p-value are in the upper tail of the chi-square distribution. X2 S(Oi Ei)2 Ei (31 (39 (20 30)2 30)2 30)2 6.067 30 30 30 598 ❍ CHAPTER 14 ANALYSIS OF CATEGORICAL DATA For this example, the test statistic has (k 1) 2 degrees of freedom because the only linear restriction on the cell probabilities is that they must sum to 1. Hence, you can use Table 5 in Appendix I to find bounds for the right-tailed p-value. Since the.025 7.38, the p-value observed value, X2 6.067, lies between x 2 is between.025 and.050. The researcher would report the results as significant at the 5% level (P.05), meaning that the null hypothesis |
of no preference is rejected. There is sufficient evidence to indicate that the rat has a preference for one of the three doors..050 5.99 and x 2 What more can you say about the experiment once you have determined statistically that the rat has a preference? Look at the data to see where the differences lie. The Goodness-of-Fit Test applet, shown in Figure 14.1, will help. F IG URE 14. 1 Goodness-of-Fit applet ● You can see the value of X2 and its exact p-value (.0482) at the bottom of the applet. Just above them, the shaded bar shows the distribution of the observed frequencies. The blue bars represent categories that have an excess of observations relative to expected and red cells (gray in Figure 14.1) indicate a deficit of observations relative to expected. The intensity of the color reflects the magnitude of the discrepancy. For this example, that rat chose the red and blue doors more often than expected, and the green door less often. The blue door was chosen only a little more than one-third of the time: 3 1.344 0 9 However, the sample proportions for the other two doors are quite different from onethird. The rat chooses the green door least often—only 22% of the time: 2 0.222 0 9 The rat chooses the red door most often—43% of the time: 3 9.433 0 9 You would summarize the results of the experiment by saying that the rat has a preference for the red door. Can you conclude that the preference is caused by the door color? The answer is no—the cause could be some other physiological or psychological factor that you have not yet explored. Avoid declaring a causal relationship between color and preference! EXAMPLE 14.2 TABLE 14.2 Degrees of freedom for a simple goodness-of-fit test: df k 1 14.3 TESTING SPECIFIED CELL PROBABILITIES: THE GOODNESS-OF-FIT TEST ❍ 599 The proportions of blood phenotypes A, B, AB, and O in the population of all Caucasians in the United States are.41,.10,.04, and.45, respectively. To determine whether or not the actual population proportions fit this set of reported probabilities, a random sample of 200 Americans were selected and their blood phenotypes were recorded. The observed and expected cell counts |
are shown in Table 14.2. The expected cell counts are calculated as Ei 200pi. Test the goodness of fit of these blood phenotype proportions. ● Counts of Blood Phenotypes A AB O B Observed (Oi) Expected (Ei) 89 82 18 20 12 8 81 90 Solution The hypothesis to be tested is determined by the model probabilities: H0 : p1.41; p2.10; p3.04; p4.45 versus Ha : At least one of the four probabilities is different from the specified value Then X2 S(Oi Ei)2 Ei (81 (89 90)2 82)2 3.70 90 82 From Table 5 in Appendix I, indexing df (k 1) 3, you can find that the ob.100 6.25, so that the p-value is greater served value of the test statistic is less than x 2 than.10. You do not have sufficient evidence to reject H0; that is, you cannot declare that the blood phenotypes for American Caucasians are different from those reported earlier. The results are nonsignificant (NS). You can find instructions in the “My MINITAB” section at the end of this chapter that allow you to perform the chi-square goodness-of-fit test and generate the results. This procedure is new to MINITAB 15. If you are using a previous version of MINITAB, you can still generate results using the calculator function. Notice the difference in the goodness-of-fit hypothesis compared to other hypotheses that you have tested. In the goodness-of-fit test, the researcher uses the null hypothesis to specify the model he believes to be true, rather than a model he hopes to prove false! When you could not reject H0 in the blood type example, the results were as expected. Be careful, however, when you report your results for goodness-offit tests. You cannot declare with confidence that the model is absolutely correct without reporting the value of b for some practical alternatives. 14.3 EXERCISES BASIC TECHNIQUES 14.1 List the characteristics of a multinomial experiment. 14.2 Use Table 5 in Appendix I to find the value of x 2 with the following area a to its right: a |
. a.05, df 3 b. a.01, df 8 600 ❍ CHAPTER 14 ANALYSIS OF CATEGORICAL DATA b. k 10, a.01 14.3 Give the rejection region for a chi-square test of specified probabilities if the experiment involves k categories in these cases: a. k 7, a.05 14.4 Use Table 5 in Appendix I to bound the p-value for a chi-square test: a. X2 4.29, df 5 14.5 Suppose that a response can fall into one of k 5 categories with probabilities p1, p2,..., p5 and that n 300 responses produced these category counts: b. X2 20.62, df 6 Category Observed Count 1 47 2 63 3 74 4 51 5 65 a. Are the five categories equally likely to occur? How would you test this hypothesis? b. If you were to test this hypothesis using the chisquare statistic, how many degrees of freedom would the test have? c. Find the critical value of x 2 that defines the rejec- tion region with a.05. d. Calculate the observed value of the test statistic. e. Conduct the test and state your conclusions. 14.6 Suppose that a response can fall into one of k 3 categories with probabilities p1.4, p2.3, and p3.3, and n 300 responses produce these category counts: Category Observed Count 1 130 2 98 3 72 Do the data provide sufficient evidence to indicate that the cell probabilities are different from those specified for the three categories? Find the approximate p-value and use it to make your decision. APPLICATIONS 14.7 Your Favorite Lane A freeway with four lanes in each direction was studied to see whether drivers prefer to drive on the inside lanes. A total of 1000 automobiles were observed during heavy earlymorning traffic, and the number of cars in each lane was recorded: Lane 1 2 3 4 Observed Count 294 276 238 192 Do the data present sufficient evidence to indicate that some lanes are preferred over others? Test using a.05. If there are any differences, discuss the nature of the differences. 14.8 Peonies A peony plant with red petals was crossed with another plant having streaky petals. A geneticist states that 75% of the offspring from this cross will have red flowers. To |
test this claim, 100 seeds from this cross were collected and germinated, and 58 plants had red petals. Use the chi-square goodness-of-fit test to determine whether the sample data confirm the geneticist’s prediction. 14.9 Heart Attacks on Mondays Do you hate Mondays? Researchers from Germany have provided another reason for you: They concluded that the risk of a heart attack for a working person may be as much as 50% greater on Monday than on any other day.1 The researchers kept track of heart attacks and coronary arrests over a period of 5 years among 330,000 people who lived near Augsburg, Germany. In an attempt to verify their claim, you survey 200 working people who had recently had heart attacks and recorded the day on which their heart attacks occurred: Day Observed Count Sunday Monday Tuesday Wednesday Thursday Friday Saturday 24 36 27 26 32 26 29 Do the data present sufficient evidence to indicate that there is a difference in the incidence of heart attacks depending on the day of the week? Test using a.05. 14.10 Mortality Statistics Medical statistics show that deaths due to four major diseases—call them A, B, C, and D—account for 15%, 21%, 18%, and 14%, respectively, of all nonaccidental deaths. A study of the causes of 308 nonaccidental deaths at a hospital gave the following counts: Disease Deaths A 43 B 76 C 85 D 21 Other 83 Do these data provide sufficient evidence to indicate that the proportions of people dying of diseases A, B, C, and D at this hospital differ from the proportions accumulated for the population at large? 14.11 Schizophrenia Research has suggested a link between the prevalence of schizophrenia and birth during particular months of the year in which viral infections are prevalent. Suppose you are working on a similar problem and you suspect a linkage between a disease observed in later life and month of birth. 14.3 TESTING SPECIFIED CELL PROBABILITIES: THE GOODNESS-OF-FIT TEST ❍ 601 You have records of 400 cases of the disease, and you classify them according to month of birth. The data appear in the table. Do the data present sufficient evidence to indicate that the proportion of cases of the disease per month varies from month to month? Test with a.05. Month Births Month Births Jan 38 July 24 Feb Mar Apr May June 31 42 46 28 31 Aug 29 Sept 33 Oct 36 Nov 27 Dec 35 14.12 Snap Peas Suppose |
you are interested in following two independent traits in snap peas—seed texture (S smooth, s wrinkled) and seed color (Y yellow, y green)—in a second-generation cross of heterozygous parents. Mendelian theory states that the number of peas classified as smooth and yellow, wrinkled and yellow, smooth and green, and wrinkled and green should be in the ratio 9:3:3:1. Suppose that 100 randomly selected snap peas have 56, 19, 17, and 8 in these respective categories. Do these data indicate that the 9:3:3:1 model is correct? Test using a.01. 14.13 M&M’S The Mars, Incorporated website reports the following percentages of the various colors of its M&M’S candies for the “milk chocolate” variety:2 118 blue, 108 orange, and 85 green candies. Do the data substantiate the percentages reported by Mars, Incorporated? Use the appropriate test and describe the nature of the differences, if there are any. 14.14 Peanut M&M’S The percentage of various colors are different for the “peanut” variety of M&M’S candies, as reported on the Mars, Incorporated website:3 What Colors Come In Your Bag? Brown Yellow Red Blue Orange Green m m m mm mm m 12% 15% 12% 23% 23% 15% What Colors Come In Your Bag? Brown Yellow Red Blue Orange Green m m m mm mm mm 13% 14% 13% 24% 20% 16% A 14-ounce bag of peanut M&M’S is randomly selected and contains 70 brown, 87 yellow, 64 red, 115 blue, 106 orange, and 85 green candies. Do the data substantiate the percentages reported by Mars, Incorporated? Use the appropriate test and describe the nature of the differences, if there are any. 14.15 Admission Standards Previous enrollment records at a large university indicate that of the total number of persons who apply for admission, 60% are admitted unconditionally, 5% are admitted on a trial basis, and the remainder are refused admission. Of 500 applications to date for the coming year, 329 applicants have been admitted unconditionally, 43 have been admitted on a trial basis, and the remainder have been refused admission. Do these data indicate a departure from previous admission rates? Test using a.05. A 14-ounce bag of milk |
chocolate M&M’S is randomly selected and contains 70 brown, 72 yellow, 61 red, 602 ❍ CHAPTER 14 ANALYSIS OF CATEGORICAL DATA CONTINGENCY TABLES: A TWO-WAY CLASSIFICATION 14.4 In some situations, the researcher classifies an experimental unit according to two qualitative variables to generate bivariate data, which we discussed in Chapter 3. • A defective piece of furniture is classified according to the type of defect and the production shift during which it was made. • A professor is classified by professional rank and the type of university (public or private) at which she works. • A patient is classified according to the type of preventive flu treatment he received and whether or not he contracted the flu during the winter. When two categorical variables are recorded, you can summarize the data by counting the observed number of units that fall into each of the various intersections of category levels. The resulting counts are displayed in an array called a contingency table. A total of n 309 furniture defects were recorded and the defects were classified into four types: A, B, C, or D. At the same time, each piece of furniture was identified by the production shift in which it was manufactured. These counts are presented in a contingency table in Table 14.3. EXAMPLE 14.3 TABLE 14.3 ● Contingency Table Type of Defects A B C D Total Shift 3 Total 33 17 49 20 119 74 69 128 38 309 1 15 21 45 13 94 2 26 31 34 5 96 When you study data that involves two variables, one important consideration is the relationship between the two variables. Does the proportion of measurements in the various categories for factor 1 depend on which category of factor 2 is being observed? For the furniture example, do the proportions of the various defects vary from shift to shift, or are these proportions the same, independently of which shift is observed? You may remember a similar phenomenon called interaction in the a b factorial experiment from Chapter 11. In the analysis of a contingency table, the objective is to determine whether or not one method of classification is contingent or dependent on the other method of classification. If not, the two methods of classification are said to be independent. The Chi-Square Test |
of Independence The question of independence of the two methods of classification can be investigated using a test of hypothesis based on the chi-square statistic. These are the hypotheses: H0 : The two methods of classification are independent Ha : The two methods of classification are dependent With two-way classifications, we do not test hypotheses about specific probabilities. We test whether the two methods of classification are independent. 14.4 CONTINGENCY TABLES: A TWO-WAY CLASSIFICATION ❍ 603 Suppose we denote the observed cell count in row i and column j of the contingency table as Oij. If you knew the expected cell counts (Eij npij ) under the null hypothesis of independence, then you could use the chi-square statistic to compare the observed and expected counts. However, the expected values are not specified in H0, as they were in previous examples. To explain how to estimate these expected cell counts, we must revisit the concept of independent events from Chapter 4. Consider pij, the probability that an observation falls into row i and column j of the contingency table. If the rows and columns are independent, then pij P(observation falls in row i and column j) P(observation falls in row i) P(observation falls in column j) pi pj where pi and pj are the unconditional or marginal probabilities of falling into row i or column j, respectively. If you could obtain proper estimates of these marginal probabilities, you could use them in place of pij in the formula for the expected cell count. Fortunately, these estimates do exist. In fact, they are exactly what you would in- tuitively choose: • To estimate a row probability, use Degrees of freedom for an r c contingency table: df (r 1)(c 1). pˆi Total observations in row i Total number of observations r i n • To estimate a column probability, use pˆj Total observations in column j Total number of observations c j n The estimate of the expected cell count for row i and column j follows from the independence assumption. ESTIMATED EXPECTED CELL COUNT Eˆij nr ic j ri n n cj n where ri is the total for row i and cj is the total for column j. The chi-square test |
statistic for a contingency table with r rows and c columns is calculated as Eˆij)2 X2 S(Oij Eˆij and can be shown to have an approximate chi-square distribution with df (r 1)(c 1) If the observed value of X2 is too large, then the null hypothesis of independence is rejected. 604 ❍ CHAPTER 14 ANALYSIS OF CATEGORICAL DATA EXAMPLE 14.4 Refer to Example 14.3. Do the data present sufficient evidence to indicate that the type of furniture defect varies with the shift during which the piece of furniture is produced? Solution The estimated expected cell counts are shown in parentheses in Table 14.4. For example, the estimated expected count for a type C defect produced during the second shift is 32 r3 c2 (12 96) 39.77 )( 8 Eˆ n 0 9 3 TABLE 14.4 ● Observed and Estimated Expected Cell Counts Shift Type of Defects 1 2 3 Total A B C D 15 (22.51) 21 (20.99) 45 (38.94) 13 (11.56) 26 (22.99) 31 (21.44) 34 (39.77) 5 (11.81) 33 (28.50) 17 (26.57) 49 (49.29) 20 (14.63) Total 94 96 119 74 69 128 38 309 You can now use the values shown in Table 14.4 to calculate the test statistic as Eˆ X2 S(Oij ij)2 Eˆ ij (20 (26 (15.63)2.99)2.51)2 1 4 2 2 2 2 3 6 14. 9 9 22. 1 5 22. 19.18 When you index the chi-square distribution in Table 5 in Appendix I with df (r 1)(c 1) (4 1)(3 1) 6 the observed test statistic is greater than x 2.005 18.5476, which indicates that the p-value is less than.005. You can reject H0 and declare the results to be highly significant (P.005). There is sufficient evidence to indicate that the proportions of defect types vary from shift to shift. The next obvious question you should ask involves the nature of the relationship between the two classifications. Which shift produces more of which type of defect? As with the factorial experiment |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.