protected void add(double value,int group){
  if ((group < 0) || (group >= numberOfGroups)) {
    throw new IllegalArgumentException("invalid group");
  }
  data.add(new Observation(value,group));
}

protected void add ( double value , int group ) { if ( ( group < 0 ) || ( group >= numberOfGroups ) ) { throw new IllegalArgumentException ( "invalid group" ) ; } data . add ( new Observation ( value , group ) ) ; }
adds a new observation with the specified value and group .
