code: public static double mean(int[] values) {
          double sum = 0d;
          for (int i : values)
              sum += i;
          return sum / values.length;
      }
docs: Returns the mean value of the array of ints