Chapter 8 Chapter08 Presentation 1213 Linear Regression Copyright 2009 Pearson Education Inc 1 Fat Versus Protein An Example The following is a scatterplot of total fat versus protein for 30 items on the Burger King menu Chapter08 Presentation 1213 Copyright 2009 Pearson Education Inc 2 Things to Look For in Scatterplots Direction Form Strength Unusual features Chapter08 Presentation 1213 Copyright 2009 Pearson Education Inc 3 Correlation Conditions Before you use correlation you must check several conditions Quantitative Variables Condition Straight Enough Condition Outlier Condition Chapter08 Presentation 1213 Copyright 2009 Pearson Education Inc 4 The Linear Model Remember from Algebra that a straight line can be written as y mx b In Statistics we use a slightly different notation y b0 b1 x Chapter08 Presentation 1213 Copyright 2009 Pearson Education Inc 5 The Linear Model Cont The linear model that best fits our Burger King data is How well does this model fit our data Chapter08 Presentation 1213 Copyright 2009 Pearson Education Inc 6 Residuals The difference between the observed value y and its associated predicted value y is called the residual residual observed predicted y y If the model fits the data well these will all be close to zero Chapter08 Presentation 1213 Copyright 2009 Pearson Education Inc 7 Residuals cont The BK Broiler Chicken sandwich has x 30 grams of protein The model says it should have y 36 grams of fat In fact it has y 25 grams of fat Calculate the residual for this observation and interpret it Chapter08 Presentation 1213 Copyright 2009 Pearson Education Inc BK Broiler Chicken Sandwich 8 How Well Does Any Line Fit the Data Let s calculate ALL the residuals Can we add them up and claim if the sum is small the line fits well Chapter08 Presentation 1213 Copyright 2009 Pearson Education Inc 9 How Well Does Any Line Fit the Data How did we solve this dilemma when calculating a measure of distance from y bar i e when calculating the standard deviation So how can we define the best fitting line Chapter08 Presentation 1213 Copyright 2009 Pearson Education Inc 10 In Class Activity Regression Using the tape measure provided wrap the tape measure around your head around the middle of your forehead and level all the way around your head Have your partner read the measurement in cm to nearest tenth and write it in the table on a following page Have your partner do the same Example 61 5 cm or maybe 61 6 cm Then hold the zero cm measurement of the tape measure at the edge of your shoulder and run it down your arm to the tip of your longest finger Have your partner read this measurement in cm to nearest tenth and write it in the table Have your partner do the same Chapter08 Presentation 1213 Copyright 2009 Pearson Education Inc 11 In Class Activity Regression Cont Now take turns using the tape measure to determine the circumference of your own wrists in cm to nearest tenth Wrap the tape snugly but not tight around your wrist as indicated in the image below Again be sure to use the zero cm on the tape to make your measurement not the end of the tape Chapter08 Presentation 1213 Copyright 2009 Pearson Education Inc 12 In Class Activity Regression Cont Your Initials Your Gender Your Head Circumference Your Arm Length Your Left Wrist Circumference Your Right Wrist Circumference Notes Write these data all 7 columns on a sheet of notebook paper and turn it in to your instructor one sheet per team Your instructor will collect the data put it in JMP excluding your initials and email the class s results to you for the next class Please if you have one BRING YOUR LAPTOP TO THE NEXT CLASS Make sure JMP is installed and working Chapter08 Presentation 1213 Copyright 2009 Pearson Education Inc 13 The Linear Model Revisited y b0 b1 x Recall our linear model is The coefficient b1 is the slope which tells us how rapidly y changes with respect to x The coefficient b0 is the intercept which tells where the line hits intercepts the y axis Chapter08 Presentation 1213 Copyright 2009 Pearson Education Inc 14 Interpreting the Coefficients Example For our Burger King data our model is The slope is b1 0 97 grams of fat per gram of protein For every additional gram of protein we would expect there to be an additional 0 97 grams of fat on average Chapter08 Presentation 1213 Copyright 2009 Pearson Education Inc 15 Interpreting the Coefficients Example For our Burger King data our model is The intercept is b0 6 8 grams of fat For an item that has 0 grams of protein we would estimate there to be 6 8 grams of fat Chapter08 Presentation 1213 Copyright 2009 Pearson Education Inc 16 In Class Activity Meaningless Intercepts For the examples below and on the next page discuss with your teammate cases where it would not make sense to try to interpret the y intercept an estimate of the average value of y when x 0 y average home game attendance each year vs x number of wins each year for a professional baseball team y total of hours spent on the internet per month vs x of Facebook friends for a large collection of individuals Chapter08 Presentation 1213 Copyright 2009 Pearson Education Inc 17 In Class Activity Meaningless Intercepts Cont y weight in pounds vs x height in inches of a large group of people y gas mileage in mpg vs x amount of a fuel additive used ml per gallon of gas Chapter08 Presentation 1213 Copyright 2009 Pearson Education Inc 18 The Least Squares Line In our model we have a slope b1 The slope is built from the correlation and the standard deviations b1 r sy sx So will the sign or on the slope match the sign on the correlation coefficient Chapter08 Presentation 1213 Copyright 2009 Pearson Education Inc 19 The Least Squares Line cont In our model we also have an intercept b0 The intercept is built from the means and the slope b0 y b1 x Typically software is used to calculate the slope and intercept Chapter08 Presentation 1213 Copyright 2009 Pearson Education Inc 20 Fat Versus Protein An Example The predicted fat content for a BK Broiler chicken sandwich which has x 30 grams of protein is Chapter08 Presentation 1213 Copyright 2009 Pearson Education Inc 21 Conditions for Regression We need to check the same conditions for regression as we did for correlation Quantitative Variables Condition Straight Enough Condition Outlier Condition And there is one more Chapter08 Presentation 1213 Copyright 2009 Pearson Education Inc 22 Roles for Variables In correlation the value of r is not affected by
View Full Document