The least-squares parabola uses a second degree curve
to approximate the given set of data, , , …, where N>=3. The best fitting curve f(x) has the least square error, That is
Please note that a,b,c are unknown coefficients while all Xi and Yi are given. To obtain the least square error, the unknown coefficients a,b,c must yield zero first derivatives.
Expanding the above equations, we have
The unknown coefficients a,b,c can hence be obtained by solving the above linear equations.