How to calculate
Fit the polynomial that minimizes the sum of squared residuals. Use the resulting coefficients to predict Y and compare the fitted and observed values.
Worked example
Use X values -1, 0, 1, 2 · Matched Y values 2, 1, 0, 5. The result is ŷ = x^3 − 2x + 1.
Input and result notes
Enter matched X and Y lists in the same order. The fit needs at least one more distinct X value than its degree.