public static double mean(final List<Double> list){
  double sum=0;
  for (  Double number : list) {
    sum+=number;
  }
  return sum / list.size();
}

public static double mean ( final List < Double > list ) { double sum = 0 ; for ( Double number : list ) { sum += number ; } return sum / list . size ( ) ; }
gets the average from a list of numbers .
