Linear Regression Calculator
Linear regression fits the straight line that minimises squared vertical distances to your data. In reliability work it underpins degradation analysis, probability plotting and any trend extrapolation — which makes its assumptions worth checking rather than assuming.
Formula
Worked example
Wear depth measured at five intervals: (100, 0.12), (200, 0.21), (300, 0.33), (400, 0.40), (500, 0.52) — hours versus mm.
- x̄ = 300, ȳ = 0.316
- Σ(x−x̄)(y−ȳ) = 99.0; Σ(x−x̄)² = 100000
- b = 99.0 / 100000 = 9.90 × 10⁻⁴ mm per hour
- a = 0.316 − (9.90 × 10⁻⁴ × 300) = 0.316 − 0.297 = 0.019 mm
- Extrapolating to a 1.0 mm wear limit: t = (1.0 − 0.019)/9.90×10⁻⁴ = 991 hours
Wear accumulates at about 0.99 µm per hour and reaches the 1.0 mm limit near 991 hours. That extrapolation assumes the wear rate stays linear well beyond the measured range — for many wear mechanisms it accelerates, so treat it as an upper bound on remaining life, not a prediction.
Common mistakes
- Reading a high R² as proof the model is right. R² measures variance explained, not correctness of form — a curve can produce R² above 0.95 on a linear fit.
- Extrapolating well beyond the range of the data, which is exactly what degradation analysis asks you to do, so residuals must be checked for curvature first.
- Ignoring influential outliers, which pull the least-squares line disproportionately.
- Fitting a line to autocorrelated time-series data without accounting for the correlation, which makes the confidence bounds far too narrow.
Related tools
About Reliability Pro
Linear Regression is part of a suite of 126 reliability, maintenance and quality engineering tools covering life data analysis, accelerated testing, system reliability, FMEA and root cause, SPC, and design for reliability. It runs in the browser and as native iOS and Android apps, so the same calculation is available at a desk or in front of the asset.