Now that we are done with data cleaning, we can start building models for forecasting the future. But before that, we will understand how a time series can be split into its various components that is the trend, seasonality, and residuals (residual is the part left over after extracting trend and seasonality from the time series).

Firstly, why do we need to decompose the time series data? Not all time-series cannot be visually inspected to understand the seasonal pattern. But to understand the components such as trend and seasonality better, it is important to decompose the time-series, as you will learn in the upcoming videos.

You had learnt that time-series data mostly has two major components : trend and seasonality. If you think about it, the data can be decomposed to extract these two components individually. On inspection of these components, you will understand which methods to apply to capture the seasonal effects of the time-series. When you have finally learnt all the methods towards the end of time-series forecasting – II, you will have learnt some advanced methods that capture seasonal effects better.

Before applying these methods, the decomposition of the time-series data will help you realise whether there is seasonality present in the time-series data or not.

There are two ways in which the time-series data can be decomposed:

**Additive Decomposition**– the individual components such as trend, seasonality and random noise can be added together to get the original time-series data.**Multiplicative Decomposition**– the individual components such as trend, seasonality and random noise can be multiplied together to get the original time-series data

In this video, let’s first understand how to decompose a time series dataset and then understand the difference between an additive and multiplicative decomposition.

You learnt that time series can be decomposed in two ways.

**Additive Decomposition**- When the magnitude of the seasonal pattern in the data does not directly correlate with the value of the series, the additive seasonal decomposition may be a better choice to split the time series so that the residual does not have any pattern. This means, that for every seasonal pattern in the time series, the distance between the peaks and the troughs remains the same. Check the below graph for the same.
- Imagine that you are viewing a time series data of rainfall in a city where there is no difference in the average rainfall received during the last 10 years. In this case, since the average rainfall is the same during the 10 years, the seasonal peaks will almost remain the same height and thus we can use additive decomposition over this data. Additive decomposed time series have a linear variation in the trend.
**Multiplicative Decomposition**- When the magnitude of the seasonal pattern in the data increases with an increase in data values and decreases with a decrease in the data values, the multiplicative seasonal decomposition may be a better choice. This means, that for every seasonal pattern in the time series, the distance between the peaks and the troughs keeps increasing. Check the below graph for the same.

Imagine that you are viewing a time series data of rainfall in a city where now, there is a difference in the average rainfall received during the last 10 years and this keeps increasing every year. In this case, since the average rainfall is increasing during the 10 years, the seasonal peaks will also now keep increasing or the distance between the troughs and the peaks will increase as you progress through the time-series. Multiplicative decomposed time series have a non-linear variation in the trend.