code: public static int minimumSampleSizeForMaximumXbarStd(double maximumXbarStd, double populationStd, int populationN) {
          if(populationN<=0) {
              throw new IllegalArgumentException("The populationN parameter must be positive.");
          }
          
          double minimumSampleN = 1.0/(Math.pow(maximumXbarStd/populationStd,2) + 1.0/populationN);
  
          return (int)Math.ceil(minimumSampleN);
      }
docs: Returns the minimum required sample size when we set a specific maximum Xbar STD Error for finite population size.
  
  @param maximumXbarStd
  @param populationStd
  @param populationN
  @return