Back

    Time Series Decomposition: Isolating Seasonal Patterns in Retail Weekly Sales

    Freemium

    Retail

    intermediate
    Retail
    Time Series Decomposition
    STL Decomposition

    Is it your strategy working — or just summer arriving?

    Problem Statement

    The Scenario

    MapleCrest Home & Garden is a 47-store retail chain specialising in outdoor furniture, gardening supplies, and seasonal home décor across the Canadian prairies. The company runs a predictable business rhythm — stores are noticeably busier in spring and summer, and quieter through autumn and winter. But the CFO and the Head of Merchandising are in disagreement. The CFO believes that recent revenue growth is the result of genuine operational improvements — better store layouts, expanded product ranges, and a loyalty program launched 18 months ago. The Head of Merchandising argues that the uptick simply reflects a warmer-than-usual stretch of weather inflating seasonal peaks. Neither argument is grounded in data. The analytics team has been asked to formally decompose three years of weekly sales data to separate out what is driven by long-term trend, what is driven by seasonality, and what is unexplained noise.

    The Statistical Challenge

    The dataset contains 156 weeks of total chain-wide sales (three full years), recorded every Monday. Sales figures follow a classic additive pattern — a rising baseline trend with a repeating annual seasonal cycle layered on top, plus week-to-week random noise. The analytical challenge is to decompose this single time series into its three constituent components using STL decomposition (Seasonal-Trend decomposition using LOESS): the trend component (the underlying direction of the business), the seasonal component (the repeating annual pattern), and the residual component (unexplained variation). Once decomposed, you will quantify what percentage of total sales variance is attributable to each component — directly answering the CFO vs. Merchandising debate.

    What's at Stake

    Understanding the seasonal contribution is not just an academic exercise — it has direct implications for budgeting, staffing, and inventory planning at MapleCrest. If seasonality accounts for the majority of sales variance, the business must plan aggressively around the spring ramp-up and protect itself through the winter trough. If trend explains most of the variance, it suggests the loyalty program and layout changes are genuinely working and warrant further investment. The residual component reveals how much uncertainty remains after both trend and seasonality are accounted for — which directly informs safety stock decisions and demand forecast error bounds. Your decomposition analysis will be the centrepiece of the next quarterly planning review.

    Not Started

    Start Kernel → Load Data → Follow Learning Path → Submit

    This one is on the house! Just → Practice → Add to your Portfolio

    No cells yet. Use the toolbar above to add cells.