public void add(double value,double n){
  sum+=value * n;
  sumSq+=value * value * n;
  count+=n;
  if (Double.isNaN(min)) {
    min=max=value;
  }
 else   if (value < min) {
    min=value;
  }
 else   if (value > max) {
    max=value;
  }
}

public void add ( double value , double n ) { sum += value * n ; sumSq += value * value * n ; count += n ; if ( Double . isNaN ( min ) ) { min = max = value ; } else if ( value < min ) { min = value ; } else if ( value > max ) { max = value ; } }
adds a value that has been seen n times to the observed values
