public static double mean ( Collection < ? extends Number > values ) { double sum = 0d ; for ( Number n : values ) sum += n . doubleValue ( ) ; return sum / values . size ( ) ; }
Returns the mean value of the collection of numbers