regression equation - cape fear community...
TRANSCRIPT
155S10.3o3
1
November 21, 2011
Chapter 10Correlation and Regression
101 Review and Preview102 Correlation103 Regression104 Variation and Prediction Intervals (OMIT)105 Multiple Regression106 Modeling
MAT 155 Statistical AnalysisDr. Claude Moore
Cape Fear Community College
Key ConceptIn part 1 of this section we find the equation of the straight line that best fits the paired sample data. That equation algebraically describes the relationship between two variables. The bestfitting straight line is called a regression line and its equation is called the regression equation.
In part 2, we discuss marginal change, influential points, and residual plots as tools for analyzing correlation and regression results.
Part 1: Basic Concepts of Regression
The regression equation expresses a relationship between x (called the explanatory variable, predictor variable or independent variable) and y (called the response variable or dependent variable).
^
The typical equation of a straight liney = mx + b is expressed in the formy = b0 + b1x, where b0 is the yintercept and b1 is the slope.^
Definitions• Regression EquationGiven a collection of paired data, the regression equation
Regression Line
The graph of the regression equation is called the regression line (or line of best fit, or least squares line).
algebraically describes the relationship between the two variables.
155S10.3o3
2
November 21, 2011
Notation for Regression Equation
yintercept of regression equation
Slope of regression equation
Equation of the regression line
PopulationParameter
SampleStatistic
β0 b0
β1 b1
y = β0 + β1 x y = b0 + b1x
Requirements
1. The sample of paired (x, y) data is a random sample of quantitative data.
2. Visual examination of the scatterplot shows that the points approximate a straightline pattern.
3. Any outliers must be removed if they are known to be errors. Consider the effects of any outliers that are not known errors.
Formulas for b0 and b1
Formula 103 (slope)
(yintercept)Formula 104
calculators or computers can compute these values
Alternate forms to calculate b1 and b0:
The regression line fits the sample points best.
Special Property
Rounding the yintercept b0 and the Slope b1
• Round to three significant digits.• If you use the formulas 103 and 104, do not round intermediate values.
155S10.3o3
3
November 21, 2011
Example:
Refer to the sample data given in Table 101 in the Chapter Problem. Use technology to find the equation of the regression line in which the explanatory variable (or x variable) is the cost of a slice of pizza and the response variable (or y variable) is the corresponding cost of a subway fare.
Example:
Requirements are satisfied: simple random sample; scatterplot approximates a straight line; no outliers Here are results from four different technologies technologies
Example:
All of these technologies show that the regression equation can be expressed asy = 0.0346 +0.945x, where y is the predicted cost of a subway fare and x is the cost of a slice of pizza.We should know that the regression equation is an estimate of the true regression equation. This estimate is based on one particular set of sample data, but another sample drawn from the same population would probably lead to a slightly different equation.
^ ^
Example:
Graph the regression equation
(from the preceding Example) on the scatterplot of the pizza/subway fare data and examine the graph to subjectively determine how well the regression line fits the data.
On the next slide is the Minitab display of the scatterplot with the graph of the regression line included. We can see that the regression line fits the data quite well.
155S10.3o3
4
November 21, 2011
Example:
1. Use the regression equation for predictions only if the graph of the regression line on the scatterplot confirms that the regression line fits the points reasonably well.
Using the Regression Equation for Predictions
2. Use the regression equation for predictions only if the linear correlation coefficient r indicates that there is a linear correlation between the two variables (as described in Section 102).
3. Use the regression line for predictions only if the data do not go much beyond the scope of the available sample data. (Predicting too far beyond the scope of the available sample data is called extrapolation, and it could result in bad predictions.)
Using the Regression Equation for Predictions
4. If the regression equation does not appear to be useful for making predictions, the best predicted value of a variable is its point estimate, which is its sample mean.
Strategy for Predicting Values of Y
155S10.3o3
5
November 21, 2011
If the regression equation is not a good model, the best predicted value of y is simply y, the mean of the y values.
Remember, this strategy applies to linear patterns of points in a scatterplot.
If the scatterplot shows a pattern that is not a straightline pattern, other methods apply, as described in Section 106.
Using the Regression Equation for Predictions
Part 2: Beyond the Basics of Regression
Definitions
In working with two variables related by a regression equation, the marginal change in a variable is the amount that it changes when the other variable changes by exactly one unit. The slope b1 in the regression equation represents the marginal change in y that occurs when x changes by one unit.
Definitions
In a scatterplot, an outlier is a point lying far away from the other data points.
Paired sample data may include one or more influential points, which are points that strongly affect the graph of the regression line.
155S10.3o3
6
November 21, 2011
Example:Consider the pizza subway fare data from the Chapter Problem. The scatterplot located to the left on the next slide shows the regression line. If we include this additional pair of data: x = 2.00,y = –20.00 (pizza is still $2.00 per slice, but the subway fare is $–20.00 which means that people are paid $20 to ride the subway), this additional point would be an influential point because the graph of the regression line would change considerably, as shown by the regression line located to the right.
Example:
Example:Compare the two graphs and you will see clearly that the addition of that one pair of values has a very dramatic effect on the regression line, so that additional point is an influential point. The additional point is also an outlier because it is far from the other points.
For a pair of sample x and y values, the residual is the difference between the observed sample value of y and the yvalue that is predicted by using the regression equation. That is,
Definition
residual = observed y – predicted y = y – y
155S10.3o3
7
November 21, 2011
ResidualsA straight line satisfies the leastsquares property if the sum of the squares of the residuals is the smallest sum possible.
Definitions
A residual plot is a scatterplot of the (x, y) values after each of the ycoordinate values has been replaced by the residual value y – y (where y denotes the predicted value of y). That is, a residual plot is a graph of the points (x, y – y).
^
^
^
Residual Plot AnalysisWhen analyzing a residual plot, look for a pattern in the way the points are configured, and use these criteria:
The residual plot should not have an obvious pattern that is not a straightline pattern.
The residual plot should not become thicker (or thinner) when viewed from left to right.
Residuals Plot Pizza/Subway
155S10.3o3
8
November 21, 2011
Residual Plots Residual Plots
Residual Plots Complete Regression Analysis1. Construct a scatterplot and verify that the pattern of the points is approximately a straightline pattern without outliers. (If there are outliers, consider their effects by comparing results that include the outliers to results that exclude the outliers.)
2. Construct a residual plot and verify that there is no pattern (other than a straightline pattern) and also verify that the residual plot does not become thicker (or thinner).
3. Use a histogram and/or normal quantile plot to confirm that the values of the residuals have a distribution that is approximately normal.
4. Consider any effects of a pattern over time.
155S10.3o3
9
November 21, 2011
RecapIn this section we have discussed:• The basic concepts of regression.• Rounding rules.• Using the regression equation for predictions.• Interpreting the regression equation.• Outliers• Residuals and leastsquares.• Residual plots.
Making Predictions. In Exercises 5–8, use the given data to find the best predicted value of the response variable. Be sure to follow the prediction procedure summarized in Figure 105. (p. 544)551/6. Heights of Mothers and Daughters A sample of eight mother daughter pairs of subjects was obtained, and their heights (in inches) were measured. The linear correlation coefficient is 0.693 and the regression equation is y = 69.0 0.0849x, where x represents the height of the mother (based on data from the National Health Examination Survey). The mean height of the mothers is 63.1 in. and the mean height of the daughters is 63.3 in. Find the best predicted height of a daughter given that the mother has a height of 60 in.
^
Making Predictions. In Exercises 5–8, use the given data to find the best predicted value of the response variable. Be sure to follow the prediction procedure summarized in Figure 105. (p. 544)552/8. Supermodel Heights and Weights Heights (in inches) and weights (in pounds) are obtained from a random sample of nine supermodels (Alves, Avermann, Hilton, Dyer, Turlington, Hall, Campbell, Mazza, and Hume). The linear correlation coefficient is 0.360 and the equation of the regression line is y = 31.8 + 1.23x, where x represents height. The mean of the nine heights is 69.3 in. and the mean of the nine weights is 117 lb. What is the best predicted weight of a supermodel with a height of 72 in.?
^
Finding the Equation of the Regression Line and Making Predictions. Exercises 13–28 use the same data sets as Exercises 13–28 in Section 102. In each case, find the regression equation, letting the first variable be the predictor (x) variable. Find the indicated predicted value by following the prediction procedure summarized in Figure 105.552/14. CPI and Subway Fare Find the best predicted cost of subway fare when the Consumer Price Index (CPI) is 182.5 (in the year 2000).CPI 30.2 48.3 112.3 162.2 191.9 197.8 (S102D)Subway Fare 0.15 0.35 1.00 1.35 1.50 2.00 (S102E)
155S10.3o3
10
November 21, 2011
Finding the Equation of the Regression Line and Making Predictions. Exercises 13–28 use the same data sets as Exercises 13–28 in Section 102. In each case, find the regression equation, letting the first variable be the predictor (x) variable. Find the indicated predicted value by following the prediction procedure summarized in Figure 105.553/16. Heights of Presidents and RunnersUp Find the best predicted height of runnerup Goldwater, given that the height of the winning presidential candidate Johnson is 75 in. Is the predicted height of Goldwater close to his actual height of 72 in.? (S102F; S102G)Winner 69.5 73 73 74 74.5 74.5 71 71 RunnerUp 72 69.5 70 68 74 74 73 76
Finding the Equation of the Regression Line and Making Predictions. Exercises 13–28 use the same data sets as Exercises 13–28 in Section 102. In each case, find the regression equation, letting the first variable be the predictor (x) variable. Find the indicated predicted value by following the prediction procedure summarized in Figure 105.553/20. Commuters and Parking Spaces The MetroNorth Station of Greenwich, CT has 2804 commuters. Find the best predicted number of parking spots at that station. Is the predicted value close to the actual value of 1274? (S102H; S102I)Commuters 3453 1350 1126 3120 2641 277 579 2532 Parking Spots 1653 676 294 950 1216 179 466 1454
Finding the Equation of the Regression Line and Making Predictions. Exercises 13–28 use the same data sets as Exercises 13–28 in Section 102. In each case, find the regression equation, letting the first variable be the predictor (x) variable. Find the indicated predicted value by following the prediction procedure summarized in Figure 105.553/22. New Car Mileage Ratings Find the best predicted new mileage rating of a Jeep Grand Cherokee given that the old rating is 19 mi/gal. Is the predicted value close to the actual value of 17 mi/gal? (S102J; S102K)Old (X) 16 27 17 33 28 24 18 22 20 29 21 New (Y) 15 24 15 29 25 22 16 20 18 26 19
Finding the Equation of the Regression Line and Making Predictions. Exercises 13–28 use the same data sets as Exercises 13–28 in Section 102. In each case, find the regression equation, letting the first variable be the predictor (x) variable. Find the indicated predicted value by following the prediction procedure summarized in Figure 105.554/24. Costs of Televisions Find the best predicted quality score of a Hitachi television with a price of $ 1900. Is the predicted quality score close to the actual quality score of 56? (S102L; S102M)Price 2300 1800 2500 2700 2000 1700 1500 2700 Quality Score 74 73 70 66 63 62 52 68
155S10.3o3
11
November 21, 2011
Finding the Equation of the Regression Line and Making Predictions. Exercises 13–28 use the same data sets as Exercises 13–28 in Section 102. In each case, find the regression equation, letting the first variable be the predictor (x) variable. Find the indicated predicted value by following the prediction procedure summarized in Figure 105.554/26. Crickets and Temperature Find the best predicted temperature (in °F) at a time when a cricket chirps 3000 times in one minute. What is wrong with this predicted value? (S102N; S102O)Chirps in 1 min 882 1188 1104 864 1200 1032 960 900 Temperature (°F) 69.7 93.3 84.3 76.3 88.6 82.6 71.6 79.6
Since x = 3000 is so far outside the limits of the actual xvalues, it would not be realistic to use the equation to predict the temperature when there are 3000 chirps per minute.