Linear Regression illustrationThe GeoGebra worksheet below illustrates linear regression for six data points. Initially, the data points all lie on a single line, and the regression line goes right through them. It is a standard exercise to find the equation of a line through two points, so there is nothing new here. However, when you click and drag the points, the regression line will change but will always be the "best fit" to the data points.
Here are the commands needed to make this illustration. Enter them one by one in the Input box. Craig L. Zirbel, Created with GeoGebra |