# Least Squares Parabola

Printable View

• Jun 8th 2012, 11:21 AM
rfhrth
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!!
• Jun 8th 2012, 01:20 PM
BobP
Re: Least Squares Parabola
$S=\sum_{i=1}^{n}(y_{i}-a-bx_{i}-cx_{i}^{2})^{2}.$

Differentiate $S$ partially wrt $a,b$ and $c,$ equate each derivative to zero and solve the resulting equations.
• Jun 10th 2012, 01:21 PM
rfhrth
Re: Least Squares Parabola
Hi

Thank you for response. 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
• Jun 11th 2012, 12:45 AM
BobP
Re: Least Squares Parabola
The equation that you should be differentiating is the one for $S.$

Differentiating wrt $a$ gives you

$\frac{\partial S}{\partial a}=-2\sum_{i=1}^{n}(y_{i}-a-bx_{i}-cx^{2}_{i})$

and on putting this equal to zero this can be rewritten as

$\sum_{i=1}^{n} y_{i}=an+b\sum_{i=1}^{n} x_{i}+c\sum_{i=1}^{n} x_{i}^{2}$

The summations are taken over the $n$ data points and will therefore be numbers.

Differentiate to find the other two equations and then solve them simultaneously for $a,b$ and $c.$

BTW, do not double post. The response that you are getting from your other posting is an alternative method, they produce the same end result.
• Jun 11th 2012, 01:10 AM
Prove It
Re: Least Squares Parabola
Quote:

Originally Posted by BobP
The equation that you should be differentiating is the one for $S.$

Differentiating wrt $a$ gives you

$\frac{\partial S}{\partial a}=-2\sum_{i=1}^{n}(y_{i}-a-bx_{i}-cx^{2}_{i})$

and on putting this equal to zero this can be rewritten as

$\sum_{i=1}^{n} y_{i}=an+b\sum_{i=1}^{n} x_{i}+c\sum_{i=1}^{n} x_{i}^{2}$

The summations are taken over the $n$ data points and will therefore be numbers.

Differentiate to find the other two equations and then solve them simultaneously for $a,b$ and $c.$

BTW, do not double post. The response that you are getting from your other posting is an alternative method, they produce the same end result.

Much quicker than this method by the way...

Mods, would you please merge this thread with the other identical thread?
• Jun 11th 2012, 10:59 AM
rfhrth
Re: Least Squares Parabola
Hello
thank you for reply
My onlly question was how to solve for a,b,c simultaneously. I already done the derivatives wrt a,b,c from proper equation (S)

thank you very much
• Jun 11th 2012, 02:15 PM
BobP
Re: Least Squares Parabola
If you are working 'on paper', then a routine elimination is best.
Subtract multiples of the first equation from the second and third equations to eliminate $a,$ say, from both of them, then take a multiple of one of the new equations from the other to eliminate $b.$
That allows you to calculate $c$ and you can back substitute to calculate $b$ and $a.$