Forecasting Stories 3: Each Time-series Component Sings a Different Song
With time-series decomposition, we were able to infer that the consumers were waiting for the highest sale of the year rather than buying up-front.
By Rajneet Kaur, Data Scientist
For Canada, Q1 and Q2 had performed much lower YOY, even though Q3 was higher YOY
Eric was handling marketing for North America for a top OEM, and sales pattern for Canada from Q1 to Q3 seemed to be changing. Making sense of changes and finding pattern in chaos is a consultant's job. The one thing that helped when Eric raised this question to me - was time-series decomposition.
A rich diagnostic tool is decomposing a dataset into its components, i.e. Trend, Seasonality, Cyclical and Irregular/Random
Specially, if a forecast is not behaving as per the set expectations, debugging if one of the components and their percentage contribution has changed, can help. In R or Python, a one liner code such as plot(decompose(time_series)) or decompose(time_series, type='multiplicative') does the job. Now, why is it important and how could we interpret the results?
- A trend can change for various reasons – competitor entry, increasing own product lines, technology changes, economic or social influences etc.
- Seasonality may change due to a shift in weather, or because of consumer behavior. In addition, calendar driven seasonality may differ if the week of event differs YoY, 'Good Friday' for example. You can read my articles Forecasting Stories 2 and Forecasting Stories 1 for a better grasp.
- Irregularity is the component that is not predictable, has no logic. How do you think this can help then? If the percentage composition of this component is increasing, it means that some new and critical event or variable is not considered into your predictive models. It is essential to ensure that regressors like price, marketing spends or any such influencers are input to your models.
- Note: Deciding whether decomposition should be of type additive or multiplicative is an important call. The golden rule is that if the amplitude or the peak-dip length seems to be increasing or decreasing along with the trend, we choose multiplicative. The default method is additive.
Now, stitching back the pieces of the Canada story, the non-event periods were getting lower, while the events were peaking. Hence while the overall trend fell slightly, seasonal component changed over the years. Why so?
This is a clear case of shifting consumer behavior - consumers were waiting for the sales of the Thanks giving/Cyber Monday(key events in US) when discounts can be >50%
As we can see in the graph below, the orange line which is the trend seems to fall from 48K to 38K in 3 years. The seasonal peaks (blue) meanwhile rise from ~120% to ~130% over the years.
We can try to infer that the consumers were waiting for the highest sale of the year rather than buying up-front. Since the product itself is high-priced and non-essential, consumers prefer to buy them at a fraction of the price when discounts are high, even if they have to wait. Eric welcomed the insight and his team started working towards leveraging Thanksgiving/Cyber Monday to further increase sales.
Hope you enjoyed the story. In case you are in the problem solving stage of a Data-science/Analytics project, you could also read my article on Analytics Frameworks. Would love to know any feedback.
Bio: Rajneet Kaur is a passionate and result-driven marketing and data science executive with 6 years of business and technology experience.
Original. Reposted with permission.
- Forecasting Stories 2: The Power of a Seasonality Index
- Forecasting Stories: Is it seasonality or not?
- How do we Better Solve Analytics Problems?