AI Glossary / Probabilistic machine learning / Intermediate

Structural time series model

Definition

A structural time series model represents an observed series through interpretable latent components, such as a changing level, trend, seasonality, cycle, and irregular variation. It specifies how these unobserved components evolve over time and how they combine to generate observations. Many common versions are expressed as state-space models and estimated using filtering and smoothing.

What it means

A series can rise because its underlying level has changed, because it is entering a busy season, or because of a temporary disturbance. Structural models separate these possibilities through explicit assumptions about component behavior.

The word structural refers here to the time series' component structure. It does not automatically mean a structural causal model. A fitted promotional effect or changing trend is not, by itself, evidence of what would happen under an intervention. Components are inferred quantities whose interpretation depends on the specification, data, and constraints used to distinguish them.

How it works

An observation equation combines the latent components and any regression effects, usually with measurement or irregular noise. State equations describe their evolution. A local level can follow a random walk; a local trend can include a slope that itself changes; seasonal components can repeat deterministically or evolve stochastically.

Component disturbance variances determine how flexible these movements are. Zero disturbance variance can make a component deterministic under its specified transition. Large variance allows more rapid changes, but flexibility can also absorb effects that belong elsewhere in the model.

For linear Gaussian specifications with known parameters, Kalman filtering updates state estimates sequentially, while smoothing uses later observations to revise earlier states. Unknown parameters may be estimated by likelihood methods or Bayesian inference. Forecasts propagate both state uncertainty and future disturbances. Decomposition and prediction therefore depend on the complete model, not just an attractive plot of component estimates.

Three practical examples

1. Demand planning: separate a changing baseline from recurring calendar effects and specified promotional regressors. Evaluate forecasts at the horizons used for actual replenishment decisions.

2. Capacity monitoring: track an evolving workload level while distinguishing short-lived observation noise. Check whether abrupt operational changes require explicit intervention terms or a revised model.

3. Service analysis: estimate weekly or annual patterns in recorded activity. Compare filtered and smoothed component estimates carefully when discussing what was knowable at a particular historical date.

Think of it this way

Think of listening to a recording with a background hum, a repeating rhythm, and occasional bursts. A structural model specifies how those parts combine and how they may change. Separating them is useful, but several combinations can sometimes explain the same recording, so the separation is not direct observation of each source.

Worked example

Consider an original local-level example, the simplest structural model. Let the observation equal the latent level plus independent Gaussian noise of variance 9. Let the level evolve as its previous value plus independent Gaussian process noise of variance 1. Treat both variances as known.

After yesterday's observations, suppose the estimated level has mean 100 and variance 4. Today's predicted level mean remains 100, while its variance becomes 4 + 1 = 5. Today's observation is 107, so the prediction error is 7 and its variance is 5 + 9 = 14.

The Kalman gain is 5 divided by 14. Updating gives level mean 100 + (5 divided by 14) times 7 = 102.5. The updated level variance is (1 minus 5 divided by 14) times 5 = 45 divided by 14, approximately 3.2143.

Tomorrow's observation forecast has mean 102.5 and variance 45 divided by 14 + 1 + 9 = 185 divided by 14, approximately 13.2143. The model has attributed only part of today's increase to a changing level because observation noise is substantial. Adding seasonal or regression components would change this calculation; none are silently included in the toy.

Illustrative case study

Fictional case: Hazel Services forecasts daily incoming work. Analysts compare a local-level model with versions that include a weekly seasonal component and known closure-day effects. They use rolling forecast evaluations so that each test forecast uses only information available at its issue date.

The team checks whether a newly introduced process changes the baseline or simply alters reporting timing. It records that smoothed historical levels can change after later data arrive. Operational planners receive forecast distributions and assumptions about future regressors, not just one extrapolated line. This fictional case describes a modeling workflow without claiming measured forecast improvement.

Common misconceptions and mistakes

A structural time series model is not automatically causal or free from model assumptions. Estimated components are not directly measured truths. Including both a very flexible trend and flexible regressors can make their separate roles difficult to identify. Do not use smoothed states from the full dataset as though they were real-time forecasts, and do not forget uncertainty in future regressors or estimated parameters when that uncertainty matters.

Business use

The business value is an interpretable framework linking forecasts to changing baselines and recurring patterns. Its usefulness depends on whether those components reflect the decision context and whether out-of-sample performance supports the specification. Teams should document component choices, disturbance assumptions, seasonal periods, parameter estimation, and forecast-origin information. An understandable decomposition can support discussion, but it still needs quantitative validation against simpler alternatives.

People also ask

Must all components be included?

No. Select components justified by the series and purpose; a local-level model is already a structural model.

Can seasonal effects change over time?

Yes, if the seasonal state equation permits stochastic evolution.

What is the difference between filtering and smoothing?

Filtering uses observations available through the relevant time, while smoothing can also use later observations.

Check your understanding

Answer: 1.

Why is today's predicted level variance 5 rather than 4?

Answer: The process disturbance adds variance 1.

Answer: 2.

Why does the level estimate move to 102.5 rather than 107?

Answer: The model balances uncertain prior state information against noisy observation information.

Answer: 3.

Does a fitted regressor coefficient prove causal impact?

Answer: No. That requires additional assumptions and an appropriate causal design.

Related terms

  • Kalman filter
  • Smoothing
  • State-space model
  • local level
  • local linear trend
  • seasonality
  • dynamic regression
  • forecast distribution

Learn next

Work through the local-level prediction and update equations. Then add a seasonal component and compare deterministic with stochastic evolution. Finally, practice rolling-origin evaluation and distinguish historical decomposition from real-time forecasting.

More in Probabilistic machine learning

  • Stochastic weight averaging Gaussian approximation - Stochastic weight averaging Gaussian approximation, usually called SWA-Gaussian or SWAG, fits a Gaussian distribution over neural-network parameters using...
  • Straight-through estimator - A straight-through estimator is a training rule that substitutes a usable derivative for the derivative of a hard or discrete operation during backpropagation.
  • Stratified resampling - Stratified resampling is a particle-resampling method that divides the unit interval into equally sized strata, draws one independent uniform value within...
  • Structured kernel interpolation - Structured kernel interpolation, or SKI, approximates a covariance kernel using interpolation from a set of inducing or interpolation points.
  • Structured mean field variational inference - Structured mean field variational inference approximates a difficult posterior using a tractable distribution that preserves selected dependencies among...
  • Submodular optimization - Submodular optimization seeks to minimize or maximize a set-valued objective with a diminishing-returns property.

Sources

Statsmodels' official UnobservedComponents documentation describes structural time series components and their state-space specifications: https://www.statsmodels.org/stable/generated/statsmodels.tsa.statespace.structural.UnobservedComponents.html

Särkkä, Bayesian Filtering and Smoothing, explains linear Gaussian filtering calculations: https://users.aalto.fi/~ssarkka/pub/cup_book_online_20131111.pdf

The local-level calculation and Hazel Services case are original teaching examples; the case is fictional.

Independent review consulted the official component equations and Särkkä Section 4.3, including the Gaussian random-walk filter example.

Previous: Structural term Next: Structure from motion

  • 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