AI Glossary / Time series and signal processing / Intermediate

Diagnostic checking

Definition

Diagnostic checking is the examination of a fitted model for signs that its assumptions or structure are inadequate for the intended use. In time-series forecasting, it commonly includes investigating residuals for bias, remaining dependence, unusual observations and changing variability. The findings help identify possible improvements and limitations; they do not certify that a model is true or optimal.

What it means

Fitting a model produces estimated parameters and fitted values, but those outputs are only part of the analysis. Diagnostic checking asks whether the unexplained part of the data still contains patterns relevant to the model's purpose. It can also reveal data problems or features that affect the interpretation of uncertainty.

The checks depend on the model. Normality may matter for an interval calculation without being necessary for every point-forecasting method. Uncorrelated residuals provide evidence about remaining linear predictability, but do not prove independence or establish that no alternative model could perform better.

How it works

Start with the data definition, timing, transformations and residual convention. In a forecasting model, observed-minus-fitted residuals may differ from genuinely out-of-sample forecast errors because parameters were estimated using the full training series. Innovation residuals on the model's working scale may be the relevant quantity for assumption checks.

Inspect a residual time plot, summary statistics, an autocorrelation plot and other displays appropriate to the assumptions. Look for systematic level errors, seasonal patterns, changing spread and influential observations. Formal tests can supplement these views, but their reference distributions and degrees of freedom must suit the fitted model.

Investigate the cause of a finding before changing the model. Refit when justified, repeat the relevant diagnostics, and assess predictive performance using separate validation. Record limitations that remain. A diagnostic workflow combines statistical evidence, context and the consequences of the intended application.

Three practical examples

1. Demand forecasting: An analyst notices residual peaks at the same season each year. She checks whether the model omitted a recurring seasonal effect and evaluates a revised specification on later periods.

2. Sensor modeling: A residual plot shows larger variation when measurements are high. The team investigates the error scale and uncertainty calculation rather than assuming that one constant spread describes all readings.

3. Service planning: Forecast residuals shift after a reporting-system change. Analysts first check whether the recorded quantity changed before interpreting the shift as a real change in demand.

Think of it this way

Think of checking the marks left after a surface has been cleaned. A repeated pattern may reveal where the cleaning process missed something, while an isolated mark may have a different explanation. Examining what remains is informative, but a clean-looking surface alone does not prove that every aspect of the process was appropriate.

Worked example

Consider eight residuals: -2, -2, -2, -2, 2, 2, 2, 2. Their sum is zero and their mean is zero. Looking only at the mean would miss that negative residuals occur together before positive residuals occur together.

Using the common sample autocorrelation formula with the overall residual mean and the full sum of squared deviations in the denominator, the lag-one numerator is 4 + 4 + 4 - 4 + 4 + 4 + 4 = 20. The denominator is eight times 4, or 32. The lag-one sample autocorrelation is therefore 20/32 = 0.625.

This tiny sequence illustrates that zero mean does not imply absence of serial structure. It is not sufficient for a dependable significance test or a claim about a fitted model's population errors. A time plot would prompt investigation of a level change, missing structure or another explanation before choosing a remedy.

Illustrative case study

In a fictional case, Maple Distribution accepts a forecasting model because its average training residual is almost zero. A reviewer plots the residuals in time order and sees extended runs above and below zero. The team investigates a change in product availability and compares alternative specifications using historical forecast origins.

It also checks whether the original residual mean was constrained by the fitting method, making that result less reassuring than management first assumed. The fictional lesson is that one favorable summary is insufficient. No numerical business benefit is asserted, and the diagnostic pattern does not identify its cause without further evidence.

Common misconceptions and mistakes

A large p-value does not prove that residuals are independent or that the model is correct. A small p-value flags incompatibility with a particular null model under assumptions; it does not automatically identify the appropriate replacement.

Checking many lags separately increases the chance of a misleading isolated signal. Fitted-parameter effects can alter test degrees of freedom. Normal residuals are not a universal requirement, and a visually symmetric histogram says little about time dependence. Finally, training residuals cannot replace evaluation on future observations, especially when a flexible model has been selected after many trials.

Business use

Diagnostic checking makes model use more accountable by connecting observed problems with decisions about revision, monitoring and uncertainty. It is useful before deployment and after important data or process changes.

Choose checks that address the actual forecasting horizon and error assumptions. Keep the reasoning behind model changes, including why an apparent anomaly was retained or investigated. Compare revised forecasts with a baseline and assess interval coverage when intervals inform decisions. When diagnostics remain problematic, explain the practical limitation and identify the evidence needed to resolve it. Do not present a passed checklist as a guarantee of future performance.

People also ask

Are residuals and future forecast errors identical?

No. Residuals arise from a fitted sample, while future errors involve observations unavailable when the forecast was made.

Does a zero residual mean establish a good model?

No. Other patterns may remain, and some fitting procedures force that mean to zero.

Must all residuals be normally distributed?

No. The requirement depends on the method and inference being used.

Can diagnostics select the best forecasting model alone?

No. Predictive evaluation and the intended use also matter.

Check your understanding

What is the example's mean residual?

Answer: It is zero.

What is its lag-one sample autocorrelation under the stated convention?

Answer: It is 0.625.

Why inspect residuals in time order?

Answer: Temporal patterns disappear when the sequence is reduced to a single average or unordered distribution.

Related terms

  • Residual
  • Autocorrelation
  • Ljung-Box test
  • Prediction interval
  • innovation
  • heteroscedasticity
  • model specification
  • forecast validation

Learn next

Learn next how residual diagnostics differ from out-of-sample accuracy measurement, how portmanteau tests account for fitted models, and how transformations affect residual interpretation. Practice connecting each diagnostic finding to a specific question rather than changing models automatically.

  • Residual

More in Time series and signal processing

  • Cumulative forecasting - Cumulative forecasting predicts the total amount of a variable over several future periods.
  • Curve fitting - Curve fitting is the process of choosing parameters of a mathematical function so that the function approximates observed data according to a stated criterion.
  • Delphi method - The Delphi method is a structured process for collecting and refining judgments from a panel through repeated rounds of questions and controlled feedback.
  • Difference-equation filtering - Difference-equation filtering computes a discrete-time output from weighted current and past inputs and, in recursive filters, past outputs.
  • Differencing - Differencing is a time-series transformation that replaces observations with changes between observations at a specified lag.
  • Error cost function - An error cost function assigns a loss or cost to a forecasting error.

Work in finance? Get the free CFO AI Prompt Pack: 7 prompts for finance leaders.

Sources

Hyndman and Athanasopoulos, Forecasting: Principles and Practice, Fitted values and residuals and Residual diagnostics: https://otexts.com/fpp3/toolbox.html . Makridakis, Wheelwright and Hyndman, Glossary of Forecasting Terms: https://robjhyndman.com/mwh3/FG4.pdf . The primary forecasting sources were consulted for diagnostic scope and limitations. The residual sequence and autocorrelation arithmetic are original and independently checked.

Previous: Diagnostic analytics Next: Diagonal linear discriminant analysis

  • Home
  • Daily AI Updates
  • Blog
  • AIFBL Academy
  • AI Glossary
  • Products and Tools
  • Store
  • Free CFO AI Prompt Pack
  • About Shihan Sheriff
  • Privacy Policy
  • Terms of Use
  • Refund Policy
  • Cookie Policy
  • Earnings Disclaimer