code: static StatsData aggregateStats(Collection<StatsData> dataSet) {
          StatsData combined = new StatsData();
          for (StatsData stats : dataSet) {
              if (stats.count == 0) {
                  continue;
              }
              if (combined.total == 0) {
                  combined.min = stats.min;
                  combined.max = stats.max;
              }
              combined.total = combined.total + stats.total;
              combined.count = combined.count + stats.count;
              combined.mean = combined.total / combined.count;
              combined.min = Math.min(combined.min, stats.min);
              combined.max = Math.max(combined.max, stats.max);
  
              // Sum of the squares of the difference from the mean
              double meanDifference = stats.mean - combined.mean;
              combined.varianceNumeratorSum += stats.varianceNumeratorSum + stats.count * meanDifference * meanDifference;
          }
          return combined;
      }
docs: Aggregate a collection of {@linkplain StatsData} instances.
  
  @param dataSet a collection of {@linkplain StatsData} instances
  
  @return aggregated {@linkplain StatsData}