home AS/A2 s1 AS/A2
Stats 2
Stats 3
S1 Topic 4: Correlation and regression
The y on x line backmore
Change the positions of the 8 points. Now move the red line by moving points A and B. The heights of the points above (or below) the line are called the residuals. They represent the error in trying to fit the line to the data. The total of these errors is shown by the blue arrow at the bottom. The x values are referred to as the explanatory (or independent) variables and the y values as the response (or dependent) variables.

Move point A. Now move point B so that the blue arrow becomes as small as possible. Can you always do this regardless of where A is positioned? What happens if you start by moving B and then move A to minimise the blue line?
Please enable Java for an interactive construction (with Cinderella).

Summary
You should find that the total of the errors or residuals can always be made zero, for any starting position of either A or B. So there is not one unique line that minimises the sum of the residuals. It is for this reason that statisticians use the square of the residual instead.
Cinderella interactive graphs Uses Cinderella interactive geometry.