Computer Science I / Complex Numbers
Practice question · Multiple choice

Least-squares fitting minimises the sum of SQUARED residuals rather than the sum of absolute ones. What does squaring change, and what does it cost?

Hints
  1. A residual of 10 versus one of 1. How much more does each contribute under the two objectives?
  2. Ask which objective can be minimised by setting a derivative to zero.
Show the answer

A. It gives a closed-form solution, at the cost of weighting outliers heavily.

Why

Squaring buys a smooth convex objective solvable in closed form through the normal equations, where absolute error has a corner at zero and needs iteration. The cost is sensitivity: a residual of 10 contributes 100, so the fit works disproportionately hard on large errors. Absolute values also prevent cancellation, so that is not what distinguishes them, the trade is exactness against robustness.

Read the lesson: Complex Numbers →

Practise Complex Numbers

The app has 6 more questions on this lesson, and keeps your place in the course. Computer Science I is free to start.

More questions on Complex Numbers