8.16 Method of Least Squares
INTRODUCTION
When performing experiments we often tabulate data in the form of ordered pairs (x1, y1), (x2, y2), . . . , (xn, yn), with each xi distinct. Given the data, it is then often desirable to be able to extrapolate or predict y from x by finding a mathematical model, that is, a function that approximates or “fits” the data. In other words, we want a function f(x) such that
f(x1) ≈ y1, f(x2) ≈ y2, . . ., f(xn) ≈ yn.
But naturally we do not want just any function but a function that fits the data as closely as possible.
In the discussion that follows we shall confine our attention to the problem of finding a linear polynomial f(x) = ax + b or straight line that “best fits” the data (x1, y1), (
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access