6-2 Linear Regression

This program demonstrates linear regression. Given n data points, it uses the least squares algorithm to generate and plot a regression line among the points.

To run the demo:

  1. Click the mouse in the graph panel to set from 2 up to 100 data points.
  2. Click the Regression line button to plot the regression line.
  3. You can add more data points and click the Regression line button again.
  4. Click the Reset button to start over.

The original Java Applets do not run in modern browsers, but you can download the Java code and run it locally on your desktop. Check back for JavaScript and Python versions - coming soon!


Download Demos in Java