Ron Mak @ Apropos Logic

ron@apropos-logic.com
Publications and books by Ronald Mak

Java Number Cruncher

Program 10-2

Polynomial Regression

This applet demonstrates polynomial regression. It uses the least squares algorithm to plot a regression polynomial of degree 1 through 9 among n data points, where n is at least one more than the degree.

To run the demo:

  1. Choose a degree for the regression polynomial.
  2. Click the mouse in the graph panel to set up to 100 data points, but at least one more than the degree.
  3. Click the Regression poly button to plot the regression polynomial.
  4. You can add more data points and click the Regression poly button again.
  5. You can choose a different polynomial order and then click the Regression poly button to plot a new regression polynomial among the same points.
  6. Click the Reset button to start over.

If the applet fails to create a regression function, try adding more points and press the Regression poly button again.