Simple linear regression
Fitting a straight line to predict one variable from another, and judging whether the line is any good.
Simple linear regression fits the straight line that minimizes the sum of squared vertical distances from the points:
What the output tells you
- Slope : change in for each unit of . Its p-value tests whether the true slope could be zero.
- : share of the variation in explained by the line.
- Standard error of the regression : typical scatter of points around the line, in units of .
Prediction
A prediction interval for a new single value is much wider than the confidence interval for the line itself, because it includes the scatter of individual points. Do not predict outside the range of you studied.
Uses in quality work
- Relating a process setting to an output to choose a target setting.
- Calibration curves and gauge linearity.
- Converting between two measurement methods.
Always check
Plot the data and the residuals. A curve, a funnel or a few influential points can make a confident-looking line wrong.
Regression > Linear and Fit Y by X, with prediction and confidence bands.
See also
References
- Montgomery, D. C., Peck, E. A., and Vining, G. G. Introduction to Linear Regression Analysis. Wiley.