An "outlier" is a value in the historical data that lies outside the expected range of values. There can be a variety of reasons for this deviation, for example a data entry error or a one-time event that affected the sales results.
Models for Outlier Detection
There are two models in SAP Integrated Business Planning (SAP IBP) that help to detect outliers in your historical data:
- Interquartile Range Test: The system checks whether the time series values are within the interquartile range, which is the difference between the third quartile and the first quartile of the data. The values that are not within this range are identified as outliers.
Given a series of numeric data, the inter-quartile range (IQR) is the difference between the third quartile (Q3) and the first quartile (Q1) of the data: IQR = Q3 – Q1’.
Q1 is equal to the 25th percentile and Q3 is equal to the 75th percentile. The p-th percentile of a numeric vector is a number, which is greater than or equal to p% of all the values of this numeric vector.
IQR Test is a method to test the outliers of a series of numeric data. The algorithm performs the following tasks:
- Calculates Q1, Q3, and IQR
- Sets the upper and lower bounds as follows:
- Upper-bound = Q3 + 1.5 × IQR
- Lower-bound = Q1 – 1.5 × IQR
- Tests each value in a numeric vector to determine if it is in the range. The value outside the range is marked as an outlier, meaning it does not pass the IQR test
- Variance Test: The system checks whether the time series values deviate from the mean by more than the standard deviation multiplied by a constant. The values showing larger deviations are identified as outliers.
Variance Test is a method to identify the outliers of n number of numeric data {xi} where 0 < i < n+1, using the mean {μ} and the standard deviation of {σ} of n number of numeric data {xi}.
Following steps are performed for the Variance Test:
- Calculate the mean (μ) and the standard deviation (σ):
- Set the upper and lower bounds as follows:
- Upper-bound = µ + multiplier * ϭ
- Lower-bound = µ – multiplier * ϭ
Where the multiplier is a coefficient provided by the user to test whether all the values of a numeric vector are in the range. If a value is outside the range, it means it does not pass the Variance Test. The value is marked as an outlier
Outlier Detection Bounds
If data values are out of bounds, the system corrects the values. The following figure shows the upper-bound and the lower-bound.
Automatic Outlier Correction
In addition to the classic Outlier Correction method, SAP IBP, advanced demand offers an algorithm for automatic outlier correction. It detects and adjusts abnormal spikes or dips in historical demand, without the necessity to provide detailed detection parameters. The system leverages the power of machine learning to automatically detect and correct outliers in time series data before forecast calculations are run.
Remark: When it comes to seasonal products, automatic outlier correction might by difficult and needs to be carefully validated as the values might get falsified as the season could get detected as outlier.