Section 3.5 The Line of Best Fit
Version: Fall 2007
3.5 The Line of Best Fit
When gathering data in the real world, a plot of the data often reveals a “linear trend,”
but the data don’t fall precisely on a single line. In this case, we seek to ﬁnd a linear
model that approximates the data. Let’s begin by looking at an extended example.
Aditya and Tami are lab partners in Dr. Mills’ physics class. They are hanging
masses from a spring and measuring the resulting stretch in the spring. See
for their data.
(mass in grams)
(stretch in cm)
Aditya and Tami’s data set.
The goal is to ﬁnd a model that describes the data, in both the form of a graph
and of an equation. The ﬁrst step is to plot the data. Recall some of the guidelines
provided in the ﬁrst section of the current chapter.
When plotting real data, we follow these guidelines.
1. You don’t want small graphs. It’s best to scale your graph so that it ﬁlls a full
sheet of graph paper. This will make it much easier to read and interpret the
2. You may have diﬀerent scales on each axis, but once chosen, you must remain
3. You want to choose a scale which facilitates our ﬁrst objective, but which also
makes the data easy to plot.
Aditya and Tami are free to choose the masses which they hang on the spring.
Hence, the mass
is the independent variable. Consequently, we will scale the hori-
zontal axis to accommodate the mass. The distance the spring stretches depends upon
the amount of mass that is hanging from the spring, so the distance stretched
the dependent variable. We will scale the vertical axis to accommodate the distance
On the horizontal axis, we need to ﬁt the masses 10, 20, 30, 40, and 50 grams. To
avoid a smallish graph, we will let every 5 boxes represent 10 grams. On the vertical
axis, we need to ﬁt distances ranging from 6.8 centimeters up to and including 24.2
centimeters. Making each box represent 1 cm gives a nice sized graph and will allow
for easy plotting of our data points, which we’ve done in
Note the linear trend displayed by the data in
(a). It’s not possible to
draw a single line that will pass through every one of the data points, so a linear model
will not exactly “ﬁt” the data. However, the data are “approximately linear,” so let’s
try to draw a line that “nearly ﬁts” the data.
It is not our goal here to try to draw a line that passes through as many data points
as possible. If we do, then we are essentially saying that the points through which