code: public static double stddev(Collection<? extends Number> values) {
          double mean = mean(values);
          double sum = 0d;
          for (Number n : values) {
              double d = n.doubleValue() - mean;
              sum += d*d;
          }
          return Math.sqrt(sum / values.size());
      }
docs: Returns the standard deviation of the collection of numbers