Results 1 to 2 of 2

Math Help - Lines of best fit

  1. #1
    Senior Member
    Joined
    Apr 2010
    Posts
    487

    Lines of best fit

    The question

    Find the best fit to the set of points {(0, 1) (1, 1) (2, 2) (4, 3)} in R^2 within the curve y = ax^2 + bx + c

    My attempt
    I used the formula A^TAx = A^Ty, and got the following equation:

    \begin{pmatrix}273 & 73 & 21\\73 & 21 & 7\\21 & 7 & 4\end{pmatrix}\begin{pmatrix}a\\b\\c\end{pmatrix} = \begin{pmatrix}57\\17\\7\end{pmatrix}

    I tried to use Gaussian elimination, and made a massive mess of the matrix. I was far off a correct solution. Is there a trick to getting an answer without grinding through row operations (or, at least, minimising the work)?

    Cheers.
    Follow Math Help Forum on Facebook and Google+

  2. #2
    MHF Contributor

    Joined
    Apr 2005
    Posts
    15,368
    Thanks
    1313

    Re: Lines of best fit

    You might find it simpler to reverse ax^2+ bx+ c to c+ bx+ ax^2 so that your vector is \begin{pmatrix}c \\ b\\ a\end{pmatrix} and reverse the order of the points. that will make A^TA equal to
    \begin{pmatrix}3 & 7 & 21 \\ 7 & 21 & 73 \\  21 & 73 & 273\end{pmatrix} which, at least, lets you start with smaller numbers. (Note the "3" in the upper left. Recheck the calculation that gave you that "4".)
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Lines
    Posted in the Algebra Forum
    Replies: 3
    Last Post: October 3rd 2011, 06:26 PM
  2. Replies: 1
    Last Post: April 17th 2010, 11:52 PM
  3. Replies: 1
    Last Post: March 14th 2010, 01:22 PM
  4. Replies: 2
    Last Post: January 25th 2009, 08:41 PM
  5. Lines
    Posted in the Pre-Calculus Forum
    Replies: 3
    Last Post: August 2nd 2007, 11:43 PM

Search Tags


/mathhelpforum @mathhelpforum