section 9.2
DESCRIPTION
Section 9.2. Linear Regression. Section 9.2 Objectives. Find the equation of a regression line Predict y -values using a regression equation. Regression lines. - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: Section 9.2](https://reader035.vdocuments.net/reader035/viewer/2022062422/568139d9550346895da18e8a/html5/thumbnails/1.jpg)
Linear Regression
1
Section 9.2
![Page 2: Section 9.2](https://reader035.vdocuments.net/reader035/viewer/2022062422/568139d9550346895da18e8a/html5/thumbnails/2.jpg)
Section 9.2 Objectives
2
Find the equation of a regression linePredict y-values using a regression
equation
![Page 3: Section 9.2](https://reader035.vdocuments.net/reader035/viewer/2022062422/568139d9550346895da18e8a/html5/thumbnails/3.jpg)
Regression lines
3
After verifying that the linear correlation between two variables is significant, next we determine the equation of the line that best models the data (regression line).
Can be used to predict the value of y for a given value of x.
x
y
![Page 4: Section 9.2](https://reader035.vdocuments.net/reader035/viewer/2022062422/568139d9550346895da18e8a/html5/thumbnails/4.jpg)
Residuals
4
ResidualThe difference between the observed y-value
and the predicted y-value for a given x-value on the line.
For a given x-value,
di = (observed y-value) – (predicted y-value)
x
y
}d1
}d
2
d3
{
d4{ }d
5
d6{
Predicted y-value
Observed y-value
![Page 5: Section 9.2](https://reader035.vdocuments.net/reader035/viewer/2022062422/568139d9550346895da18e8a/html5/thumbnails/5.jpg)
Regression Line
5
Regression line (line of best fit)The line for which the sum of the squares of
the residuals is a minimum. The equation of a regression line for an
independent variable x and a dependent variable y is
ŷ = mx + b
Predicted y-value for a given x-value
Slope
y-intercept
![Page 6: Section 9.2](https://reader035.vdocuments.net/reader035/viewer/2022062422/568139d9550346895da18e8a/html5/thumbnails/6.jpg)
The Equation of a Regression Line
6
ŷ = mx + b where
is the mean of the y-values in the data is the mean of the x-values in the dataThe regression line always passes through
the point
22
n xy x ym
n x x
y xb y mx mn n
yx
,x y
![Page 7: Section 9.2](https://reader035.vdocuments.net/reader035/viewer/2022062422/568139d9550346895da18e8a/html5/thumbnails/7.jpg)
Example: Finding the Equation of a Regression Line
7
Find the equation of the regression line for the advertising expenditures and company sales data.
Advertisingexpenses,($1000), x
Companysales
($1000), y2.4 2251.6 1842.0 2202.6 2401.4 1801.6 1842.0 1862.2 215
![Page 8: Section 9.2](https://reader035.vdocuments.net/reader035/viewer/2022062422/568139d9550346895da18e8a/html5/thumbnails/8.jpg)
Solution: Finding the Equation of a Regression Line
8
x y xy x2 y2
2.4 2251.6 1842.0 2202.6 2401.4 1801.6 1842.0 1862.2 215
540294.4440624252
294.4372473
5.762.56
46.761.962.56
44.84
50,62533,85648,40057,60032,40033,85634,59646,225
Σx = 15.8 Σy = 1634 Σxy = 3289.8 Σx2 = 32.44 Σy2 = 337,558
Recall from section 9.1:
![Page 9: Section 9.2](https://reader035.vdocuments.net/reader035/viewer/2022062422/568139d9550346895da18e8a/html5/thumbnails/9.jpg)
Solution: Finding the Equation of a Regression Line
9
Σx = 15.8 Σy = 1634 Σxy = 3289.8 Σx2 = 32.44 Σy2 = 337,558
22
n xy x ym
n x x
b y mx
28(3289.8) (15.8)(1634)
8(32.44) 15.8
501.2 50.728749.88
1634 15.8(50.72874)8 8
204.25 (50.72874)(1.975) 104.0607
ˆ 50.729 104.061y x Equation of the regression line
![Page 10: Section 9.2](https://reader035.vdocuments.net/reader035/viewer/2022062422/568139d9550346895da18e8a/html5/thumbnails/10.jpg)
Solution: Finding the Equation of a Regression Line
10
To sketch the regression line, use any two x-values within the range of the data and calculate the corresponding y-values from the regression line.
ˆ 50.729 104.061y x
x
Advertising expenses
(in thousands of dollars)
Com
pan
y s
ale
s(i
n t
hou
san
ds
of
dolla
rs)
y
![Page 11: Section 9.2](https://reader035.vdocuments.net/reader035/viewer/2022062422/568139d9550346895da18e8a/html5/thumbnails/11.jpg)
Example: Using Technology to Find a Regression Equation
11
Use a technology tool to find the equation of the regression line for the Old Faithful data.
Durationx
Time,y
Durationx
Time,y
1.8 56 3.78 79
1.82 58 3.83 85
1.9 62 3.88 80
1.93 56 4.1 89
1.98 57 4.27 90
2.05 57 4.3 89
2.13 60 4.43 89
2.3 57 4.47 86
2.37 61 4.53 89
2.82 73 4.55 86
3.13 76 4.6 92
3.27 77 4.63 91
3.65 77
![Page 12: Section 9.2](https://reader035.vdocuments.net/reader035/viewer/2022062422/568139d9550346895da18e8a/html5/thumbnails/12.jpg)
Solution: Using Technology to Find a Regression Equation
125
50
100
1
![Page 13: Section 9.2](https://reader035.vdocuments.net/reader035/viewer/2022062422/568139d9550346895da18e8a/html5/thumbnails/13.jpg)
Example: Predicting y-Values Using Regression Equations
13
The regression equation for the advertising expenses (in thousands of dollars) and company sales (in thousands of dollars) data is ŷ = 50.729x + 104.061. Use this equation to predict the expected company sales for the following advertising expenses. (Recall from section 9.1 that x and y have a significant linear correlation.)1.1.5 thousand dollars2.1.8 thousand dollars3.2.5 thousand dollars
![Page 14: Section 9.2](https://reader035.vdocuments.net/reader035/viewer/2022062422/568139d9550346895da18e8a/html5/thumbnails/14.jpg)
Solution: Predicting y-Values Using Regression Equations
14
ŷ = 50.729x + 104.061
1. 1.5 thousand dollars
When the advertising expenses are $1500, the company sales are about $180,155.
ŷ =50.729(1.5) + 104.061 ≈ 180.155
2. 1.8 thousand dollars
When the advertising expenses are $1800, the company sales are about $195,373.
ŷ =50.729(1.8) + 104.061 ≈ 195.373
![Page 15: Section 9.2](https://reader035.vdocuments.net/reader035/viewer/2022062422/568139d9550346895da18e8a/html5/thumbnails/15.jpg)
Solution: Predicting y-Values Using Regression Equations
15
3. 2.5 thousand dollars
When the advertising expenses are $2500, the company sales are about $230,884.
ŷ =50.729(2.5) + 104.061 ≈ 230.884
Prediction values are meaningful only for x-values in (or close to) the range of the data. The x-values in the original data set range from 1.4 to 2.6. So, it wouldnot be appropriate to use the regression line to predictcompany sales for advertising expenditures such as 0.5 ($500) or 5.0 ($5000).
![Page 16: Section 9.2](https://reader035.vdocuments.net/reader035/viewer/2022062422/568139d9550346895da18e8a/html5/thumbnails/16.jpg)
Section 9.2 Summary
16
Found the equation of a regression linePredicted y-values using a regression
equation