A calibration team records seven synthetic observations. The input x is a dimensionless control offset, and y is measured in sensor units. The permitted operating range is −3≤x≤3. A polynomial is a candidate description within that range, not a physical law established by seven measurements.
x
Training observation y
−3
16.35
−2
13.60
−1
28.45
0
37.20
1
32.95
2
25.60
3
41.85
Plot these points mentally before calculating: the observations rise and fall rather than following one straight trend. Would a curve passing through every point necessarily predict a new reading better? Write a prediction and identify what evidence would change your answer.
The example is deliberately engineered to separate fitting from validation. Its training disturbance is patterned; it is not a claim about typical random sensor errors or an independently collected real dataset.
Predict
A cubic has the form c₀+c₁x+c₂x²+c₃x³, with four adjustable coefficients. A quartic adds c₄x⁴, giving five. The coefficient c₀ is the predicted output at zero; the others multiply the indicated powers. A residual is observed output minus predicted output. Positive residuals place observations above the fitted curve.
Before using the tool, predict which family can achieve the smaller training sum of squared errors, abbreviated SSE. SSE adds the square of every training residual. Its units here are squared sensor units. Then make a separate prediction about which family will perform better on new observations. These are different questions.
Experiment
Confirm that the widget contains the seven rows above, with a comma between x and y. Select the cubic, reveal its calculations, and record its equation, coordinate transformation, original-y SSE and every residual. Repeat for the quartic without changing the observations. Inspect both the fitted curves and the residual plots on their shared axes.
Fit, inspect residuals and challenge the model
Each row is one paired observation. Predict a model family and its residual pattern before revealing calculations. The default data are synthetic. State the units and sampling process supplied by the surrounding investigation; the tool itself does not assign physical units.
Use 3–40 pairs of decimal numbers, each between −100 and 100. Rows may repeat; they are separate observations, not automatically independent samples. Pairing and observation order are retained.
Record the raw pairs, model criterion, equation, residual display and context-dependent conclusion in your practice response. Computations use floating-point arithmetic; values are rounded for display. Editing data or selecting a model hides old results. This temporary tool neither saves responses nor awards mastery.
The mathematical reference fits, expressed in the original x coordinate, are
C(x)=30+2x−0.5x²+0.25x³, and
Q(x)=37.2+2x−7.2x²+0.25x³+0.7x⁴.
The tool may calculate coefficients in a centered and scaled coordinate for numerical stability. Such coefficients belong to that displayed coordinate, not directly to powers of the original x. Keep the coordinate definition with your record. Displayed decimals are rounded; tiny floating-point residuals are not evidence of a real measurement discrepancy.
Here the displayed coordinate is z=x/3. The cubic becomes 30+6z−4.5z²+6.75z³. Substituting z=x/3 gives 6(x/3)=2x and 6.75(x/3)³=0.25x³, recovering the original-coordinate coefficients. The quartic’s z coefficients are 37.2, 6, −64.8, 6.75 and 56.7 in ascending powers. Divide the coefficient of zᵏ by 3ᵏ to recover its xᵏ coefficient in this zero-centered case. With a nonzero center, expand powers of (x−center)/scale instead; simple division alone is insufficient.
x
Cubic prediction C(x)
Cubic residual
Quartic residual
−3
12.75
3.60
0
−2
22.00
−8.40
0
−1
27.25
1.20
0
0
30.00
7.20
0
1
31.75
1.20
0
2
34.00
−8.40
0
3
38.25
3.60
0
Check every prediction by substitution before accepting the table. For example C(−1)=30−2−0.5−0.25=27.25. The cubic training SSE is 2(3.6²)+2(8.4²)+2(1.2²)+7.2²=221.76; the quartic SSE is zero in exact arithmetic. A numerical fit report should retain the raw observations as well as the equation so another person can reproduce it.
Understand
Regression chooses coefficients to minimize an error criterion over all supplied observations. Interpolation matches every supplied observation exactly. These seven points happen to lie on one quartic, so its least-squares fit also interpolates them. Seven arbitrary points generally cannot be interpolated by a quartic: five coefficients do not provide seven independent adjustable values. Nor does interpolation imply accurate predictions elsewhere.
The cubic family is contained in the quartic family: set the fourth-degree coefficient to zero to recover any cubic. Consequently the minimum training SSE for a quartic cannot exceed the cubic minimum when both minimize the same original-y criterion on the same rows. This is a statement about the mathematical minima, not a guarantee about unstable numerical algorithms, rounded coefficients or a different fitting criterion. A lower training SSE is partly purchased by allowing more flexibility.
You can even verify this particular cubic minimum without calculus. Its residuals are symmetric about x=0, so the sums of residual times x and times x³ vanish. Their sum is 7.2+2(3.6−8.4+1.2)=0; the sum of residual times x² is 2(9·3.6−4·8.4+1.2)=0. Thus the sum of residual times any cubic change d(x) is zero. Expanding the changed error squares gives Σ(residual−d)²=221.76+Σd², which cannot be smaller. The argument verifies an optimized fit, rather than merely scoring a proposed equation.
Now keep both fitted equations fixed. Two observations reserved for validation are (−2.5,17.96875) and (2.5,35.78125). They were not included in fitting. Both lie inside the calibration range; this is interpolation in the prediction-location sense, distinct from exactly interpolating the training data.
Use the widget’s new-input prediction field to evaluate each fitted model at −2.5 and 2.5. Do not append the validation observations to the fitting textarea: that would change the experiment by training on the answers. Copy each prediction before comparing it with the supplied fresh output.
Fresh input
Fresh output
Cubic prediction
Quartic prediction
−2.5
17.96875
17.96875
10.63750
2.5
35.78125
35.78125
28.45000
Each quartic validation residual is 7.33125. Here the cubic predicts both fresh observations exactly while the quartic fits the training disturbance. This demonstrates a possible overfitting failure, not a theorem that cubics are always better. In an actual investigation, two validation observations would be limited evidence. Repeatedly selecting models on these same observations turns them into development data; a subsequent independent evaluation needs new evidence.
Apply
Try a changed case with six training pairs: (−2,−10), (−1,−1), (0,2), (1,5), (2,14), (3,35). Fit both families and predict the fresh observation at x=0.5 before revealing its supplied value 3.125. Explain why adding a coefficient need not improve either training or validation SSE. Record your inputs, coefficients, criterion and residuals rather than reporting only the model name.
Check the changed case after fitting
The cubic is x³+2x+2. It matches all six training observations and predicts 3.125 at 0.5. A quartic can achieve the same zero SSE by setting its fourth-degree coefficient to zero. With six distinct input values, two polynomials of degree at most four cannot agree at all six unless they are identical: their difference would have too many roots. Extra permitted complexity does not force a nonzero extra coefficient.
For the original calibration, write a recommendation limited to −3≤x≤3. Explain why the quartic’s positive leading coefficient does not license predictions at arbitrarily large offsets. If x instead had physical units, the coefficient of xᵏ would have output units divided by input units to power k; changing the input unit changes coefficient numbers. Rounded measurements, repeated observations and dependence also affect interpretation, even when a numerical SSE can still be computed.
Continue
Submit a reproducible comparison: the training and validation rows kept separate, both equations with their coordinate systems, original-scale SSE and residual patterns, fresh prediction errors, and a domain-limited conclusion. State which modeling assumption deserves the next experimental check. Successful calculation is evidence of executing this workflow; it does not establish that an uncontrolled real process follows a polynomial or that an independently reviewed prediction study has been completed.
Apply · explain · revise
Practice and reasoning
Drafts save locally as you type. Reveal worked solutions when useful; the site remembers that exposure. Automatic matches check the requested answer, while written arguments require review against the rubric.
A calibration table has inputs 0,1,2 and outputs 2,3,6. Fit a quadratic exactly. Before collecting a new reading at input 3, record its prediction. The new reading is 10.6 with measurement uncertainty ±0.1. Assess this exact model and distinguish interpolation from the new check.
Structure your argument and preserve revisions
These optional planning fields save locally. Recording your response saves an immutable copy of the argument and these fields. Older records may contain only first/latest responses; missing intermediate revisions are not reconstructed.
Each field allows 2,000 characters. Keep a specific claim, state where it applies, cite the facts you use, and explain what still needs checking. Blank fields are allowed and are not evidence of mastery.
Use the fitting workbench with synthetic training pairs (−3,−17),(−2,−2),(−1,1),(0,2),(1,7),(2,26),(3,65). Input x is dimensionless and responses are sensor units. Fit cubic and quartic families; record the coordinate transformation, coefficients, original-scale SSE and residuals. Predict at x=0.5 before comparing with fresh output 3.42. Do not add that check to the fitting rows. Compare training and validation evidence. Accept coefficients, predictions and SSE within 0.002 of the reference.
Structure your argument and preserve revisions
These optional planning fields save locally. Recording your response saves an immutable copy of the argument and these fields. Older records may contain only first/latest responses; missing intermediate revisions are not reconstructed.
Each field allows 2,000 characters. Keep a specific claim, state where it applies, cite the facts you use, and explain what still needs checking. Blank fields are allowed and are not evidence of mastery.
A cubic and a quartic fitted on the same calibration records have training SSEs 4 and 0.8. On three untouched checks, their residuals are respectively (0.2,−0.1,0.3) and (0.5,−0.6,0.1), in millimeters. Compare validation mean squared errors and recommend a model for similar inputs, stating the limitation of this small comparison.
Structure your argument and preserve revisions
These optional planning fields save locally. Recording your response saves an immutable copy of the argument and these fields. Older records may contain only first/latest responses; missing intermediate revisions are not reconstructed.
Each field allows 2,000 characters. Keep a specific claim, state where it applies, cite the facts you use, and explain what still needs checking. Blank fields are allowed and are not evidence of mastery.
A polynomial q fits observations at x=0,2,4,6. Show that r(x)=q(x)+0.1x(x−2)(x−4)(x−6) fits the same observations. Calculate the difference r(1)−q(1), and explain how a fresh measurement at 1 could distinguish these particular models.
Structure your argument and preserve revisions
These optional planning fields save locally. Recording your response saves an immutable copy of the argument and these fields. Older records may contain only first/latest responses; missing intermediate revisions are not reconstructed.
Each field allows 2,000 characters. Keep a specific claim, state where it applies, cite the facts you use, and explain what still needs checking. Blank fields are allowed and are not evidence of mastery.
A polynomial predicts a liquid volume from time using calibration times 0 through 4 minutes. It predicts −2 liters at time 7. A colleague says a quartic with a smaller training residual makes this prediction acceptable. Diagnose the two problems and propose a useful next check.
Structure your argument and preserve revisions
These optional planning fields save locally. Recording your response saves an immutable copy of the argument and these fields. Older records may contain only first/latest responses; missing intermediate revisions are not reconstructed.
Each field allows 2,000 characters. Keep a specific claim, state where it applies, cite the facts you use, and explain what still needs checking. Blank fields are allowed and are not evidence of mastery.
A sensor model uses p(x)=x³ for 0≤x≤2 and q(x)=8+2(x−2) for 2<x≤4. At an unused x=3 the reading is 10.3 with uncertainty ±0.2. Check boundary continuity and the prediction separately. Would changing the right formula to 8.3+2(x−2) solve both issues?
Structure your argument and preserve revisions
These optional planning fields save locally. Recording your response saves an immutable copy of the argument and these fields. Older records may contain only first/latest responses; missing intermediate revisions are not reconstructed.
Each field allows 2,000 characters. Keep a specific claim, state where it applies, cite the facts you use, and explain what still needs checking. Blank fields are allowed and are not evidence of mastery.
Reflect and continue
Before marking this lesson complete, explain one key idea without the worked solution and identify a condition that matters. Marking complete records participation, not independent mastery.