# Science:Math Exam Resources/Courses/MATH152/April 2012/Question 05 (a)

MATH152 April 2012
Other MATH152 Exams

### Question 05 (a)

You wish to fit the line y(x)=ax+b to the data points

${\displaystyle (x_{1},y_{1})=(2,2),\quad (x_{2},y_{2})=(3,4),\quad (x_{3},y_{3})=(5,6).}$

Write down the normal equations (check formula sheet if you do not remember) for the least squares approximation of the parameter vector ${\displaystyle \mathbf {x} ={\begin{bmatrix}a\\b\end{bmatrix}}}$ to the data. Then, write down the augmented matrix that corresponds to these equations one would use to compute the least squares approximation of a,b (but you don't need to compute a,b). Describe the least squares projection as a projection in three space onto a plane; specifically which vector is being projected onto which plane.

Formula sheet

The least squares best solutionto ${\displaystyle B{\vec {x}}={\vec {c}}}$ is given by the normal equations${\displaystyle B^{T}B{\vec {x}}=B^{T}{\vec {c}}}$.

 Make sure you understand the problem fully: What is the question asking you to do? Are there specific conditions or constraints that you should take note of? How will you know if your answer is correct from your work only? Can you rephrase the question in your own words in a way that makes sense to you? If you are stuck, check the hint below. Consider it for a while. Does it give you a new idea on how to approach the problem? If so, try it!

 Checking a solution serves two purposes: helping you if, after having used the hint, you still are stuck on the problem; or if you have solved the problem and would like to check your work. If you are stuck on a problem: Read the solution slowly and as soon as you feel you could finish the problem on your own, hide it and work on the problem. Come back later to the solution if you are stuck or if you want to check your work. If you want to check your work: Don't only focus on the answer, problems are mostly marked for the work you do, make sure you understand all the steps that were required to complete the problem and see if you made mistakes or forgot some aspects. Your goal is to check that your mental process was correct, not only the result.