Simple Linear Regression and R²
Simple linear regression is a statistical method that fits the straight line Ŷ = b₀ + b₁X through paired data by least squares, so that one continuous X predicts a continuous Y. The slope b₁ gives the change in Y per unit of X, and R² gives the share of the variation in Y that the line explains.
Quick facts
- Type
- Model of a continuous Y on one continuous X
- Equation
- Ŷ = b₀ + b₁X, with b₁ = Sxy / Sxx and b₀ = ȳ − b₁x̄
- Main outputs
- Slope, intercept, R², S (standard error of the regression), F and p-values
- Origin
- Least squares by Legendre (1805) and Gauss (1809); the term regression from Galton (1886)
- Used when
- Improve: quantify Y = f(X) for a verified X and set its operating level
- Reference
- IASSC™ Green Belt Body of Knowledge §4.1.2
- Exam relevance
- Green Belt (Improve phase)
What is simple linear regression and when is it used in DMAIC?
Simple linear regression turns a scatter plot into an equation. Where correlation says how tightly X and Y move together, regression says how much Y changes when X changes, and what Y to expect at a given X.
In a Lean Six Sigma project it serves the Y = f(X) logic directly:
- In Analyze, it confirms that a candidate X has a real, quantifiable effect on the Y.
- In Improve, it sets the operating level of the X that delivers the target Y, and predicts the Y after a change.
The method needs a continuous Y and a continuous X. With a categorical X, such as site or shift, a t-test or ANOVA fits better; with several Xs, use multiple regression.
Simple linear regression is the Improve-phase tool that converts one verified X into a prediction of the Y, in the Y's own units.
How do you fit the least-squares regression line?
Ordinary least squares picks the line that minimizes the sum of the squared vertical distances (residuals) between the points and the line:
b₁ = Sxy / Sxx, withSxy = Σ(x − x̄)(y − ȳ)andSxx = Σ(x − x̄)²b₀ = ȳ − b₁x̄Ŷ = b₀ + b₁X
The line always passes through the point (x̄, ȳ).
Worked example. Brightwater Health's pharmacy times six discharge prescriptions: X = items on the prescription (2, 4, 6, 8, 10, 12) and Y = turnaround in minutes (32, 34, 47, 57, 59, 71).
| Quantity | Calculation | Result |
|---|---|---|
| Means | x̄ = 42 / 6; ȳ = 300 / 6 | 7; 50 |
| Sxx | 25 + 9 + 1 + 1 + 9 + 25 | 70 |
| Sxy | 90 + 48 + 3 + 7 + 27 + 105 | 280 |
| Slope b₁ | 280 / 70 | 4.0 min per item |
| Intercept b₀ | 50 − 4.0 × 7 | 22.0 min |
| Prediction at X = 9 | 22.0 + 4.0 × 9 | 58.0 min |
The numbers come out exact here; in general, keep full precision and round half-up at the end.
Simple linear regression gives the pharmacy a usable rule: about 22 minutes of fixed work per prescription plus 4 minutes per item.
How do you read the regression output: R², S, F and the slope test?
Regression output splits the total variation of Y into a part the line explains and a part it does not. For the pharmacy example, in our own neutral table:
| Source | DF | SS | MS | F | P |
|---|---|---|---|---|---|
| Regression | 1 | 1,120 | 1,120 | 112.0 | < 0.001 |
| Error | 4 | 40 | 10 | ||
| Total | 5 | 1,160 |
The statistics read from it:
R² = SSregression / SStotal = 1,120 / 1,160 = 0.966(96.6%).S = √MSerror = √10 = 3.16 min, the typical distance of a point from the line, in the units of Y.F = MSregression / MSerror = 112.0, with 1 and n − 2 degrees of freedom.t = b₁ / SE(b₁), withSE(b₁) = S / √Sxx = 3.162 / √70 = 0.378, so t = 10.58. With one X, F = t².- 95% confidence interval for the slope:
b₁ ± t(0.025, n − 2) × SE(b₁) = 4.0 ± 2.776 × 0.378 = (2.95, 5.05)minutes per item.
The p-value tests H₀: β₁ = 0. Below α = 0.05, the slope is statistically different from zero and X is a useful predictor. Rounding is half-up, applied to the final results.
Simple linear regression output answers two questions: is the slope real (p-value, interval) and how well does the line fit (R², S)?
How do you interpret the slope, the intercept and R²?
Each number has one meaning:
- Slope b₁: the average change in predicted Y for a one-unit increase in X. Here, each extra item adds about 4 minutes.
- Intercept b₀: the predicted Y at X = 0. It has a practical meaning only when X = 0 lies within, or close to, the observed range. Here, 22 minutes is the fixed handling time of a prescription.
- R²: the proportion of the total variation in Y that the line accounts for. It is not the share of predictions that are "right", and it says nothing about cause. In simple regression,
r = ±√R²with the sign of the slope. - S: the spread of the points around the line. Two models with the same R² can differ in S, and S is what limits the precision of a single prediction.
A regression describes the relationship only over the observed range of X. Predicting at 25 items from data that stop at 12 is extrapolation: the relationship may change shape outside the range.
Simple linear regression is read in the units of the process: minutes per item, minutes of fixed time and minutes of scatter.
What must be true before you trust a regression?
The least-squares line can always be computed. Its p-values and intervals are trustworthy only when the errors behave as the model assumes:
- Linearity: the relationship is a straight line over the range studied.
- Independence: the errors do not depend on each other, for example over time.
- Normality: the errors are roughly normal with a mean of zero.
- Equal variance: the spread of the errors is constant across the fitted values.
The X values themselves do not need to be normal. The assumptions are checked on the residuals, through a residuals-versus-fits plot, a normal probability plot and a plot in time order.
Two more conditions matter in practice: the measurement system for X and Y must be adequate, and the data must come from a stable process.
Simple linear regression earns trust through its residuals, so the residual check is part of the fit, not an optional extra.
What are the common mistakes with simple linear regression?
Simple linear regression is popular because it gives a prediction rule in plain units from a handful of data. Its common mistakes are well known:
- Extrapolating beyond the observed X range.
- Swapping X and Y. The regression of Y on X is not the inverse of the regression of X on Y; the slope of X on Y is Sxy / Syy.
- Reading R² as causation. A high R² is association; a controlled change confirms cause.
- Ignoring curvature. A good R² with a curved residual pattern still needs a squared term or a transformation.
- Forcing the line through the origin without a reason: it biases the slope.
- Skipping the residuals and trusting p-values from a model whose assumptions fail.
Most errors with simple linear regression come from using the equation outside the conditions in which it was fitted.
Simple linear regression vs. correlation: what is the difference?
| Simple linear regression | Correlation (r) | |
|---|---|---|
| Purpose | Predict Y from X and quantify the effect | Measure the strength and direction of linear association |
| Output | Ŷ = b₀ + b₁X, R², S, F, p-values | One number from −1 to +1 |
| Roles | Y is the response, X the predictor | Symmetric in X and Y |
| Units | Slope in units of Y per unit of X | Unit-free |
| Link | R² = r² with one predictor | r = ±√R², with the slope's sign |
Correlation screens whether X and Y are linearly related; simple linear regression turns that relationship into an equation for prediction and target setting.
Exam focus
Simple linear regression is IASSC™ section 4.1.2, in Green Belt scope only. Questions ask you to compute the slope and intercept from sums of squares, predict Y at a given X, read R², S and F from an ANOVA table, and build a confidence interval for the slope with n − 2 degrees of freedom. Common traps are reading R² as r, using Syy in the slope, and extrapolating. Practise in the Improve phase drill.
Practise this DMAIC phase →FAQ
What is a good R² value?
There is no universal threshold. In a stable service process, an R² of 0.6 may be useful; in a calibration study, 0.95 may be too low. Judge R² together with S, the size of the prediction error in the units of Y, and with the residual plots. A high R² never proves that X causes Y.
What does the slope mean in a regression equation?
The slope is the average change in the predicted Y for a one-unit increase in X. In the pharmacy example, a slope of 4.0 means each extra item on a prescription adds about 4 minutes of turnaround. Its units are units of Y per unit of X.
What is the difference between R² and r?
r is the correlation coefficient, from −1 to +1, and keeps the direction of the relationship. R² is the share of the variation in Y explained by the model, from 0 to 1. With one predictor, R² = r², so R² = 0.64 means r = 0.80 or −0.80 depending on the slope's sign.
Can I use the regression equation outside the data range?
Only with great caution. The equation describes the relationship over the X values that were observed; outside them, the relationship may bend, flatten or break. Predictions far beyond the range are extrapolations, and both their value and their intervals are unreliable.
How is F related to t in simple linear regression?
With one predictor, the F statistic for the regression equals the square of the slope's t statistic, and both give the same p-value. In the pharmacy example, t = 10.58 and F = 112.0. With several predictors, the overall F test and the individual t tests answer different questions.
Sources
- Galton, F. (1886). Regression Towards Mediocrity in Hereditary Stature. Journal of the Anthropological Institute of Great Britain and Ireland, 15, 246–263.
- Montgomery, D. C., Peck, E. A., & Vining, G. G. (2021). Introduction to Linear Regression Analysis (6th ed.). Wiley.
- NIST/SEMATECH e-Handbook of Statistical Methods, §4.1.4.1: Linear Least Squares Regression.
- IASSC™ (n.d.). Lean Six Sigma Green Belt Body of Knowledge, §4.1.2.
- Last reviewed