Loading

ZSCORETEST


gts outlier
Since v1.0.0
Available on all platforms
See also

The ZSCORETEST function detects outliers in a GTS by comparing the Z-score of its values with a given threshold.

The Z-score of a value represents the number of standard deviations (or median absolute deviations) it is away from the mean (or the median). If this value is greater than the given threshold, it is flagged as an outlier.

A LIST of ticks, corresponding to the outliers, is pushed back onto the stack.

This function only applies to GTS of type DOUBLE.

Signature

Examples

//create a GTS with uniformly randomized values between 0 and 1 NEWGTS 1 100 <% NaN NaN NaN RAND ADDVALUE %> FOR //add outliers 1234 NaN NaN NaN 3.9 ADDVALUE 368 NaN NaN NaN -11.8 ADDVALUE 422 NaN NaN NaN 453634483.0 ADDVALUE 456 NaN NaN NaN 99.8 ADDVALUE 643 NaN NaN NaN -2.9 ADDVALUE 'gts' STORE //call ZSCORETEST $gts true ZSCORETEST //returns the outliers ticks