Pointwise errors *e*_{i} = *α**x*_{i} + *β* − *y*_{i}

Some freedom in defining overall error E in terms of pointwise errors {*e*_{i}}

We found a formula the line that minimizes the choice *E* = ∑^{n}_{i = 1}*e*^{2}_{i}

argmin_{(α, β) ∈ ℝ2} *E*

Examples of minimizer of *E* = ∑^{n}_{i = 1}|*e*_{i}|

How to find best (*α*, *β*) for other choices?

Random choices of (*α*, *β*)

Grid of points (*α*, *β*) (harder!)

Reference: https://docs.scipy.org/doc/numpy/user/basics.broadcasting.html

Rules

Applications

Reproducibility of random results with numpy.random.seed()

My conjecture: a line containing 2 of the data points is in argmin *E* when
we choose *E* = ∑^{n}_{i = 1}|*e*_{i}|. (If true, this narrows down the possibilities
to a finite set.)

scatter()

Stagger downhill?

A comparative study of several definitions of badness of fit of a linear function to data
{(*x*_{i}, *y*_{i}) ∈ ℝ^{2} : *i* ∈ {1, 2, ..., *n*}}

Looking for best-fit line according to several definitions of error for a variety of data sets (large/small, regular/irregular), and your own personal value judgments based on the examples you present.