{
  "id": "time-series-decomposition",
  "title": "Time Series Decomposition",
  "lang": "en",
  "source_lang": "en",
  "summary": "Time series decomposition separates observations into components such as trend, seasonality, and irregular variation to support interpretation, seasonal adjustment, and forecasting.",
  "category": "mathematics",
  "subcategory": "probability-statistics",
  "type": "concept",
  "aliases": [
    "Seasonal decomposition",
    "Trend–seasonal decomposition"
  ],
  "generated_at": "2026-11-05",
  "model": "pro/gpt-6.1-sol",
  "url": "https://aiwiki.page/en/time-series-decomposition/",
  "translations": {
    "zh-Hans": {
      "url": "https://aiwiki.page/zh/time-series-decomposition/",
      "json": "https://aiwiki.page/zh/time-series-decomposition.json"
    }
  },
  "sections": [
    {
      "heading": "",
      "text": "Time series decomposition is a collection of methods in statistics for separating a time series into components representing different kinds of temporal variation. These usually include a slowly changing trend, a seasonal pattern, and a remainder. Some methods also distinguish cyclical movements, calendar effects, or multiple seasonal patterns. Decomposition is used to describe observed behavior, produce seasonally adjusted data, detect unusual observations, and support forecasting. Its components are estimated under modeling assumptions rather than uniquely revealed by the observations."
    },
    {
      "heading": "Components and mathematical forms",
      "text": "For observations \\(y_t\\) indexed by time \\(t\\), an additive decomposition is\n\n\\[y_t=T_t+S_t+R_t,\\]\n\nwhere:\n\n- Trend–cycle, \\(T_t\\): the underlying level and its relatively slow movements.\n- Seasonal component, \\(S_t\\): variation associated with a recurring calendar or operational period.\n- Remainder, \\(R_t\\): variation not assigned to the other components.\n\nThe trend–cycle is sometimes split into a long-run trend and a cyclical component. This distinction depends on the time scales and definitions adopted. Economic cycles, for example, need not have a fixed duration, whereas seasonality is associated with a recurring period such as a week or year.\n\nSeasonality can be stable or changing. Monthly observations may exhibit an annual pattern with period \\(m=12\\); hourly observations may contain both daily and weekly patterns. In an additive decomposition with \\(K\\) seasonal periods,\n\n\\[y_t=T_t+\\sum_{k=1}^{K}S_t^{(k)}+R_t.\\]\n\nCalendar effects, such as differences in the number of trading days or the dates of moving holidays, may require separate components. They are not always adequately represented by a fixed seasonal pattern.\n\nAdditive and multiplicative decomposition\n\nAn additive model is appropriate when the magnitude of seasonal fluctuations is approximately independent of the series level. A multiplicative formulation,\n\n\\[y_t=T_tS_tR_t,\\]\n\nis useful when fluctuations are roughly proportional to that level. For example, seasonal variation of about 20% has a different interpretation from a seasonal increase of 20 units.\n\nFor strictly positive components, a logarithmic transformation converts the multiplicative relation into an additive one:\n\n\\[\\log y_t=\\log T_t+\\log S_t+\\log R_t.\\]\n\nAdditive seasonal effects are commonly normalized to average zero over a complete seasonal cycle. Multiplicative seasonal indices are often normalized to average one; in log-based formulations, normalization may instead imply a geometric mean of one. Zero or negative observations prevent direct logarithmic transformation.\n\nThe remainder is not automatically measurement error or pure randomness. It may contain outliers, abrupt changes, omitted seasonal patterns, or predictable dependence."
    },
    {
      "heading": "Identification and assumptions",
      "text": "The equation \\(y_t=T_t+S_t+R_t\\) alone does not determine its components. For any sequence \\(a_t\\), replacing \\(T_t\\) with \\(T_t+a_t\\) and \\(R_t\\) with \\(R_t-a_t\\) leaves the observations unchanged. This is a problem of identification.\n\nDecomposition methods therefore impose restrictions, such as:\n\n- smoothness of the trend;\n- a known or estimated seasonal period;\n- repetition or gradual evolution of seasonal effects;\n- zero-average constraints on additive seasonality;\n- specified probability models for component disturbances.\n\nThese restrictions determine what the method calls “trend,” “seasonality,” and “remainder.” Two methods can reconstruct the same observations exactly while producing different component estimates.\n\nThe components are also not necessarily independent or orthogonal. Consequently, the variance of the observations cannot generally be divided into component variances without accounting for covariances."
    },
    {
      "heading": "Classical decomposition",
      "text": "Classical decomposition estimates the trend–cycle using a centered moving average, then estimates seasonality from detrended observations.\n\nFor an odd seasonal period \\(m=2q+1\\), a simple trend estimate is\n\n\\[\\widehat T_t=\\frac{1}{m}\\sum_{j=-q}^{q}y_{t+j}.\\]\n\nFor even periods, an additional centering step is commonly used. Under an additive model, detrended observations are\n\n\\[d_t=y_t-\\widehat T_t.\\]\n\nValues of \\(d_t\\) corresponding to the same seasonal position are averaged across cycles. These averages are normalized to sum to zero, giving the seasonal estimates \\(\\widehat S_t\\). The remainder is then\n\n\\[\\widehat R_t=y_t-\\widehat T_t-\\widehat S_t.\\]\n\nFor a multiplicative model, detrending uses ratios and the final remainder is obtained by division.\n\nMoving-average smoothing is a form of convolution for interior observations. Its weights determine which temporal fluctuations are retained or suppressed.\n\nClassical decomposition is transparent and straightforward, but it has important limitations. Its seasonal pattern is usually fixed over time, unusual observations can distort the averages, and centered filters do not directly provide estimates at the beginning and end of a series. Rapid changes in the underlying level can also be blurred."
    },
    {
      "heading": "Major modern approaches",
      "text": "STL decomposition\n\nSTL, introduced in 1990, stands for Seasonal and Trend decomposition using Loess. It uses local polynomial regression to estimate smooth components through an iterative procedure.\n\nSTL alternates between seasonal and trend estimation. Seasonal smoothing operates on observations from corresponding positions in successive cycles, while trend smoothing captures slower movements. Smoothing-window choices control how quickly the estimated components may change.\n\nAn optional robust procedure reduces the influence of observations with large residuals. This can limit the extent to which isolated extremes distort the trend or seasonal pattern, although it does not establish why those extremes occurred.\n\nSTL allows seasonality to evolve rather than requiring an identical pattern in every cycle. Standard STL is additive; proportional effects can be handled by transforming suitable positive data. Extensions, including multiple-seasonal STL, accommodate several seasonal periods. Calendar effects and missing observations generally require additional treatment.\n\nRegression-based decomposition\n\nComponents can be represented using regression. A model with a linear trend and fixed seasonal indicators may be written as\n\n\\[y_t=\\beta_0+\\beta_1t+ \\sum_{j=1}^{m-1}\\gamma_jD_{j,t}+\\varepsilon_t,\\]\n\nwhere \\(D_{j,t}\\) identifies seasonal position \\(j\\). One seasonal category is omitted to avoid redundancy with the intercept.\n\nMore flexible trends can use piecewise functions or smooth bases. Smoothness penalties connect decomposition to regularization.\n\nSeasonality can also be represented by Fourier terms:\n\n\\[S_t=\\sum_{k=1}^{K} \\left[ a_k\\cos\\!\\left(\\frac{2\\pi kt}{m}\\right) +b_k\\sin\\!\\left(\\frac{2\\pi kt}{m}\\right) \\right].\\]\n\nA small number of harmonics gives a smooth seasonal shape, which can be useful for long seasonal periods. Regression frameworks can also incorporate holidays, trading-day counts, and other explanatory variables. Correlated errors require appropriate modeling when estimating uncertainty.\n\nStructural and state-space models\n\nStructural models treat components as evolving, unobserved stochastic processes. A local linear trend model can be written as\n\n\\[\\begin{aligned} y_t&=\\mu_t+\\varepsilon_t,\\\\ \\mu_t&=\\mu_{t-1}+\\beta_{t-1}+\\eta_t,\\\\ \\beta_t&=\\beta_{t-1}+\\zeta_t, \\end{aligned}\\]\n\nwhere \\(\\mu_t\\) is the level, \\(\\beta_t\\) is the slope, and the disturbance variances control their variability. Seasonal and other states can be added.\n\nIn linear Gaussian models, the Kalman filter estimates states using observations available up to each time. A smoother uses observations from the entire available sample to estimate historical states. Model parameters may be estimated using maximum likelihood or Bayesian inference.\n\nThis approach provides a probabilistic framework for component uncertainty and forecasting, conditional on the model assumptions.\n\nOfficial seasonal-adjustment systems\n\nSystems such as X-13ARIMA-SEATS combine calendar and outlier modeling, time-series extensions, and component extraction. Its X-11 procedures use moving-average filters, while SEATS performs model-based signal extraction from a fitted ARIMA model.\n\nSuch systems are widely used in econometrics and official statistics. Their purpose includes producing comparable seasonally adjusted series under documented processing and revision procedures."
    },
    {
      "heading": "Seasonal adjustment and forecasting",
      "text": "Seasonal adjustment removes estimated seasonal variation without necessarily removing the trend. In an additive decomposition,\n\n\\[y_t^{\\mathrm{SA}}=y_t-\\widehat S_t,\\]\n\nwhereas multiplicative adjustment uses \\(y_t/\\widehat S_t\\). Some published adjusted series also remove estimated calendar effects.\n\nA seasonally adjusted series still contains irregular movements and may contain cycles or structural changes. It is not equivalent to a smoothed trend.\n\nDecomposition does not, by itself, specify a forecasting model. Component forecasts must be constructed and recombined. An additive forecast can take the form\n\n\\[\\widehat y_{n+h\\mid n} = \\widehat T_{n+h\\mid n} + \\widehat S_{n+h\\mid n} + \\widehat R_{n+h\\mid n}.\\]\n\nA simple procedure might extrapolate the trend, repeat recent seasonal estimates, and set the expected future remainder to zero. If the remainder retains predictable dependence, an autoregressive model or another forecasting method may be appropriate.\n\nForecast uncertainty depends on component uncertainty and their dependence. Separate interval widths cannot generally be added to obtain a valid prediction interval. For logarithmic models, exponentiating a forecast of the log series also does not generally yield the mean forecast on the original scale."
    },
    {
      "heading": "Diagnostics and limitations",
      "text": "Residual structure. Remaining seasonality, serial correlation, or changing variability can indicate incomplete decomposition. Removing trend and seasonality does not guarantee that the remainder is a stationary process or independent noise.\n\nEndpoint effects and revisions. Interior estimates can use observations on both sides of a date; estimates near the latest observation cannot. New data can therefore revise historical components, especially recent trend estimates.\n\nSensitivity to settings. Seasonal periods, smoothing windows, transformations, and robustness settings affect the results. An overly flexible trend may absorb seasonal variation, while overly restrictive smoothing may leave genuine level changes in the remainder.\n\nStructural changes and unusual observations. A sudden permanent shift can be mistaken for an outlier or spread over neighboring periods by a smoother. Robust procedures can reduce distortion but may also suppress meaningful exceptional events.\n\nData frequency and missingness. Conventional methods often assume regularly spaced observations. Irregular sampling, leap years, unequal month lengths, and non-integer seasonal periods require suitable handling. Imputation can itself introduce apparent smoothness or periodicity.\n\nForecast evaluation. Using a decomposition fitted to the full dataset before evaluating historical forecasts can leak future information into the evaluation. Time-ordered cross-validation requires fitting preprocessing steps using only the observations available at each forecast origin.\n\nInterpretation. A statistical component is not necessarily a distinct physical or economic mechanism. Decomposition alone does not establish causal relationships, and uncertainty in estimated components may be understated when they are treated as directly observed quantities."
    }
  ],
  "links": [
    "statistics",
    "time-series",
    "natural-logarithm",
    "statistical-identification",
    "variance",
    "covariance",
    "convolution",
    "linear-regression",
    "regularization",
    "fourier-series",
    "stochastic-process",
    "kalman-filter",
    "maximum-likelihood-estimation",
    "bayesian-inference",
    "econometrics",
    "seasonal-adjustment",
    "autoregressive-model",
    "prediction-interval",
    "correlation",
    "stationary-process",
    "missing-data-imputation",
    "cross-validation",
    "causal-inference"
  ],
  "sources": [],
  "license": "https://creativecommons.org/licenses/by/4.0/"
}