Results 1 to 4 of 4

Math Help - Least Squares Parabola

  1. #1
    Newbie
    Joined
    Jun 2012
    From
    drtjudrt
    Posts
    6

    Least Squares Parabola

    Hi all

    I have been trying to find the values of the coefficients for the least squares parabola:

    y = a + bx + cx^2

    I have taken partial derivatives wrt a, b, c and now have three equations, but I don't know what to do next...any suggestions? Have you solved this before?

    thank you very much!!

    I can help with LaTeX in exchange for help thank you very much
    Follow Math Help Forum on Facebook and Google+

  2. #2
    MHF Contributor
    Prove It's Avatar
    Joined
    Aug 2008
    Posts
    11,560
    Thanks
    1425

    Re: Least Squares Parabola

    Quote Originally Posted by rfhrth View Post
    Hi all

    I have been trying to find the values of the coefficients for the least squares parabola:

    y = a + bx + cx^2

    I have taken partial derivatives wrt a, b, c and now have three equations, but I don't know what to do next...any suggestions? Have you solved this before?

    thank you very much!!

    I can help with LaTeX in exchange for help thank you very much
    Do you have a set of data?
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Newbie
    Joined
    Jun 2012
    From
    drtjudrt
    Posts
    6

    Re: Least Squares Parabola

    Hi

    Thank you for response. I don't have data, but I am try to show that a,b,c are minimization. I took derivatives of proper equation wrt a,b,c set to zero but now am unsure of how to solve for a,b,c explicit

    Thank you very much
    Follow Math Help Forum on Facebook and Google+

  4. #4
    MHF Contributor
    Prove It's Avatar
    Joined
    Aug 2008
    Posts
    11,560
    Thanks
    1425

    Re: Least Squares Parabola

    Quote Originally Posted by rfhrth View Post
    Hi

    Thank you for response. I don't have data, but I am try to show that a,b,c are minimization. I took derivatives of proper equation wrt a,b,c set to zero but now am unsure of how to solve for a,b,c explicit

    Thank you very much
    Show that a,b,c are minimisation? That makes no sense. Anyway, the easiest way to get the values of a,b,c is with matrix algebra.

    Suppose you had a set of data \displaystyle \begin{align*} (x_1, y_1), (x_2, y_2), (x_3, y_3), \dots, (x_n, y_n) \end{align*}, substituting them into your least squares model \displaystyle \begin{align*} y = a + b\,x + c\,x^2 \end{align*} you get a system of equations which you can write in matrix form

    \displaystyle \begin{align*} y_1 &= a + b\,x_1 + c\,x_1^2 \\ y_2 &= a + b\,x_2 + c\,x_2^2 \\ y_3 &= a + b\,x_3 + c\,x_3^2 \\ \vdots \\ y_n &= a + b\,x_n + c\,x_n^2 \\ \\ \left[\begin{matrix} y_1 \\ y_2 \\ y_3 \\ \vdots \\ y_n \end{matrix}\right] &= \left[\begin{matrix} 1 & x_1 & x_1^2 \\ 1 & x_2 & x_2^2 \\ 1 & x_3 & x_3^2 \\ \vdots & \vdots & \vdots \\ 1 & x_n & x_n^2 \end{matrix}\right] \left[\begin{matrix} a \\ b \\ c \end{matrix}\right] \\ \mathbf{Y} &= \mathbf{X}\mathbf{c} \end{align*}

    If \displaystyle \begin{align*} \mathbf{X} \end{align*} was a square matrix, you would be able to solve for \displaystyle \begin{align*} \mathbf{c} \end{align*} by premultiplying both sides by \displaystyle \begin{align*} \mathbf{X}^{-1} \end{align*}. But because we have more equations than unknowns, \displaystyle \begin{align*} \mathbf{X} \end{align*} is not square. But we can make is square by premultiplying both sides by \displaystyle \begin{align*} \mathbf{X}^T \end{align*} first.

    \displaystyle \begin{align*} \mathbf{Y} &= \mathbf{X}\mathbf{c} \\ \mathbf{X}^T\mathbf{Y} &= \mathbf{X}^T\mathbf{X}\mathbf{c} \\ \left(\mathbf{X}^T\mathbf{X}\right)^{-1}\mathbf{Y} &= \left(\mathbf{X}^T\mathbf{X}\right)^{-1}\mathbf{X}^T\mathbf{X}\mathbf{c} \\ \left(\mathbf{X}^T\mathbf{X}\right)^{-1}\mathbf{Y} &= \mathbf{I}\mathbf{c} \\ \left(\mathbf{X}^T\mathbf{X}\right)^{-1}\mathbf{Y} &= \mathbf{c}  \end{align*}

    It can be shown that the values in \displaystyle \begin{align*}\mathbf{c} \end{align*} are exactly the same as if you had minimised the sum of squared deviations.
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Least Squares Parabola
    Posted in the Advanced Math Topics Forum
    Replies: 6
    Last Post: June 11th 2012, 02:15 PM
  2. Magic squares of Squares
    Posted in the Math Puzzles Forum
    Replies: 5
    Last Post: September 22nd 2010, 09:58 AM
  3. Sum of 3 squares
    Posted in the Number Theory Forum
    Replies: 2
    Last Post: April 23rd 2010, 07:03 PM
  4. Replies: 4
    Last Post: November 13th 2009, 05:12 PM
  5. Least Squares Solution for a Parabola
    Posted in the Advanced Statistics Forum
    Replies: 7
    Last Post: May 28th 2009, 03:16 AM

Search Tags


/mathhelpforum @mathhelpforum