Additive vs Multiplicative Decomposition
Swipe to show menu
Understanding how to break down time series data into its underlying components is crucial for effective analysis. Two primary approaches are additive decomposition and multiplicative decomposition. In an additive model, the componentsβtrend, seasonality, and residualβcombine through simple addition. The relationship is described as:
TimeΒ series=Trend+Seasonality+ResidualThis model is appropriate when the seasonal fluctuations and noise remain roughly constant over time, regardless of the trend. For instance, if monthly sales increase by about 100 units every December, regardless of whether the overall sales trend is rising or falling, the additive approach is suitable.
In contrast, a multiplicative model assumes the components interact through multiplication:
TimeΒ series=TrendΓSeasonalityΓResidualUse the multiplicative model when the magnitude of seasonal variation grows or shrinks in proportion to the trend. For example, if sales double during the holidays only when the overall sales trend is high, and the seasonal effect scales with the level of the series, a multiplicative decomposition better captures this pattern.
12345678910111213141516171819202122232425262728293031323334353637import numpy as np import pandas as pd import matplotlib.pyplot as plt # Simulate time series data np.random.seed(42) periods = 72 # 6 years of monthly data time = np.arange(periods) trend = 10 + 0.5 * time # Additive seasonal component seasonal_additive = 5 * np.sin(2 * np.pi * time / 12) # Multiplicative seasonal component seasonal_multiplicative = 1 + 0.3 * np.sin(2 * np.pi * time / 12) # Additive model: constant seasonality additive_series = trend + seasonal_additive + np.random.normal(0, 2, periods) # Multiplicative model: seasonality grows with trend multiplicative_series = trend * seasonal_multiplicative * (1 + np.random.normal(0, 0.05, periods)) # Plot both series fig, axs = plt.subplots(2, 1, figsize=(10, 8), sharex=True) axs[0].plot(time, additive_series, label="Additive Series") axs[0].set_title("Additive Seasonal Pattern") axs[0].set_ylabel("Value") axs[0].legend() axs[1].plot(time, multiplicative_series, label="Multiplicative Series", color="orange") axs[1].set_title("Multiplicative Seasonal Pattern") axs[1].set_xlabel("Time (Months)") axs[1].set_ylabel("Value") axs[1].legend() plt.tight_layout() plt.show()
Choosing between additive and multiplicative decomposition depends on the characteristics of your data. If the amplitude of the seasonal pattern remains steady as the trend changes, the additive model is usually best. If the seasonal effect becomes more pronounced as the data grows or shrinks, the multiplicative model captures this scaling behavior more accurately. Always visualize your data and consider the nature of both the trend and seasonality before selecting a decomposition approach.
Thanks for your feedback!
Ask AI
Ask AI
Ask anything or try one of the suggested questions to begin our chat