Outliers vs change points
- Outliers: points that jump away from their neighbors and soon come back — sensor glitches, dropouts, noise.
- Change points: moments where the level or slope changes — a switch in operating conditions, the onset of a fault, the start of a drift.
They are found differently: an outlier is judged by how far a point sits from its neighbors; a change point by how the data before and after a moment differ.
Why median and MAD instead of mean and standard deviation
The common "mean ± 3σ" rule is pulled by the outliers themselves, so the bigger the outlier, the easier it is to miss. Robust statistics use the median and the MAD (median absolute deviation from the median) as the yardstick instead.
Robust Z = (value − median) ÷ (MAD × 1.4826). The factor 1.4826 makes it comparable to a normal standard deviation. As a guide, 2 is sensitive (more candidates), 3 is standard, and 4–5 keeps only clear anomalies.
Choosing windows and thresholds
- Outliers (Hampel method): take a window centered on each point and compute Z from the window's median and MAD. Make the window longer than the spikes you want, but shorter than slow changes.
- Change points: compare a window before and after each point and flag where the difference is unusually large. Make the window about as long as the change you are looking for. Use the mean difference (level shift) for steps and the slope difference (slope change) for the start of gradual changes.
- Caution: for constant or coarsely quantized signals, the MAD can be 0, and a one-step difference may be flagged.
Doing it in Excel or Python
In Excel, a moving median can be built from MEDIAN with relative references, but it gets slow on many rows. In Python, pandas rolling medians make the Z calculation straightforward. Either way, checking each candidate on a chart is extra work.
Finding them in LOGADEC
- Start it from Try it in your browser, or download the free version and open the extracted HTML file in Google Chrome or Microsoft Edge.
- Load your CSV file and show the series in the [Series] tab.
- In the [Analysis] tab, open the "Outlier" section, check the Window and Threshold, and click [Detect outliers]. The result table and the markers on the chart show each position and its Z.
- In the "Change point" section, choose the Method (Level shift (mean diff) / Slope change (trend diff)) and click [Detect change points]. If unsure, [⚙ Auto run] picks the window, threshold and method for you.
- Not sure where to start? [Full diagnosis] runs outlier, change-point, frequency-anomaly, correlation-break and other analyses in one go.
The "Try it in your browser" page has test-data-like sample CSV files with planted anomalies and an analysis tutorial with answers. See Time-Domain Analysis in the user manual.