Moving Z-Score

1 دقیقه مطالعه


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:

z ( x t ) = x t x ¯ t s t

where the moving average is:

x ¯ t = ( 1 / w ) i = t w t 1 x i

and the moving standard deviation is:

s t = ( 1 / w ) i = t w t 1 ( x i x ¯ t ) 2 .

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).

نظر ها

Heya i am for the first time here. I found this board and I find It really useful & it helped me out much. I hope to give something back and aid others like you aided me.

I am very happy to read this. This is the kind of manual that needs to be given and not the accidental misinformation that’s at the other blogs. Appreciate your sharing this greatest doc.

نظر خود را بنویسید

ایمیل شما منتشر نخواهد شد. فیلد های الزامی *

در حال بارگذاری...