Skip to content
ML Academy

Time series and forecasting · insight-1237

Look for outliers in the robust STL remainder, because thresholds on the raw series flag seasonal peaks

Evidence type
documented fact
Difficulty
medium
Roles
Data analyst, Data scientist
Industries
energy, retail, logistics

Summary: situation, action, reason, boundary

  1. Situation

    A z-score rule on daily demand flags every December peak and misses a one-day system-outage dip in March.

  2. Action

    Fit a robust STL with the right period, take the remainder, and flag points far outside the quartiles using a wide IQR fence. Investigate each flag, replace it if it is an error or will not recur, and keep it if it carries information.

  3. Reason

    After trend and seasonality are removed, anomalies stand out in the remainder. The FPP3 chapter prefers a three-IQR fence over 1.5 IQR, which would flag about 7 in 1,000 normally distributed values.

  4. Boundary

    Daily or weekly demand, traffic and load series with strong seasonality.

Symptom or risk

Genuine seasonal peaks are capped or removed, while real anomalies that sit inside the seasonal range pass unnoticed, and the model learns a distorted pattern.

Exceptions

Where seasonality is itself changing quickly, the remainder inherits that misfit and flags clusters.

Trade-offs

A wider fence misses moderate anomalies; a narrower one produces a review queue nobody clears.

Pitfalls

Replacing every flagged point automatically, which also deletes real promotions and weather events.

Lessons and concepts

Claims and their sources