2

Consider the following sample: $(x_1, y_1) = (1, 1)$, $(x_2, y_2) = (2, 5)$, $(x_3, y_3) = (3, 8)$, $(x_4, y_4) = (4, 18)$.

  1. How can I write down an optimisation problem that minimises the sum of absolute errors of the simple linear model $y = a + bx$.

  2. Also, is this optimisation problem constrained? Is the objective function differentiable? (Optional: Is the objective function convex?)

For 1) is it going to be just: $$min\sum_{i=1}^{4}|y_i-(a+bx_i)|$$

1 Answers1

0
  1. I would reference this answer for the formula and then note that this is different from least squares because you are minimizing the absolute value. It would be least absolute deviations.

  2. I'd reference this wikipedia article to see how there are potentially multiple solutions to this equation.