(b) MATH 261, Spring 2001 Due Date: Name(s): Honors Project 20: Least Squares In many science and engineering applications, one is often given a set of data points {(xi, yi), i = 1, ..., N} in R2 , and interested in finding the line which "best fits this data" (see Fig. (a) below). One solution to this problem is provided by classical least squares: finding the line for which the sum of the squares of the distances di from the data points to the line in the direction of the dependent axis is a minimum (see Fig. (b) below). As an application of optimization of functions of two variables -- specifically, finding the m and b that minimize the error term )i = 1N (yi - (mxi + b))2 , -- it follows that the line y = mx+b which best approximates the data in the sense of classical least squares is given by m = N xiyi - ( xi) ( yi) N x2 i - ( xi) 2 and b = ( yi) x2 i - ( xi) ( xiyi) N x2 i - ( xi) 2 . Tasks 1. Verify the above formulas. 2. Devise a procedure for finding the plane whose equation is of the form z = ax+by+c which "best fits" the data {(xi, yi, zi), i = 1, ..., N} in R3 . In the end you should arrive at a system of linear equations that need to be solved. You do not have to solve this system here, however. Indeed, to do Task 3 below you can use Maples solve command. 3. Apply the procedure you developed above to the following data set: xi 0.9 1.1 1.2 1.4 2.3 2.9 3.5 3.6 4.1 4.8 yi 1.2 3.6 3.5 2.4 2.2 0.6 1.6 4.3 1.5 2.7 zi 10.8 19.2 18.9 15.4 15.8 11.1 15.2 24.5 15.6 20.5 4. Without going through any analysis, what system of linear equations would you guess you would have to solve to find the hyperplane whose equations is w = ax + by + cz + d which "best fits" the data {(xi, yi, zi, wi), i = 1, ..., N} in R4 .