docs: @Override
    public MtasDataItemNumberComparator<Double> getCompareValue2() {
      createStats();
      switch (sortType) {
      case CodecUtil.STATS_TYPE_SUMOFLOGS:
        return new MtasDataItemNumberComparator<>(
            stats.getN() * Math.log(stats.getGeometricMean()), sortDirection);
      case CodecUtil.STATS_TYPE_MEAN:
        return new MtasDataItemNumberComparator<>(stats.getMean(), sortDirection);
      case CodecUtil.STATS_TYPE_GEOMETRICMEAN:
        return new MtasDataItemNumberComparator<>(stats.getGeometricMean(),
            sortDirection);
      case CodecUtil.STATS_TYPE_STANDARDDEVIATION:
        return new MtasDataItemNumberComparator<>(stats.getStandardDeviation(),
            sortDirection);
      case CodecUtil.STATS_TYPE_VARIANCE:
        return new MtasDataItemNumberComparator<>(stats.getVariance(),
            sortDirection);
      case CodecUtil.STATS_TYPE_POPULATIONVARIANCE:
        return new MtasDataItemNumberComparator<>(stats.getPopulationVariance(),
            sortDirection);
      case CodecUtil.STATS_TYPE_QUADRATICMEAN:
        return new MtasDataItemNumberComparator<>(
            Math.sqrt(stats.getSumsq() / stats.getN()), sortDirection);
      case CodecUtil.STATS_TYPE_KURTOSIS:
        return new MtasDataItemNumberComparator<>(stats.getKurtosis(),
            sortDirection);
      case CodecUtil.STATS_TYPE_MEDIAN:
        return new MtasDataItemNumberComparator<>(stats.getPercentile(50),
            sortDirection);
      case CodecUtil.STATS_TYPE_SKEWNESS:
        return new MtasDataItemNumberComparator<>(stats.getSkewness(),
            sortDirection);
      default:
        return null;
      }
    }