1Chapter08 Presentation 1213Copyright © 2009 Pearson Education, Inc.Chapter 8 Linear RegressionChapter08 Presentation 1213Copyright © 2009 Pearson Education, Inc.2Fat Versus Protein: An Example The following is a scatterplot of total fat versus protein for 30 items on the Burger King menu:Chapter08 Presentation 1213Copyright © 2009 Pearson Education, Inc.3Things to Look For in Scatterplots Direction Form Strength Unusual featuresChapter08 Presentation 1213Copyright © 2009 Pearson Education, Inc.4Correlation Conditions Before you use correlation, you must check several conditions: Quantitative Variables Condition Straight Enough Condition Outlier ConditionChapter08 Presentation 1213Copyright © 2009 Pearson Education, Inc.5The Linear Model Remember from Algebra that a straight line can be written as: In Statistics we use a slightly different notation:ymx b01ˆyb bxChapter08 Presentation 1213Copyright © 2009 Pearson Education, Inc.6The Linear Model (Cont.) The linear model that “best fits” our Burger King data is: How well does this model fit our data?Chapter08 Presentation 1213Copyright © 2009 Pearson Education, Inc.7Residuals The difference between the observed value (y) and its associated predicted value ( ) is called the residual. If the model fits the data well, these will all be close to zero.ˆresidual observed predicted y y yˆChapter08 Presentation 1213Copyright © 2009 Pearson Education, Inc.8Residuals (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.BK Broiler Chicken SandwichChapter08 Presentation 1213Copyright © 2009 Pearson Education, Inc.9How 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 1213Copyright © 2009 Pearson Education, Inc.10How 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 1213Copyright © 2009 Pearson Education, Inc.11In 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. 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. Example: 61.5 cm (or maybe 61.6 cm)Chapter08 Presentation 1213Copyright © 2009 Pearson Education, Inc.12 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.In Class Activity – Regression (Cont.)Chapter08 Presentation 1213Copyright © 2009 Pearson Education, Inc.13In Class Activity – Regression (Cont.) 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.Your InitialsYour GenderYour Head CircumferenceYour Arm LengthYour Left Wrist CircumferenceYour Right Wrist CircumferenceNotesChapter08 Presentation 1213Copyright © 2009 Pearson Education, Inc.14The Linear Model - Revisited The coefficient b1is the slope, which tells us how rapidly changes with respect to x. The coefficient b0is the intercept, which tells where the line hits (intercepts) the y-axis.ˆy Recall our linear model is:01ˆyb bxChapter08 Presentation 1213Copyright © 2009 Pearson Education, Inc.15Interpreting 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 1213Copyright © 2009 Pearson Education, Inc.16Interpreting 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 1213Copyright © 2009 Pearson Education, Inc.17In-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 1213Copyright © 2009 Pearson Education, Inc.18In-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 1213Copyright © 2009 Pearson Education, Inc.19The Least Squares Line In our model, we have a slope (b1): The slope is built from the correlation and the standard deviations: So, will the sign (+ or -) on the slope match the sign on the correlation coefficient?1yxsbrsChapter08 Presentation 1213Copyright © 2009 Pearson Education, Inc.20The Least Squares Line (cont.) In our model, we also have an intercept (b0). The intercept is built from the means and the slope: Typically, software is used to calculate the slope and intercept.01bybxChapter08 Presentation 1213Copyright © 2009 Pearson Education, Inc.21Fat Versus Protein: An
View Full Document