public static List<Long> zScoreTest(GeoTimeSerie gts,boolean useMedian,double d) throws WarpScriptException {
  doubleCheck(gts);
  List<Long> anomalous_ticks=new ArrayList<Long>();
  double[] musigma=madsigma(gts,useMedian);
  double m=musigma[0];
  double std=musigma[1];
  if (0.0D == std) {
    return anomalous_ticks;
  }
  for (int i=0; i < gts.values; i++) {
    double z=(gts.doubleValues[i] - m) / std;
    if (Math.abs(z) >= d) {
      anomalous_ticks.add(gts.ticks[i]);
    }
  }
  return anomalous_ticks;
}

public static List < Long > zScoreTest ( GeoTimeSerie gts , boolean useMedian , double d ) throws WarpScriptException { doubleCheck ( gts ) ; List < Long > anomalous_ticks = new ArrayList < Long > ( ) ; double [ ] musigma = madsigma ( gts , useMedian ) ; double m = musigma [ 0 ] ; double std = musigma [ 1 ] ; if ( 0.0D == std ) { return anomalous_ticks ; } for ( int i = 0 ; i < gts . values ; i ++ ) { double z = ( gts . doubleValues [ i ] - m ) / std ; if ( Math . abs ( z ) >= d ) { anomalous_ticks . add ( gts . ticks [ i ] ) ; } } return anomalous_ticks ; }
applying z - score test if usemedian is true , then use modified z - score .
