This is a prototype of Java Sketchpad, a World-Wide-Web component of The Geometer's Sketchpad. Copyright ©1990-1997 by Key Curriculum Press, Inc. All rights reserved. Portions of this work are being funded by the National Science Foundation (awards DMI 9561674 & 9623018 ).


Linear Regression

The Least Squares regression line for a set of data points is the line that "best fits" the data. To be more precise, it is the line that minimizes the sum of the squares of the vertical distances from the points to the line. The plot below shows a graphical representation of the least squares regression line. Points P1 through P6 below represent data points. A line is drawn through the points, and from each data point to the line a square is constructed. The large square has the same area as the sum of all the smaller squares, and it represents how well the line fits the data.

INSTRUCTIONS

In the figure below, you can move any point by using your left mouse button to click down and hold while dragging. Change the y-intercept and slope of the line so that the sum of the areas of the squares is minimized.

Sorry, this page requires a Java-compatible web browser.

The values for the slope a and y-intercept b can be found by using the TI-83 graphing calculator.

The resulting equation y = ax + b is the least squares regression line. Your TI calculator will compute and graph the least squares regression line for a set of data points!

Click here to go to the linear regression lab.