code: private static Stats calcStats(List<Double> nums) {
      double sum = 0.0, mean = 0.0, variance = 0.0, stdDev = 0.0;
      for (Double d : nums) {
        sum += d.doubleValue();
      }
      if (nums.size() > 0) {
        mean = sum / nums.size();
      }
  
      sum = 0.0;
      for (Double d : nums) {
        sum += (d.doubleValue() - mean) * (d.doubleValue() - mean);
      }
      if (nums.size() > 0) {
        variance = sum / nums.size();
      }
  
      stdDev = Math.sqrt(variance);
      return new Stats(mean, variance, stdDev);
    }
docs: Calculates mean, variance, standard deviation for a set of numbers
  @param nums the list of numbers to compute stats on
  @return aforementioned values in a Stats helper class