03 / 06 · Linear regression
Teaching example. Synthetic data.
How are sensor readings related to a reference input?
Compare a sensor signal with a known reference input. How does the signal change, and what is the fitted slope?
10 levels · XY data
- Fitted slope
- 1.989
- 95% confidence interval
- 1.934 … 2.044
Inspect the original observations
| Reference input | Signal |
|---|---|
| 1 | 5.1 |
| 2 | 6.8 |
| 3 | 9.3 |
| 4 | 10.9 |
| 5 | 13.2 |
| 6 | 14.7 |
| 7 | 17.1 |
| 8 | 18.9 |
| 9 | 21.2 |
| 10 | 22.8 |
Calculated by the Linza engine from this example’s data. Opening it in the editor runs a fresh calculation.
Why this method
Linear regression describes the mean signal Y at a given X. It estimates a slope and an intercept. Correlation alone supplies neither a calibration equation nor evidence of agreement with a reference. Independent errors and residual checks are needed.
Explore the theory: Regression and correlation →Work through it in Linza
In Data, inspect the X and Y pairs, then open Analyses. Substitute X = 5 into Y = intercept + slope × X. Compare with the line and inspect deviations of the points. Predictions far beyond the observed X range need separate justification.
Open a copy and recalculateTry changing one condition
Add 3 to every Y value. Which changes: the slope or the intercept?
Show the explanation
The intercept increases by 3 while the slope stays the same. This illustrates a constant signal offset. A strong linear relationship does not rule out systematic sensor error.
Data and reproducibility
Teaching studies with synthetic data. The scenarios reflect practical questions, but do not report real experimental findings.