Module · 5 lessons

Components and Decomposition

Pull a series apart into trend, seasonality, and residual — additive versus multiplicative models, decomposition by hand, and the robust STL method.

At a glance

Level
Intermediate
Lessons
5 lessons
Time to complete
1 week
Cost
Free forever · no sign-up

Welcome to Components and Decomposition, the second module of the course. Module 1 established the Cyclepath series, an honest test set, and a baseline to beat. Now you stop treating that series as one signal and pull it apart into the pieces that make it up: a slow-moving trend, a repeating seasonal pattern, and whatever’s left over — the residual. Decomposition isn’t just a diagnostic; it’s the lens every technique in this course looks through, from choosing SARIMA’s seasonal order to deciding whether a series needs differencing.

You’ll start with the idea of decomposition — why splitting a series into trend, seasonality, and residual makes it easier to understand and model. You’ll then build a classical decomposition by hand, using nothing but a centered moving average, and confirm it matches what a library function gives you for free. You’ll formalize the choice between additive and multiplicative models — does the season swing by a constant amount, or by a constant percentage of the level? — and see why that choice matters. Finally, you’ll meet STL, a more robust decomposition that handles outliers and changing seasonality better than the classical method. The module ends with a guided project that decomposes the full Cyclepath series and interprets every component.

Every number in this module is computed for real with pandas, numpy, and statsmodels on the seeded Cyclepath series — the same series from Module 1, so nothing here is contrived. Start with Lesson 1 on what trend, seasonality, and residual actually mean.

Lessons in this module

Achievement

Complete all 5 lessons to finish the Components and Decomposition module.

Start module