Chapter 12: Problem 30
Least Squares Given \(n\) points \(\left(x_{1}, y_{1}\right),\left(x_{2}, y_{2}\right), \ldots\), \(\left(x_{n}, y_{n}\right)\) in the \(x y\) -plane, we wish to find the line \(y=m x+b\) such that the sum of the squares of the vertical distances from the points to the line is a minimum; that is, we wish to minimize $$ f(m, b)=\sum_{i=1}^{n}\left(y_{i}-m x_{i}-b\right)^{2} $$ (a) Find \(\partial f / \partial m\) and \(\partial f / \partial b\), and set these results equal to zero. Show that this leads to the system of equations $$ \begin{aligned} m \sum_{i=1}^{n} x_{i}^{2}+b \sum_{i=1}^{n} x_{i} &=\sum_{i=1}^{n} x_{i} y_{i} \\\ m \sum_{i=1}^{n} x_{i}+n b &=\sum_{i=1}^{n} y_{i} \end{aligned} $$ (b) Solve this system for \(m\) and \(b\). (c) Use the Second Partials Test (Theorem C) to show that \(f\) is minimized for this choice of \(m\) and \(b\).
Short Answer
Step by step solution
Key Concepts
These are the key concepts you need to understand to accurately answer the question.