code: private void statBasedSelectMetricHistory(final LinkedList<InMemoryHistoryNode> selectedLists)
        throws ClassCastException {
      logger.debug("selecting snapshots which are far away from mean value");
      final DescriptiveStatistics descStats = getDescriptiveStatistics(selectedLists);
      final Double mean = descStats.getMean();
      final Double std = descStats.getStandardDeviation();
  
      final Iterator<InMemoryHistoryNode> ite = selectedLists.iterator();
      while (ite.hasNext()) {
        final InMemoryHistoryNode currentNode = ite.next();
        final double value = ((Number) currentNode.getValue()).doubleValue();
        // remove all elements which lies in 95% value band
        if (value < mean + this.standardDeviationFactor * std
            && value > mean - this.standardDeviationFactor * std) {
          ite.remove();
        }
      }
    }
docs: filter snapshots using statistically significant points only
  
  @param selectedLists list of snapshots