A line of best fit is a straight line that best represents bivariate data on a scatter plot. This line may pass through some of the points, none of the points, or all of the points. Lines of best fit are useful to determine the equation of the line and use the equation to make predictions.
The most common method of fitting a line of best fit to a scatter plot of bivariate data is using the least squares method. This is then called a least squares line of best fit, or sometimes a Least Squares Regression Line.
So what is the Least Squares method?
In a sentence, it is a technique that minimises the sum of the squares of the vertical distance from each data point to a straight line. Perhaps an easier way to understand it is through a demonstration.
Experiment with this Geogebra applet.
|
The equation of a least squares line of best fit is the same as the equation of a straight line, but is usually presented in a different form. You may recall the equation of a straight line as
$y=mx+c$y=mx+c
or
$y=ax+b$y=ax+b
However, a least squares line is usually written as,
$y=a+bx$y=a+bx
or
$RV=a+b\times EV$RV=a+b×EV
where RV stands for the Response variable and EV stands for the Explanatory variable
Plotting a least squares line on a graph is the same as plotting the graph of a straight line and finding the equation of a least squares line from a graph is the same as finding the equation of a straight line from a graph.
The table shows the number of people who went to watch a movie $x$x weeks after it was released.
Weeks ($x$x) | $1$1 | $2$2 | $3$3 | $4$4 | $5$5 | $6$6 | $7$7 |
Number of people ($y$y) | $17$17 | $17$17 | $13$13 | $13$13 | $9$9 | $9$9 | $5$5 |
Plot the points from the table.
If a line of best fit were drawn to approximate the relationship, which of the following could be its equation?
$y=-2x+20$y=−2x+20
$y=2x+20$y=2x+20
$y=-2x$y=−2x
$y=2x$y=2x
Graph the line of best fit whose equation is given by $y=-2x+20$y=−2x+20.
Use the equation of the line of best fit to find the number of people who went to watch the movie $10$10 weeks after it was released.
Most of the time, you will be required to calculate the equation of the Least Squares Regression Line using technology.
Here's a video on how to use the TI-Nspire to create a scatter graph and calculate the equation of the Least Squares Regression Line.