Learn

Learning preferences

Make learning more comfortable. Changes apply immediately.

Enlarges page content, including diagrams and their labels. You can also use your browser’s zoom.

Choose the colours that are easiest for you to distinguish. Applies to lesson diagrams and lab plots. Labels, shapes, hatching and line patterns also distinguish meanings. Source photographs and raw image brightness stay unchanged; mask-only views are available for image overlays.

ExampleComparisonSample link

Saved in this browser on this device. Preferences are separate from progress backups.

Lesson 5 of 12

Compare fitted models and plotted residuals

Fit three candidate families, compare errors on the same response scale and inspect residual structure.

Loading your saved responses…

Try the optional starting-point checks and targeted refreshers. You can continue directly into this lesson.

Try

A synthetic response measured at times 0,1,2,3,4,5 has values 2,4,7,10,15,21. The increase is not constant, but noisy data rarely announce a unique formula. A line, quadratic and exponential are candidate descriptions. Comparing them requires a common response scale and a view of what each leaves unexplained.

A residual is observed response minus fitted response at the same input: e=y−ŷ. A positive residual places the observation above the fitted curve. Squaring and adding residuals gives SSE, the sum of squared errors on the specified scale. Its units are squared response units.

Predict

Predict whether a fitted line will tend to miss the ends and middle in opposite directions. Which candidate has more adjustable coefficients? Does the smallest training SSE prove the best future predictor? Decide what would make a model plausible beyond a small numerical advantage on these six observations.

Experiment

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.

Use the default nonlinear data, which are the fixed worked example here. Reveal all three fits and inspect the scatter curves and residual plot for each. Record equations and original-response-scale SSEs. Then choose the noisy linear preset and repeat the comparison, explaining why the scientific question and pattern matter rather than always selecting the most flexible family.

Fit to the six worked pairsApproximate equationOriginal-scale SSE
Linearŷ=0.476190+3.742857x9.676190
Quadraticŷ=2.142857+1.242857x+0.5x²0.342857
Log-linear exponentialŷ=2.374843 exp(0.459395x)8.477956

The coefficients are rounded for reading; calculate residuals with the tool’s retained precision. At x=3 the line predicts approximately 11.704762 while the observed value is 10, so the residual is about −1.704762. That numerical difference corresponds to one plotted point below the zero line in the residual display.

Understand

Linear least squares chooses intercept and slope to minimize the original y-scale SSE. Quadratic least squares chooses three coefficients for the same criterion. The exponential candidate is obtained by fitting a line to log y and then exponentiating. It minimizes squared log residuals, not original-scale SSE. Comparing its original-scale residuals with the others is useful, but it does not turn that fitting procedure into nonlinear least squares on y. The method is unavailable for nonpositive y values, and adding an arbitrary constant changes the modeled response.

For the worked line, residuals in increasing x order are approximately 1.524,−0.219,−0.962,−1.705,−0.448,1.810. Positive ends and predominantly negative middle form a curved pattern, suggesting the line misses systematic structure. The quadratic residuals are much smaller and alternate around zero. That supports a tentative comparison, not a proof that a quadratic generated the data.

The extra quadratic coefficient cannot increase the least attainable training SSE because the family includes lines when its squared-term coefficient is zero. Flexibility therefore earns part of its advantage automatically. New observations, held-out predictive checks, measurement error and a plausible mechanism help decide whether the added complexity is useful. Six synthetic points cannot establish a universal family preference.

Interpret coefficients in context. If x is elapsed days and y is millimeters, the line’s slope is fitted millimeters per day. Its intercept describes the fitted value at day zero; here zero was observed, but the coefficient is still a fitted estimate rather than an exact initial condition. For a study observed only at days 5–10, an intercept at day zero would be extrapolation and might have no meaningful interpretation. The coefficient of x² has units millimeters per day squared; it does not represent a constant slope.

A residual plot should label input and residual units and show zero explicitly. Random-looking residuals are encouraging but do not verify independence, equal variability or population representativeness. A pattern may arise from omitted variables, measurement changes or a few unusual points, not only the mathematical family chosen.

Apply

Enter the fresh practice pairs and retain all three equations, comparable SSEs and residual artifacts. Recommend a tentative model and explain its limitations. State whether zero input is meaningful and whether the requested prediction lies inside the observed range. Do not silently remove nonpositive responses to enable the exponential option or compare a log SSE directly with an original-scale SSE.

The workbench has bounded inputs and temporary state. Copy the requested evidence into your response; a displayed curve is a calculation aid, not a stored report or an independent validation result.

Continue

Next use repeated sampling to investigate estimation error. Model assumptions remain central: a precise calculation under the wrong sampling frame cannot fix biased data.

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 fitted response is ŷ=2+3x. At x=4 the observed response is 16. Find the residual y−ŷ.

Integers, fractions and finite decimals are accepted. Expressions such as sqrt(2) are not parsed by this checker.

A candidate model has residuals −2,1,0,2. Find its sum of squared errors.

Integers, fractions and finite decimals are accepted. Expressions such as sqrt(2) are not parsed by this checker.

Enter synthetic elapsed-day/response pairs (0,3),(1,4),(2,8),(3,12),(4,20),(5,29). Use technology to fit linear, quadratic and log-linear exponential candidates. Record each equation, original-response-scale SSE, scatterplot and residual plot. Recommend a tentative model with limitations.

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 fitted delivery-time model is ŷ=12+0.8x, with x in kilometers and y in minutes, based on trips from 5 to 30 km. Interpret slope/intercept and assess prediction at x=0 and x=100.

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 linear fit yields ordered residuals at x=0,1,2,3,4 of 2,−1,−2,−1,2. Construct its residual plot and explain what it suggests, what it does not prove, and a useful next 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.

An exponential fit log y=α+βx is attempted on y values −1,0,2,5. Explain why the workflow fails and why adding an arbitrary constant is not a neutral repair.

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.