The classical problem of "fitting" a curve to a set of data is as follows: given a set of N data points (x j , y j ) j = l,..., N, find a value for "m" (slope) and "b" (Y-intercept) such that the curve y = mx+b "best" fits the data. If each of the N data points lies on the curve y = mx+b (i.e. y = mx j +b = y j j = l,..., N), there is no "error". Otherwise, an "error" is introduced (by choosing m and b) when y = mx j +b does not equal y j . Thus "m" and "b" must be chosen such that the sum of errors in estimation or prediction (using the curve y = mx+b) is minimized.
/lp/association-for-computing-machinery/curve-fitting-with-linear-programming-HylLvHM7dg