Polynomial Best Fit:
Generally, an mth order polynomial also can be used for fitting the data (m = i refers to linear regression). Consider an mth order regression polynomial
f ( x) = c0 + c1 x + c2 x 2 + . . . + cm xm .
After that, the sum of squares of differences will be
The coefficients c0, c1, c2, . . . , cm are to be find out by minimizing S. The following system of (m + 1) equations is then attained for the unknown coefficients
The solution of these equations yields the wanted polynomial for a best fit.
It can be noted that for most practical problems, the value of m is, usually, from 1 to 4.