top of page

4.1.3 Residuals Analysis

Residuals Analysis Residuals analysis is the primary tool for validating the assumptions behind many statistical models used in process improvement, especially regression and ANOVA. It focuses on the behavior of the errors (residuals) to judge whether a model is appropriate and whether its conclusions can be trusted. --- Understanding Residuals What Is a Residual? A residual is the difference between an observed value and the value predicted by a fitted model. - Observed value: actual data point (response) - Predicted value: value from the fitted model - Residual: observed − predicted Residuals represent what the model cannot explain. Well-behaved residuals indicate that the model captures the underlying structure of the data adequately. Types of Residuals in Practice For most applications, the following residual types are important: - Raw residuals: observed − predicted - Direct, simple measure of error - Standardized residuals: raw residual divided by an estimate of its standard deviation - Useful for comparing residuals with different variances - Studentized residuals: residuals adjusted for the influence of each point - More sensitive for detecting outliers In most software, default residual plots use either raw or standardized residuals. The interpretation principles are the same, but standardized forms make pattern recognition and threshold-based rules more consistent. --- Core Assumptions Behind Residuals Analysis Residuals analysis is primarily used to check the assumptions underlying linear models such as regression and ANOVA. Key Assumptions - Linearity: relationship between predictors and response is linear (or correctly transformed to be linear) - Independence: residuals are not correlated with each other - Normality: residuals follow a normal distribution (or close enough) - Constant variance (homoscedasticity): residuals have similar spread across the range of predictions or factor levels - No strong outliers or high-leverage anomalies: no single or small group of points drives the model disproportionately Residuals analysis tests these assumptions visually and, when needed, with simple statistics. If violations are serious, model results such as coefficients, p-values, and confidence intervals can be misleading. --- Residual Plots and Their Interpretation Residuals vs Fitted Values Plot This is the central diagnostic plot. - What it shows: residuals on the vertical axis vs fitted (predicted) values on the horizontal axis - What to expect if assumptions are reasonable: - Points scattered randomly around zero - No obvious curve or systematic pattern - Roughly constant vertical spread across the range of fitted values Typical patterns and their meaning - Curved or systematic pattern - Suggests nonlinearity or missing terms (e.g., quadratic, interaction) - Funnel shape (spread increases or decreases with fitted values) - Suggests non-constant variance (heteroscedasticity) - Distinct clusters or bands - Suggests missing categorical variables or subgroups - Isolated large residuals far from the main cloud - Possible outliers requiring further investigation Residuals vs Predictor Plots These plots show residuals vs individual predictors. - Purpose: detect patterns that may not appear in the residuals vs fitted plot, especially when predictors are correlated - Interpretation: as with residuals vs fitted, look for random scatter around zero without curve, trend, or changing spread Residuals vs predictor plots are particularly helpful for identifying the need for transformations or additional terms involving specific predictors. Histogram of Residuals A histogram of residuals helps evaluate normality visually. - Target appearance: - Approximately symmetric - Single peak near zero - Tails that decrease smoothly Common deviations - Strong skewness - May indicate skewed errors; consider transformations of response or robust methods - Multiple peaks - May indicate mixture of different populations or missing factors - Extreme tails - May indicate outliers or heavy-tailed distributions When sample sizes are moderate to large, mild deviations from perfect normality are often acceptable if other assumptions hold and the model is used primarily for estimation and prediction near the center of the data. Normal Probability Plot of Residuals (Normal Q–Q Plot) The normal probability plot is the standard visual tool for evaluating whether residuals are approximately normal. - What it shows: sorted residuals vs theoretical quantiles of a normal distribution - Ideal pattern: - Points fall roughly along a straight line - Small random deviations are acceptable Patterns and implications - S-shaped curve - Residuals may be heavy-tailed or light-tailed relative to normal - Systematic deviation at one end - Skewness; one tail heavier than expected - Isolated extreme points off the line - Potential outliers Normality of residuals is most critical when: - Constructing prediction intervals far from the center - Using small sample sizes - Relying heavily on p-values and exact hypothesis tests --- Checking Independence with Residuals Residuals vs Run Order Plot When data are collected over time, a residuals vs run order (or time) plot is essential. - What it shows: residuals on the vertical axis vs order of data collection on the horizontal axis - What to look for: - No systematic trends over time - No cycles or repeating patterns - No long stretches of residuals with the same sign Common issues - Trend in residuals over time - Suggests a time-related effect not included in the model - Cyclic pattern - Suggests seasonality, shift cycles, or periodic influences - Blocks of positive or negative residuals - Suggests correlation between successive observations (autocorrelation) Autocorrelation in Residuals When residuals are correlated, standard errors and tests can be distorted. - Signs of autocorrelation: - Residuals-alternating high and low in smooth waves - Clustering of similar residual signs over time - Implications: - Underestimation or overestimation of variability - Overstated significance of effects If residual plots suggest autocorrelation, consider models or designs that explicitly handle time-dependent structure rather than relying on standard regression or ANOVA alone. --- Constant Variance and Homoscedasticity Recognizing Non-Constant Variance Constant variance means that residuals have similar spread across fitted values or factor levels. Diagnosing issues - Residuals vs fitted values: - Funnel shape (narrow at one end, wide at the other) - Spread increasing or decreasing with level of prediction - Residuals vs predictors: - Spread changing with certain predictors - Residuals by group: - Some groups show much larger variance than others Consequences of Non-Constant Variance - Standard errors become unreliable - Confidence intervals and hypothesis tests may be inaccurate - Predictions for regions with larger variance are less precise than the model suggests Practical Remedies When residual analysis indicates non-constant variance, consider: - Transforming the response: - Common choices: log, square root, Box–Cox transformation - Aim: stabilize variance across the range of fitted values - Using different variance structures: - Weighting observations if some are inherently more variable - Modeling variance directly when software supports it - Segmenting the model: - Fitting separate models for distinct regions or groups if justified Any modification should be re-checked with residual plots to confirm improvement. --- Nonlinearity and Model Form Detecting Nonlinearity Nonlinearity means that the true relationship between predictors and response is not well approximated by a simple linear model. Indicators in residual plots - Curved shapes or systematic patterns in: - Residuals vs fitted values - Residuals vs key predictors - Residuals consistently positive in one range and negative in another Addressing Nonlinearity If residuals clearly suggest nonlinearity: - Add polynomial terms: - Quadratic, cubic, or higher-order terms for specific predictors - Add interaction terms: - When effects depend on combinations of predictors - Transform variables: - Logarithmic, reciprocal, or other transformations to linearize relationships Each adjustment must be followed by a fresh residuals analysis to verify that linearity assumptions are now more appropriate. --- Outliers and Influential Points Identifying Outliers in Residuals Outliers are observations with large residuals relative to the rest of the data. - Indicators: - Residuals much larger in magnitude than others - Points far from the main pattern on residuals plots - Extreme points on a normal probability plot Standardized or studentized residuals help make this more precise: - Values beyond about ±2 or ±3 (depending on sample size and context) may be considered large Distinguishing Outliers from Influential Points - Outliers in y: - Large residuals but typical predictor values - Leverage points: - Unusual predictor values, even if residuals are small - Influential points: - Observations that, if removed, would significantly change model coefficients or fit Residuals analysis focuses mainly on outliers in the response, but awareness of leverage and influence aids proper interpretation of residuals. Handling Outliers When outliers are detected: - Investigate the cause: - Data entry errors - Measurement problems - Special causes or rare events - Decide on treatment based on understanding: - Correct errors when justified - Remove clearly invalid points - Retain valid but unusual points, possibly modeling them separately if they represent a different process or condition After any changes, refit the model and repeat the residuals analysis to confirm improvement and stability. --- Residuals in ANOVA and Designed Experiments Residuals from ANOVA Models In ANOVA and designed experiments, residuals are again observed − fitted values, but the fitted values come from group means or model terms based on factor levels. Residuals analysis checks whether: - Variation within groups is consistent across factor levels - Model structure captures the main systematic effects - Conclusions about factor significance are based on valid assumptions Residuals by Factor Levels Useful diagnostic views include: - Residuals vs factor levels: - For each factor, plot residuals by level - Boxplots or spread by group: - Compare the distribution of residuals within each level What to look for - Symmetric distributions centered around zero in each group - Similar spread (variance) across levels - No systematic pattern that aligns with factor levels When multiple factors and interactions are present, residuals analysis helps confirm that the chosen model adequately accounts for systematic variation before interpreting main effects and interactions. --- Practical Workflow for Residuals Analysis Step-by-Step Approach A concise, repeatable sequence: - Fit the chosen model (regression or ANOVA). - Compute and store residuals (preferably standardized or studentized). - Examine residual plots: - Residuals vs fitted values - Residuals vs key predictors - Residuals vs run order (for time-ordered data) - Histogram of residuals - Normal probability (Q–Q) plot of residuals - Look for: - Random scatter around zero - Constant spread - Approximate normality - No strong time patterns - Absence of extreme outliers or influential points - If patterns or violations appear: - Consider transformations, additional terms, or alternative model forms - Investigate outliers or anomalies - Refit and re-check until assumptions are adequately satisfied for the intended use of the model. Interpreting Imperfections In real data, residuals rarely behave perfectly. The key is judgment: - Minor deviations: - Often acceptable, especially with larger samples and modest model goals - Major or systematic violations: - Require action (model change, transformation, additional variables, or rethinking data structure) The purpose of residuals analysis is not perfection, but reliable conclusions and predictions based on a model that adequately reflects the data and process behavior. --- Summary Residuals analysis evaluates how well a model fits the data by focusing on the unexplained portion of each observation. It checks core assumptions of linearity, independence, normality, and constant variance, and it helps uncover outliers and influential points. Key tools include residuals vs fitted values, residuals vs predictors, residuals vs run order, histograms, and normal probability plots. Interpreting these plots guides decisions about model form, transformations, treatment of outliers, and the overall reliability of statistical conclusions. By systematically applying residuals analysis, models become more trustworthy, and subsequent process decisions rest on sound statistical foundations.

Practical Case: Residuals Analysis A medical device factory is trying to predict assembly time for a new catheter product using a linear regression model with operator experience and batch size as predictors. The model’s R² looks acceptable, but some lines still miss takt time. The Black Belt suspects that “something systematic” is not captured by the model. She runs a residuals analysis on the regression. She plots residuals vs. fitted values by production line. On Line 3, most residuals are positive and increase as fitted time increases. On Line 1 and 2, residuals are centered around zero with no pattern. She then looks at residuals by shift. Residuals on the night shift of Line 3 are consistently higher, especially for larger batch sizes. A residuals-by-order-date plot shows the problem started right after a layout change on Line 3. This pattern in the residuals shows that: - the current model systematically underestimates assembly time on Line 3 night shift, and - the layout change is likely a key missing factor. The team adds “line” and “shift” as categorical factors and includes a “batch size × line” interaction. After refitting, residuals are now randomly scattered around zero across lines and shifts, with no visible patterns. As a result, the new model correctly predicts when Line 3 night shift will miss takt time. The supervisor uses these predictions to rebalance work and adjust staffing before problems occur, reducing overtime and late orders on that line. End section

Practice question: Residuals Analysis In a regression model used to predict cycle time from number of operators, a Black Belt examines the residuals vs. fitted values plot and observes a clear funnel shape, with residuals spreading out as fitted values increase. Which assumption of the regression model is most likely violated? A. Linearity B. Independence of errors C. Normality of residuals D. Constant variance of errors Answer: D Reason: A funnel shape (increasing spread of residuals with fitted values) indicates heteroscedasticity, i.e., violation of the constant variance assumption of the error term. Other options are less appropriate: the pattern specifically reflects non-constant variance, not necessarily a non-linear relationship, dependence, or non-normality. --- A Black Belt has a regression model with 60 observations and 3 predictors (including intercept). The residual standard error (s) is 4.0 units. The sum of squared residuals (SSE) is closest to: A. 228 B. 912 C. 960 D. 1024 Answer: B Reason: Degrees of freedom for error = n − p = 60 − 3 = 57. SSE = s² × df = 4² × 57 = 16 × 57 = 912. Other options are inconsistent with the SSE formula using the given s and degrees of freedom. --- In a DOE analyzing the effect of two factors on tensile strength, the normal probability plot of residuals shows systematic curvature, and the Anderson–Darling test for normality yields p = 0.002. What is the most appropriate next step for the Black Belt? A. Conclude that the model is adequate; proceed with factor interpretation B. Apply a suitable transformation to the response and refit the model C. Remove the largest residual and re-run the normality test D. Add more replicates at current factor settings without changing the model Answer: B Reason: A strongly non-normal residual pattern (curvature in normal plot and low p-value) suggests the need for a variance-stabilizing or normalizing transformation, then refitting the model. Other options ignore the clear lack of normality, treat it by deleting data, or add replicates without addressing model form, which is not best practice. --- A Black Belt checks the residuals from a time-ordered regression model of throughput versus staffing. The residuals vs. time plot shows long runs of positive residuals followed by long runs of negative residuals. Which conclusion is most appropriate? A. The model errors exhibit autocorrelation and time dependence B. The model errors are independent and identically distributed C. The model errors are homoscedastic and normally distributed D. The model is overfit and should have fewer predictors Answer: A Reason: Long runs of consecutive positive or negative residuals over time indicate autocorrelation and violation of the independence assumption. Other options incorrectly conclude adequacy of assumptions or misattribute the issue to overfitting rather than dependence across time. --- In validating a multiple regression model for defect count, the Black Belt examines leverage and studentized residuals. One observation has very high leverage but a small studentized residual. How should this point be interpreted? A. It is an influential outlier and must be removed from the dataset B. It strongly affects model fit and indicates model misspecification C. It is a structurally important point but not currently problematic D. It has no impact on the model and can be ignored in diagnostics Answer: C Reason: High leverage means the point is in an extreme region of predictor space; a small studentized residual indicates it fits the model well, so it is structurally important but not an outlier at present. Other options either overstate the need to remove it, assume misspecification without evidence, or understate its potential influence.

bottom of page