← Back to the chapter · Previous detail

Technical detail · Time-Series Anomalies: Statistical Methods

Guard zero variance and adaptive baselines

Guard cases should be explicit in the implementation. If a baseline window contains 30 identical values after a sensor freeze, the standard deviation is zero and a z-score cannot be computed honestly. The detector should switch to a sensor-health alert or domain-bound check, keep the zero-variance state with the incident, and avoid presenting the result as a normal statistical anomaly.

Adaptive baselines need their own guardrail. During a pump bearing fault, vibration may rise gradually for several hours. If the rolling baseline updates every minute with no freeze rule, the abnormal trend becomes the new normal before anyone reviews it. A safer design freezes updates during open incidents, stores the held baseline id, and resumes learning only after a reviewed disposition.

← Back to the chapter · Previous detail