LineOfBestFit_2
Download
Report
Transcript LineOfBestFit_2
Regression Lines
Today’s Aim:
To learn the method
for calculating the
most accurate Line of
Best Fit for a set of
data
Make a Scatterplot of the
following data:
X
Y
23
81
25
80
27
90
Lets guess where
the Line of Best
Fit should go
Now we want to
measure the distance
between the actual Y
values for each point
and the predicted Y
value on our possible
Line of Best Fit
Now, lets try with a
different line…
We can also measure
with numbers the vertical
distances between the
Scatterplot points and
the Line of Best Fit
Actual Predicted Difference
y
y
in y
values: values:
values:
1.8
3.6
81
79.1
.9
80
83.6
3.6
6.3
90
88.2
1.8
83.6
.9
3.6
81
.9
79.1
80
90
1.8
88.2
For the first possible
Line of Best Fit, the
sum of the vertical
distances (errors) was
6.3
90
4.8
4.8
85.2
8.2
3
83
.4
81
79.6
3
.4
80
The sum of the
vertical distances
(errors) on the second
possible line was 8.2.
The correct Line of
Best Fit is called a
Regression Line.
A Regression Line is the
line that makes the sum
of the squares of the
vertical distances
(errors) of the data
points from the line as
small as possible.
To Calculate the Error:
Error = actual y value - predicted y value
Note: If the predicted value is larger than
the actual value, the error will be a
negative number. This is why we square
the errors - to turn them into positive
numbers.
For example…
X
Y
Predicted
Y values
(Line A)
Vertical
Distances
Distances
Squared
(errors)
3
7
7.2
- 0.2
.04
4
9
9.6
- 0.6
.036
7
12
9.5
2.5
6.25
X
Y
Predicted
Y values
(Line B)
3
7
7.5
- 0.5
.25
4
9
9.2
- 0.2
.04
7
12
11.3
.7
.49
SUM:
6.35
Vertical
Distances
Distances
Squared
(errors)
SUM:
.78