public void calculateDerived(){
  mean=Double.NaN;
  stdDev=Double.NaN;
  if (count > 0) {
    mean=sum / count;
    stdDev=Double.POSITIVE_INFINITY;
    if (count > 1) {
      stdDev=sumSq - (sum * sum) / count;
      stdDev/=(count - 1);
      if (stdDev < 0) {
        stdDev=0;
      }
      stdDev=Math.sqrt(stdDev);
    }
  }
}

public void calculateDerived ( ) { mean = Double . NaN ; stdDev = Double . NaN ; if ( count > 0 ) { mean = sum / count ; stdDev = Double . POSITIVE_INFINITY ; if ( count > 1 ) { stdDev = sumSq - ( sum * sum ) / count ; stdDev /= ( count - 1 ) ; if ( stdDev < 0 ) { stdDev = 0 ; } stdDev = Math . sqrt ( stdDev ) ; } } }
tells the object to calculate any statistics that don ' t have their values automatically updated during add . currently updates the mean and standard deviation .
