Virtual engineering lab

Calibration, Regression & Residuals

Fit linear, polynomial, or exponential measurement models, examine residuals, and distinguish confidence intervals for a fitted response from prediction intervals.

Measurement / Engineering StatisticsintermediateValidated educational model
Learning mode

Guided laboratory

Use the checklist when you want a structured lab. Explore mode leaves the instruments unrestricted.

1 · Choose your data

Start with an example or your measurements

All analysis stays in this browser. Original cells and row IDs are retained when you change units or exclude a reading.

Import CSV or paste a table

Up to 2 MB, 10,000 readings, and 16 columns. Use a decimal point; quote fields containing commas. Units in square brackets are detected. Empty and nonnumeric values are shown in the preview.

Save or restore an analysis project

Project JSON preserves original cells, units, mappings, exclusions and reasons, fit settings, and the uncertainty budget. Annotated CSV includes every original row; formula-like text is escaped for spreadsheets. Use JSON for exact restoration.

2 · Map columns and choose the method

What do you want to measure?

Statistics and regression use the same included rows with valid mapped values. Error bars show ±1 standard uncertainty in Y; regression remains unweighted and treats X as exact.

Assign original column units

These labels describe the values in your original file. Assigning a label does not convert raw values. Use the display-unit controls above to convert values without changing the original data.

Uncertainty budget for the mean

Type A is s/√n. Add independent Type B components in the current Y display unit. Enter a half-width for rectangular/triangular distributions, standard uncertainty directly, or certificate expanded uncertainty with its k. A known correction changes the mean; its remaining uncertainty belongs in this budget.

Resolution half-width = display step/2. Avoid counting quantization twice when repeated scatter already captures it. k = 2 is often approximately 95% for near-normal output with sufficient information; it is not an exact coverage guarantee.

Ready. Check the columns and analyze the example, or import your own data.

Inspect original readings

Rows outside Q1 − 1.5 IQR or Q3 + 1.5 IQR are flagged for investigation after analysis. This is a descriptive rule, not proof of an error. A zero IQR can flag any departure from the central value. No row is automatically deleted.

Measurements

Instrument readings

Included calibration observations
Number of included X/Y pairs.
Mean response
Mean observed response in the selected unit.
Regression RMSE
Root mean squared residual in original Y units.
Theory

Equations and model

Fit a physical relationship

Linear and polynomial models minimize squared residuals in Y. The solver centers and scales X, then uses twice-orthogonalized QR for a small bounded fit. Coefficients are reported in that scaled basis to avoid misleading precision when the raw X offset is large.

t = (X − X̄)/scaleŶ = β0 + β1t + … + βdtᵈresidualᵢ = Yᵢ − ŶᵢRMSE = √(Σresidualᵢ²/n)residual σ = √(Σresidualᵢ²/(n − p))

Interpret model quality and intervals

R² is undefined when Y is constant. A high R² does not rule out systematic curvature or changing scatter. Prediction intervals include the scatter of a new response and are wider than intervals for the fitted mean. Exponential fitting minimizes log-space errors; the exponentiated curve estimates a conditional median/geometric mean. For an exponential fit, the interval formulas apply in log(Y); exponentiating their endpoints gives intervals that need not be symmetric in Y.

R² = 1 − SSE/SSTmean-response interval = fitted response ± t · u(fitted response)prediction interval = fitted response ± t · √(u²(fitted response) + residual σ²)ln(Y) = β0 + β1t for the exponential model
Validation

Independent checks

Sampling adequacyNot run

At least two included readings are required to estimate scatter and the standard error.

Expected
Simulated
Error
Tolerance
0%

Run the experiment to perform this check.

Selected method is definedNot run

Check the selected analysis prerequisites, without treating mathematical validity as proof of physical adequacy.

Expected
Simulated
Error
Tolerance
0%

Run the experiment to perform this check.

Engineering interpretation

Run the experiment to generate an engineering interpretation.

Assumptions and limitations
Assumptions
  • Observations used for standard error and Student t intervals are independent and sampled from a stable process; small-sample t intervals assume normal observations.
  • Regression is unweighted, includes an intercept, and treats X as exact. Errors have constant variance in the fitted space.
  • The uncertainty budget components are independent. The uncertainty of a mean is distinct from the scatter of individual readings.
  • Declared original units describe the raw cells. Display conversion changes presentation, not those raw cells.
Limitations
  • Import is bounded to 2 MB, 10,000 data rows, 16 columns, and 1,000 characters per cell. Missing values are never interpreted as zero.
  • Polynomial degree is limited to 1–5; fits need more observations than coefficients and distinct X values. Exponential fitting requires Y > 0.
  • IQR fences identify unusual values descriptively; they do not diagnose faults or delete readings. A zero IQR can flag every departure from the central value.
  • Weighted fitting, uncertainty in X, inverse calibration, and automatic model selection are not included. Do not infer validity from R² alone.
  • A chosen k is not an automatic confidence guarantee. Correlated budget components should be handled in the propagation experiment.
Local experiment export

Save your measurements and setup

Exports are generated in your browser. No account or server upload is required.

Settings JSON
Current parameters and instrument controls, including waveform, output enable, scope coupling, timebase, trigger, and cursors when present. Data labs also include the dataset, mappings, exclusions, budget, or propagation setup.
Measurements CSV
Completed instrument readings with labels, units, and descriptions.
Plot PNG
The current canvas-based scope, transient, sweep, or statistics visualization when available.
Summary
Markdown report with objectives, setup, measurements, validation, interpretation, assumptions, and graded guided concept-check results.

Ready to export the current local experiment state.

Learning objectives

What this experiment should establish

  • Use regression to characterize a sensor response.
  • Interpret R² and RMSE alongside residual patterns.
  • Distinguish mean-response confidence intervals from future-response prediction intervals.
Check your understanding

Questions to answer from the experiment

  1. A linear fit has high R² but curved residuals. What does this suggest?
  2. Why is a prediction interval for one future response wider than a mean-response confidence interval?
  3. In this unweighted calibration fit, what do Y error bars do?
  4. The exponential method fits ln(Y). Which error assumption matches this transformation?
Continue learning

Sources and model review

Reviewed 2026-09-16. The educational model exposes its assumptions and validation; source references do not imply external certification.