CHAPTER 8: LINEAR REGRESSION

Slides:



Advertisements
Similar presentations
Copyright © 2010 Pearson Education, Inc. Slide The correlation between two scores X and Y equals 0.8. If both the X scores and the Y scores are converted.
Advertisements

Chapter 8 Linear Regression
Linear Regression.  The following is a scatterplot of total fat versus protein for 30 items on the Burger King menu:  The model won’t be perfect, regardless.
Chapter 8 Linear regression
Chapter 8 Linear regression
Linear Regression Copyright © 2010, 2007, 2004 Pearson Education, Inc.
Copyright © 2010 Pearson Education, Inc. Chapter 8 Linear Regression.
Residuals Revisited.   The linear model we are using assumes that the relationship between the two variables is a perfect straight line.  The residuals.
Chapter 8 Linear Regression.
Extrapolation: Reaching Beyond the Data
Correlation and Linear Regression
Warm up Use calculator to find r,, a, b. Chapter 8 LSRL-Least Squares Regression Line.
Copyright © 2009 Pearson Education, Inc. Chapter 8 Linear Regression.
Chapter 8 Linear Regression © 2010 Pearson Education 1.
Statistics Residuals and Regression. Warm-up In northern cities roads are salted to keep ice from freezing on the roadways between 0 and -9.5 ° C. Suppose.
Copyright © 2010, 2007, 2004 Pearson Education, Inc. Chapter 8 Linear Regression.
Chapter 7 Linear Regression.
Regression Wisdom.
Chapter 13 Introduction to Linear Regression and Correlation Analysis
Chapter 8: Linear Regression
AP Statistics Chapter 8: Linear Regression
Chapter 8: Linear Regression
Chapter 5 Regression. Chapter 51 u Objective: To quantify the linear relationship between an explanatory variable (x) and response variable (y). u We.
Chapter 5 Regression. Chapter outline The least-squares regression line Facts about least-squares regression Residuals Influential observations Cautions.
Introduction to Linear Regression and Correlation Analysis
Chapter 151 Describing Relationships: Regression, Prediction, and Causation.
 The equation used to calculate Cab Fare is y = 0.75x where y is the cost and x is the number of miles traveled. 1. What is the slope in this equation?
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 8 Linear Regression.
Copyright © 2014, 2011 Pearson Education, Inc. 1 Chapter 19 Linear Patterns.
Objective: Understanding and using linear regression Answer the following questions: (c) If one house is larger in size than another, do you think it affects.
Relationships If we are doing a study which involves more than one variable, how can we tell if there is a relationship between two (or more) of the.
Copyright © 2010, 2007, 2004 Pearson Education, Inc. Chapter 8 Linear Regression.
Chapter 8 Linear Regression *The Linear Model *Residuals *Best Fit Line *Correlation and the Line *Predicated Values *Regression.
Chapter 8 Linear Regression. Slide 8- 2 Fat Versus Protein: An Example The following is a scatterplot of total fat versus protein for 30 items on the.
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 8 Linear Regression (3)
Chapter 8 Linear Regression
Examining Bivariate Data Unit 3 – Statistics. Some Vocabulary Response aka Dependent Variable –Measures an outcome of a study Explanatory aka Independent.
CHAPTER 5 Regression BPS - 5TH ED.CHAPTER 5 1. PREDICTION VIA REGRESSION LINE NUMBER OF NEW BIRDS AND PERCENT RETURNING BPS - 5TH ED.CHAPTER 5 2.
 Find the Least Squares Regression Line and interpret its slope, y-intercept, and the coefficients of correlation and determination  Justify the regression.
1 Association  Variables –Response – an outcome variable whose values exhibit variability. –Explanatory – a variable that we use to try to explain the.
Chapter 8 Linear Regression HOW CAN A MODEL BE CREATED WHICH REPRESENTS THE LINEAR RELATIONSHIP BETWEEN TWO QUANTITATIVE VARIABLES?
Chapter 8 Linear Regression. Objectives & Learning Goals Understand Linear Regression (linear modeling): Create and interpret a linear regression model.
CHAPTER 8 Linear Regression. Residuals Slide  The model won’t be perfect, regardless of the line we draw.  Some points will be above the line.
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Slide 8- 1.
LEAST-SQUARES REGRESSION 3.2 Least Squares Regression Line and Residuals.
Chapter 8 Linear Regression. Fat Versus Protein: An Example 30 items on the Burger King menu:
Linear Regression Chapter 8. Fat Versus Protein: An Example The following is a scatterplot of total fat versus protein for 30 items on the Burger King.
Chapter 5 Lesson 5.2 Summarizing Bivariate Data 5.2: LSRL.
Copyright © 2010 Pearson Education, Inc. Chapter 8 Linear Regression.
Copyright © 2009 Pearson Education, Inc. Chapter 8 Linear Regression.
1-1 Copyright © 2015, 2010, 2007 Pearson Education, Inc. Chapter 7, Slide 1 Chapter 7 Linear Regression.
Statistics 8 Linear Regression. Fat Versus Protein: An Example The following is a scatterplot of total fat versus protein for 30 items on the Burger King.
Honors Statistics Chapter 8 Linear Regression. Objectives: Linear model Predicted value Residuals Least squares Regression to the mean Regression line.
Part II Exploring Relationships Between Variables.
AP Statistics Chapter 8 Linear Regression. Objectives: Linear model Predicted value Residuals Least squares Regression to the mean Regression line Line.
Training Activity 4 (part 2)
Finding the Best Fit Line
Chapter 8 Linear Regression.
Chapter 7 Linear Regression.
Chapter 8 Linear Regression Copyright © 2010 Pearson Education, Inc.
Chapter 8 Part 2 Linear Regression
Unit 4 Vocabulary.
Least-Squares Regression
M248: Analyzing data Block D UNIT D2 Regression.
Chapter 8 Part 1 Linear Regression
Chi-square Test for Goodness of Fit (GOF)
Least-Squares Regression
CHAPTER 3 Describing Relationships
Algebra Review The equation of a straight line y = mx + b
Presentation transcript:

CHAPTER 8: LINEAR REGRESSION Carlos Perez Nathan Fox 1

THE LINEAR MODEL We can say more about the linear relationship between two quantitative variables with a model. The linear model is just an equation of a straight line through the data. The linear model can be used to summarize the data or as a “line of best fit”. Slide 8- 2

RESIDUALS The model won’t be perfect, regardless of the line we draw. Some points will be above the line and some will be below. The estimate made from a model is the predicted value (denoted as ). The difference between the observed value and its associated predicted value is called the residual. A negative residual means the predicted value’s too big (an overestimate). A positive residual means the predicted value’s too small (an underestimate). Slide 8- 3

“BEST FIT” MEANS LEAST SQUARES Some residuals are positive, others are negative, and, on average, they cancel each other out. The line of best fit is the line for which the sum of the squared residuals is smallest. The slope (b1) can be found using the equation: The intercept(b0) can be found using the equation: Slide 8- 4

CORRELATION AND THE LINE Moving one standard deviation away from the mean in x moves us r standard deviations away from the mean in y. Since r cannot be bigger than 1 (in absolute value), each predicted y tends to be closer to its mean (in standard deviations) than its corresponding x was. This property of the linear model is called regression to the mean; the line is called the regression line. A positive slope (b1) means that there is a positive correlation in the data, and a negative slope indicates negative correlation. Slide 8- 5

RESIDUALS REVISITED Residuals help us to see whether the model makes sense. When a regression model is appropriate, nothing interesting should be left behind. A residual plot with a pattern means there is no correlation in the data. Slide 8- 6

R2—THE VARIATION ACCOUNTED FOR (CONT.) The variation in the residuals is the key to assessing how well the model fits. The squared correlation, r2, gives the fraction of the data’s variance accounted for by the model. Thus, 1– r2 is the fraction of the original variance left in the residuals. All regression analyses include this statistic, although by tradition, it is written R2. If R2 = 0 then none of the variance is in the data. R2 is always between 0% and 100%. What makes a “good” R2 value depends on the kind of data you are analyzing and on what you want to do with it. Along with the slope and intercept for a regression, you should always report R2 so that readers can judge for themselves how successful the regression is at fitting the data. Slide 8- 7

ASSUMPTIONS AND CONDITIONS Quantitative Variables Condition: Regression can only be done on two quantitative variables, so make sure to check this condition. Straight Enough Condition: The linear model assumes that the relationship between the variables is linear. A scatterplot will let you check that the assumption is reasonable. You can’t use a linear model for any two variables, even if they are related. They must have a linear association or the model won’t mean a thing. Outlier Condition: Watch out for outliers. Outlying points can dramatically change a regression model. Outliers can even change the sign of the slope, misleading us about the underlying relationship between the variables. Slide 8- 8

WHAT CAN GO WRONG? Don’t fit a straight line to a nonlinear relationship. Beware extraordinary points (y-values that stand off from the linear pattern or extreme x-values). Don’t extrapolate beyond the data—the linear model may no longer hold outside of the range of the data. Don’t infer that x causes y just because there is a good linear model for their relationship— association is not causation. Don’t choose a model based on R2 alone. Slide 8- 9

WHAT HAVE WE LEARNED? When the relationship between two quantitative variables is fairly straight, a linear model can help summarize that relationship. The regression line doesn’t pass through all the points, but it is the best compromise in the sense that it has the smallest sum of squared residuals. The slope of the line is based on the correlation, adjusted for the units of x and y. For each SD in x that we are away from the x mean, we expect to be r SDs in y away from the y mean. Since r is always between -1 and +1, each predicted y is fewer SDs away from its mean than the corresponding x was (regression to the mean). R2 gives us the fraction of the response accounted for by the regression model. Slide 8- 10

HOMEWORK PROBLEMS 11. The regression of price on size of homes in Albuquerque had R² = 71.4%, as described in Exercise 7. What is the correlation between size and price? .845 What would you predict about the price of a home one standard deviation above average in size? The price should .845 standard deviations above the average price. What would you predict about the price of a home two standard deviations below average in size? The price should be 1.69 standard deviations above the average price. Slide 8- 11

HOMEWORK PROBLEMS 13. Consider the Albuquerque home sales from Exercise 7 again. The regression analysis gives the model: price = 47.82 + 0.061(size). Explain what the slope of the line says about housing prices and house size. A positive slope indicates positive correlation, meaning as x increases y also increases. So, every square-foot increase in size increases the average price. What price would you predict for a 3000-square-foot house in this market. 47.82 + 0.061(3000) 47.82 + 183 = 230.82(1000) = $230,820 A real estate agent shows a potential buyer a 1200-square-foot home, saying that the asking price is $6000 less than what one would expect to pay for a house of this size. What is the asking price, and what is the $6000 called? 47.82 + 0.061(1200) 47.82+73.2 = 121.02(1000) 121,020 - 6,000 = $115,020 The $6000 is called the residual. Slide 8- 12