docs: public static double Mean( int[] values ) {
          int     hits;
          long    total = 0;
          double  mean = 0;
  
          // for all values
          for ( int i = 0, n = values.length; i < n; i++ ) {
              hits = values[i];
              // accumulate mean
              mean += i * hits;
              // accumalate total
              total += hits;
          }
          return ( total == 0 ) ? 0 : mean / total;
      }