Linear regression.
Twelve students wrote down how many hours they studied, then sat the same exam. Each dot is one student. A straight line turns hours into a predicted score, and the error measures how far the line misses.
From Chapter 2: Linear Regression, which explains these figures step by step.
Figure
Every miss, and their average
- Student
- Your line
- Miss (residual)
- Slope w
- 1.00
- Bias b
- 63.0
- Your error (MSE)
- 119.6
- Best possible
- ?
Drag the two orange handles, or focus one and use the arrow keys.
Figure
Squared error chases outliers
- Least squares
- Least absolute error
- Movable student
- Slope before
- 5.31
- Least squares slope
- 5.31
- Least absolute slope
- 5.38
Drag the large dark dot anywhere.