The moving Z-score for a point is defined as the value of standardized by subtracting the moving mean just prior to time and dividing by the moving standard deviation just prior to . Suppose is the abbreviation for the window_size in terms of the number of observations. Then the moving Z-score is:
where the moving average is:
and the moving standard deviation is:
Since there are not sufficient points to calculate the moving average and moving standard deviation at the beginning, we suppose that the moving Z-score at points within window_size observations of the beginning of a series are undefined. The scores of these values are represented by missing (undefined) values.
Whenever there is no variation in the values preceding a given observation (i.e. a series of constant values), the moving Z-score can be infinite or undefined.
Moving z-score is calculated under a set of assumptions that can limit its applicability in the real world problems. These assumptions are as foolows:
- in a certain window data points may have a distribution with definite variance (variance is not infinite)
- and mean of the data points is not undefined.
For example, in case of Cauchy and Levy distributions have infinite variances and also means of the distributions are undefined, z-score could not be very helpful for finding the abnormal data points. The main advantages of this method are
- its simplicity
- and the capability of it to be used for finding anomalous data points in a stream of data (online anomaly detection).
در شبکه های اجتماعی به اشترک بگذاریدTelegram LinkedIn Facebook Twitter Google+
نظر خود را بنویسید
ایمیل شما منتشر نخواهد شد. فیلد های الزامی *