Linear Least Squares

NOTE: You need to be using a Java-enabled browser to view this applet

Applet Information

In the linear least squares applet, enter x and y data in the text area. A click on "update plot" will plot the data, while a click on "update fit" will display a least-squares line and parameters.

The straight line can be adjusted manually to fit the data by dragging it around: positioning the cursor toward either end of the line will allow that end to move while positioning the cursor toward the middle moves the whole line up and down.

The least-squares fit minimizes the residual standard deviation (based on the sum of the squares of the deviations between the fit and the data). See how well you can do by eye and compare with the least-squares value!

Here is a set of data you can copy and paste into the data area.

Sample Data
10 2.569
20 2.319
31 2.058
40 1.911
50 1.598
100 0.584

Having trouble printing?
Some browsers will not print applets using the Print button. You can take a picture of the window, paste the image into another document, then print the document. See your computer's help utility for information about how to take a picture of the screen.

© 2001 Brian P. Reid