The Curve of Best fit in the Least Squares Sense

266 Views Asked by At

A parabola whose axis the $y$-axis has the equation $y=a+bx^2$. It is desired to find the curve of this form which best fits, in the least squares sense, the points $$(-1,7), (0,1), (1,-3),(2,5).$$ Find the curve which best fits the points.

Attempt:

We form a matrix $\ A\vec x=\vec b$, where $A= \begin{pmatrix} 1 & 1 \\ 1 & 0 \\ 1 & 1 \\ 1 & 4 \\ \end{pmatrix}$, $\ \vec x= \begin{pmatrix} a \\ b \\ \end{pmatrix}$ and $\ \vec b= \begin{pmatrix} 7 \\ 1 \\ -3 \\ 5 \\ \end{pmatrix}$.

Now,the solution to the equation $\ A\vec x=\vec b$ in the least squares sense is $\ A^T A\vec x=A^T\vec b$, where $A^T$ denotes the transpose of $A$. Doing the arithmetic, I get $$ \begin{pmatrix} 4 & 6\\ 6 & 18 \\ \end{pmatrix}\vec x=\begin{pmatrix} 10 \\ 24 \\ \end{pmatrix}$$

Using row-reduction, I get that $a=1$ and $b=1$ and hence the curve of best fit is $y=1+x^2$.

Is this working correct?

1

There are 1 best solutions below

0
On BEST ANSWER

Just to reiterate what was said in the comments so this question doesn't sit in the "Unanswered" queue for years on end, your result is indeed correct. As I'm sure you can tell, a parabola of that form is a terrible fit for those points, but yours is the best possible.