Jump to content

Science:Math Exam Resources/Courses/MATH221/December 2009/Question 09/Solution 1

From UBC Wiki

The coefficients a,b,c of the least squares fit are given by

XTX[abc]=XTy,

where

X=[x10x11x12x20x21x22x30x31x32x40x41x42]=[000102101112202122303132]=[100111124139]

and

y=[y1y2y3y4]=[1056].

Now

XTX=[983614361461464]

and

XTy=[742812].

Solving the resulting linear system, we find that a=12,b=12,c=12, so the least squares fit is y=12+12x+12x2.