static long sampleSizeFromEstimationError(double estimationError){
  return Math.round(Math.ceil(4.0 / Math.pow(estimationError,2.0)));
}

static long sampleSizeFromEstimationError ( double estimationError ) { return Math . round ( Math . ceil ( 4.0 / Math . pow ( estimationError , 2.0 ) ) ) ; }
computes the samplesize based on the desired estimation error .
