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
Situation
A z-score rule on daily demand flags every December peak and misses a one-day system-outage dip in March.
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.
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.
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
FPP3 identifies outliers by fitting a robust STL and flagging remainder values more than three IQRs beyond the quartiles, and advises against replacing outliers automatically because they may carry information.