What is the general form of a regression equation? What is the difference between y and ŷ?

Size: px
Start display at page:

Download "What is the general form of a regression equation? What is the difference between y and ŷ?"

Transcription

1 3. Least-Squares Regression What is the general form of a regression equation? What is the difference between y and ŷ? Example: Tapping on cans Don t you hate it when you open a can of soda and some of the contents spray out of the can? Two AP Statistics students, Galton and Gauss, wanted to investigate if tapping on a can of soda would reduce the amount of soda expelled after the can has been shaken. For their experiment, they vigorously shook 40 cans of soda and randomly assigned each can to be tapped for 0 seconds, 4 seconds, 8 seconds, or 1 seconds. Then, after opening the can and cleaning up the mess, the students measured the amount of soda left in each can (in ml). Here is a scatterplot with the least-squares regression line soda tapping time. a) Interpret the slope and y intercept of a regression line. b) Predict the amount remaining for a can that has been tapped 10 seconds. c) Predict the amount remaining for a can that has been tapped for 60 seconds. How confident are you in this prediction? What is extrapolation? Is it a good idea to extrapolate?

2 What is a residual? How do you interpret a residual? Calculate and interpret the residual for the can that was tapped for 4 seconds and had 60 ml of soda remaining. Example: McDonald s Beef Sandwiches (a) How can we determine the best regression line for a set of data? x= Carbs (g) y = Fat (g) (b) Is the least-squares regression line resistant to outliers? (c) Calculate the equation of the least-squares regression line using technology. Make sure to define variables! Sketch the scatterplot with the graph of the least-squares regression line. (d) Interpret the slope and y-intercept in context. (e) Calculate and interpret the residual for the Big Mac, with 45g of carbs and 9g of fat. Read How can we know a line is the right model to use?? Page 174: illustrate how points on scatterplot correspond to points on residual plot

3 What is a residual plot? What is the purpose of a residual plot? What do you look for in a residual plot? How can you tell if a linear model is appropriate? Construct and interpret a residual plot for the McDonald s data. HW #6: page 161 (16, 18, 7 3), page 193 (39, 41, 45, 47, 49, 51) HW #7: page 193 (40 5 even) 3. How well the line fits the data: s and Read page r What is the standard deviation of the residuals? How do you calculate and interpret it? For the can tapping example, the standard deviation of the residuals is s = Interpret this value. Suppose that we wandered in during the can tapping experiment and found a partially-full can. Without measuring the contents, how could we predict how much soda is left in the can (assuming we had access to the data)? How much better would our predictions be if we knew how long it had been tapped?

4 Residual Amount Expelled What is the coefficient of determination r? How do you calculate and interpret r? How is r related to r? How is r related to s? HW #8: page 194 (55 58) 3. (continued) Interpreting Computer Output, Regression to the Mean / Quiz Read When Mentos are dropped into a newly opened bottle of Diet Coke, carbon dioxide is released from the Diet Coke very rapidly, causing the Diet Coke to be expelled from the bottle. Will more Diet Coke be expelled when there is a larger number of Mentos dropped in the bottle? Two statistics students, Charlie and Greg, decided to find out. Using 16 ounce ( cup) bottles of Diet Coke, they dropped either, 3, 4, or 5 Mentos into a randomly selected bottle, waited for the fizzing to die down, and measured the number of cups remaining in the bottle. Then, they subtracted this measurement from the original amount in the bottle to calculate the amount of Diet Coke expelled (in cups) Mentos Fitted Value

5 (a) What is the equation of the least-squares regression line? Define any variables you use. (b) Interpret the slope of the least-squares regression line. Predictor Coef SE Coef T P Constant Mentos S = R-Sq = 60.% R-Sq(adj) (c) What is the correlation? (d) Is a linear model appropriate for this data? Explain. = (e) Would you be willing to use the linear model to predict the amount of Diet Coke expelled when 10 mentos are used? Explain. (f) Calculate and interpret the residual for bottle of diet coke that had mentos and lost 1.5 cups. (g) Interpret the values of r and s. (h) If the amount expelled was measured in ounces instead of cups, how would the values of and s be affected? Explain. r

6 How can you calculate the equation of the least-squares regression line using summary statistics? What happens to the predicted value of y for each increase of 1 standard deviation in x? What is regression to the mean? HW #9 page 195 (59, 61, 63, 65) Putting it all Together: Regression and Correlation Read Does it matter which variable is x and which is y? Not for correlation, yes for regression. Which of the following has the highest correlation?

7 How do outliers affect the correlation, least-squares regression line, and standard deviation of the residuals? Are all outliers influential? Here is a scatterplot showing the cost in dollars and the battery life in hours for a sample of netbooks (small laptop computers). What effect do the two netbooks that cost $500 have on the equation of the least-squares regression line, correlation, standard deviation of the residuals, and r? Explain. Here is a scatterplot showing the relationship between the number of fouls and the number of points scored for NBA players in the season. a) Describe the association. b) Should NBA players commit more fouls if they want to score more points? Explain.