Results 1 to 8 of 8

Math Help - Least Squares Solution for a Parabola

  1. #1
    Newbie
    Joined
    May 2009
    Posts
    5

    Least Squares Solution for a Parabola

    Hi there,

    I have a set of data points

    {(X1,Y1), (X2,Y2),........(Xn,Yn)}

    I would like to approximate the relation between X and Y as a parabola. Assuming the parabola has form y = Ax^2+Bx+C, can somebody please provide me with the least squares regression formulas for A, B and C.

    Any help is greatly appreciated.

    Thanks,

    AP
    Follow Math Help Forum on Facebook and Google+

  2. #2
    MHF Contributor matheagle's Avatar
    Joined
    Feb 2009
    Posts
    2,763
    Thanks
    5
    This is very simple. Use matrices. I'll use your model as is... y = Ax^2+Bx+C.
    We don't need the epsilon since we are only fitting a curve.
    Using your model the design matrix consists of three columns.

    The first column is x_1^2 through x_n^2, the second column is x_1 through x_n and the last column is all 1's.

    The vector Y consists of y_1 through y_n.

    The solution is the vector \hat\beta^t=(\hat A, \hat B, \hat C)^t

    where \hat\beta=(X^tX)^{-1}X^tY
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Newbie
    Joined
    May 2009
    Posts
    5
    MathEagle,

    Thanks for your reply. Unfortunately, matices to me, are like chinese to an englishman........

    The general matrix solution for the regression of a polynomial of any degree is all over the web. But I dont get it.

    I was looking for a specific solution to the parabola regression. Something that has a heap of "sum of XiYi" and "sum of Xi squared"..........

    Any chance you could help with that??

    Thanks again,

    AP
    Follow Math Help Forum on Facebook and Google+

  4. #4
    MHF Contributor matheagle's Avatar
    Joined
    Feb 2009
    Posts
    2,763
    Thanks
    5
    Well, that makes our work harder.
    I bet I can find it on the web.
    One can solve it by differentiating and obtaining the normal equations.

    \sum_{i=1}^n(y_i-ax_i^2-bx_i-c)^2
    with respect to a,b,c and setting each equal to zero.

    But now you'll tell me you never had calculus.

    I figured I could find it on the web, matrices is better and they didn't finish it either.
    They have just one more step after what I told you to do.
    http://www.efunda.com/math/leastsqua...sqr2dcurve.cfm
    I googled parabolic least squares, maybe you cna find other useful links.
    I'm sure others have done this.
    But between matrices and JMP on my pc I don't need to look at the normal equations.

    Here's more with a parabolic fit, but I see matrices and a weird looking robot
    http://www.bsu.edu/web/jkshim/mathan...eastsquare.htm
    Last edited by matheagle; May 26th 2009 at 06:26 PM.
    Follow Math Help Forum on Facebook and Google+

  5. #5
    Newbie
    Joined
    May 2009
    Posts
    5
    MathEagle,

    I do have calculus, and I should understand matrices (a long, long time ago I did a degree in mathematics). I have been trying to solved the equations for the past 2 days, and I just keep stuffing it up. Thus, I was hoping someone had it in a nice neat form for me.

    I have previously found the pages you suggest. The robot was a mystery to me also.

    Thanks for you time and effort.

    AP.
    Follow Math Help Forum on Facebook and Google+

  6. #6
    Junior Member
    Joined
    Jan 2007
    Posts
    42
    try the following page for the normal equations to fit a parabola in summation form
    mixture: normal equation to fit a parabola


    for a straight line
    http://keral2008.blogspot.com/2009/0...of-y-on-x.html
    Follow Math Help Forum on Facebook and Google+

  7. #7
    MHF Contributor matheagle's Avatar
    Joined
    Feb 2009
    Posts
    2,763
    Thanks
    5
    As I stated yesterday, the normal equations can be found in the box in Least-Squares Parabola
    Follow Math Help Forum on Facebook and Google+

  8. #8
    Newbie
    Joined
    May 2009
    Posts
    5
    Eagle and QP,

    Thanks very much for your help, I am all sorted now.

    To be honest, I am more than a little embarrassed I couldn't sort this out for myself.

    Cheers,

    AP
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Least Squares solution
    Posted in the Advanced Algebra Forum
    Replies: 1
    Last Post: August 7th 2010, 06:07 AM
  2. Replies: 4
    Last Post: November 13th 2009, 06:12 PM
  3. least-squares solution
    Posted in the Advanced Algebra Forum
    Replies: 0
    Last Post: November 14th 2008, 09:17 PM
  4. least-squares solution
    Posted in the Advanced Algebra Forum
    Replies: 0
    Last Post: November 12th 2008, 07:43 PM
  5. Least-squares solution
    Posted in the Advanced Algebra Forum
    Replies: 5
    Last Post: May 27th 2007, 05:17 PM

Search Tags


/mathhelpforum @mathhelpforum