Least-Squares Line

Pronunciation: /list skwɛərz laɪn/ Explain

A least-square line is a line that minimizes the distance between the data points it represents and the line itself. Manipulative 1 is an example of a least squares line fitted to data.

Click on the blue points and drag them to change the figure.

Move the points to create a near-vertical line. Move the points to create a near-horizontal line.
Manipulative 1 - Least Squares Line Created with GeoGebra.

How to Calculate a Least Squares Line

In the equations, N is the number of points. x is the x-coordinate of a point. y is the y-coordinate of a point. All calculated amounts are approximate.

Legendxyx2xy
A0.31.80.090.54
B0.82.20.641.76
C1.92.63.614.94
D2.22.14.844.62
E3.32.910.899.57
F3.92.515.219.75
Sum12.414.135.2831.18

m=(n*sum(xy)-sum(x)*sum(y))/(n*sum(x squared)-(sum(x) squared)) = (6*31.18-12.4*14.1)/(5*35.28)-12.4 squared)=(187.08-174.84)/(176.4-153.76)=12.24/22.64=0.54
b=(sum(y)-msum(x))/n=(14.1-0.54*12.4)/6=(14.1-6.696)/6=7.404/6=1.234
y=mx + b implies y=0.54x + 1.234

References

  1. McAdams, David E.. All Math Words Dictionary, least-squares line. 2nd Classroom edition 20150108-4799968. pg 107. Life is a Story Problem LLC. January 8, 2015. Buy the book

Cite this article as:

McAdams, David E. Least-Squares Line. 12/21/2018. All Math Words Encyclopedia. Life is a Story Problem LLC. http://www.allmathwords.org/en/l/leastsquareline.html.

Image Credits

Revision History

12/21/2018: Reviewed and corrected IPA pronunication. (McAdams, David E.)
8/31/2018: Removed broken links, updated license, implemented new markup, implemented new Geogebra protocol. (McAdams, David E.)
7/18/2018: Changed title to common format. (McAdams, David E.)
7/12/2007: Initial version. (McAdams, David E.)

All Math Words Encyclopedia is a service of Life is a Story Problem LLC.
Copyright © 2018 Life is a Story Problem LLC. All rights reserved.
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License