Mark Yourself Question
Show that, in the case that the matrix A‾\AA is invertible, the least squares solution corresponding to the system:
is the same as the solution to the system itself.
In other words, show that the solution to the system:
and the solution to the system:
are the same.
Unlock full course notes by signing up
Practice Question: Least Squares for Polynomials
Find the cubic polynomial which best fits the data points (−2,−1),(−1,1),(0,0),(1,−2),(2,3)(-2,-1),(-1,1),(0,0),(1,-2),(2,3)(−2,−1),(−1,1),(0,0),(1,−2),(2,3) in the least squares sense.
Least Squares for Mix of Quadratic and Linear Functions
Find a least squares approximation of form a+bx+cx2+dya+bx+cx^2+dya+bx+cx2+dy for the following data:
x‾y‾result‾11112−121−3222011\begin{array}{r|r|r}\underline{x}&\underline{y}&\underline{result}\\1&1&1\\1&2&-1\\2&1&-3\\2&2&2\\0&1&1\end{array}x11220y12121result1−1−321
Least Squares
Find a function of the form a0+a1x+a3x3a_0+a_1x+a_3x^3a0+a1x+a3x3 (note there is no squared term) which is a best approximation in the sense of least squares to the following data points: (0,1),(−1,1),(1,2),(−2,1)(0,1),(-1,1),(1,2),(-2,1)(0,1),(−1,1),(1,2),(−2,1) .
Practice: Least Squares Approximation
Find the cubic polynomial which best fits the data points (−2,−1),(−1,1),(0,0),(1,−2),(2,3)(-2,-1),(-1,1),(0,0),(1,-2),(2,3)(−2,−1),(−1,1),(0,0),(1,−2),(2,3).
Example: Least Squares for Linear Functions
Find the equation of the line that comes as close as possible, in the least squares sense, to passing through the points: (0,1),(2,3),(3,4),(4,7)(0,1),(2,3),(3,4),(4,7)(0,1),(2,3),(3,4),(4,7) .
Solution:
Example: Least Squares for non-Polynomials
Find the function of form c1sin(x)+c2cos(x)c_1\sin(x)+c_2\cos(x)c1sin(x)+c2cos(x) which best fits the data points (−π,−3),(0,−4),(π/2,−5)(-\pi,-3),(0,-4),(\pi/2,-5)(−π,−3),(0,−4),(π/2,−5) in the least squares sense.
Find the equation of the line that comes as close as possible to passing through the points: (0,1),(2,3),(3,4),(4,7)(0,1),(2,3),(3,4),(4,7)(0,1),(2,3),(3,4),(4,7).
Example: Least Squares for Polynomials
Find the equation of a quadratic polynomial that comes as close as possible to passing through the points: (1,2),(1,3),(2,3)(1,2),(1,3),(2,3)(1,2),(1,3),(2,3).