Time Series Data Decomposition

Sandhya Krishnan
CodeX
Published in
4 min readOct 9, 2021
George Morina picture from Free Stock Photo

Time Series is a series of data points listed or indexed at successive equally spaced points in time. Time series are used in statistics, signal processing, pattern recognition, econometrics, mathematical finance, weather forecasting, earthquake prediction, electroencephalography, control engineering, astronomy, communications engineering, and largely in any domain of applied science and engineering which involves temporal measurements.

Time series is one type of panel data. The key identifier between both is dimensionality, as panel data is multidimensional and the time series data set is a one-dimensional panel. If the time data field makes the data unique from other records then the dataset is a time-series one whereas if the time data field requires an additional identifier that is not time-related to make a record unique from others, then it clearly states it is a panel dataset. The nontime-related identifier can be airline number, book id, student id, employee id, etc.

Time Series can be decomposed into smaller components that will be easier for us to understand the data in depth. By decomposition, we can analyze each component separately and a deeper understanding of the dataset helps in better forecasting, that is predicting the future with the help of present and past data.

Decomposition of time series can be done with time-series pattern and noise.

Time-series patterns are trend, seasonality, and cyclic.

Trend:

A trend is a pattern of time series in a time plot, which shows the movement of data with respect to time. There are 3 types of trends:

  1. Upward Trend: Here the data pattern movement will be upwards.
  2. Downward Trend: Here the data pattern movement will be downwards.
  3. Horizontal/Stationary Trend: Here the data pattern will have no movement or it will be stationary.

Soon after a movie is released, it will have an uptrend and then after few days or after a month it will have a horizontal trend and later on, it will have a downtrend. Trend component at a time t is represented as Tt and it is usually considered as a long-term trend.

Seasonality:

When the pattern in time series shows a variation for a regular time interval it is called seasonality. Seasonality can be yearly, monthly, weekly, daily, or a specific time of day. Seasonal patterns are always fixed or have a known length.

To understand seasonality, time series can be plotted with a seasonal plot with the individual seasons. Without the decomposition of time plot to seasonal plot allows them to understand the underlying seasonal pattern. For example, if we are plotting stock price for a few years and the time plot will show the seasonality yearly but a yearly seasonal plot can show the monthly seasonality by showing the spikes that stand out more visibly in the residual component which may not be visible earlier. Seasonality component at a time t is represented as St.

In retail sales often increase between September to December and will decrease between January and February.

Cyclic:

The cyclical component refers to fluctuations around the trend. Unlike seasonal patterns which have a fixed and known length, the cyclic pattern does not have a fixed period and the duration is usually at least 2 years. The cyclic component at a time t is represented as Ct.

Noise:

Noise refers to the remaining component apart from trend, seasonal and cyclic in time series and it describes random or irregular influences. The irregular component at a time t is represented as Et.

With these time series components, we can create additive or multiplicative models.

Additive Model:

In the additive model, all the decomposed components are added together and it is a linear model.

Where Yt is the data at the point of time t

Multiplicative Model:

In this model, all the decomposed components are multiplied together and it is non-linear in nature. Multiplicative decompositions are common with economic time series.

Where Yt is the data at the point of time t

Seasonal Adjustment:

Seasonal patterns are always fixed or have a known length and it sometimes hinders or mislead the interpretation of a series. Once these are removed then a better analysis of non-seasonal components can be done.

Seasonal adjustment is the method for removing the seasonal component of a time series. The method depends upon the model created with the decomposed components. Usually in decomposition trend and cyclic are combined together known as a trend -cyclic or sometimes even referred to as a trend even if it has a cyclic component. So we can club Tt and Ct as Tt.

If it is an additive model, the seasonal component is subtracted from the original time series,

Tt is combined Tt and Ct

In the multiplicative model, the original time series is divided by the seasonal component.

However multiplicative model can be transformed into an additive model by performing a log function.

Few methods of seasonal adjustment are X-13-ARIMA, X-12-ARIMA, MoveReg(for weekly data), STAMP, etc

Thanks for reading!!!! If this article was helpful to you, feel free to clap, share and respond.

Reference

https://en.wikipedia.org/wiki/Time_series

--

--