code: public static double getFalsePositiveProbability(int bucketsPerElement, int hashCount) {
          // (1 - e^(-k * n / m)) ^ k
          return Math.pow(1 - Math.exp(-hashCount * (1 / (double) bucketsPerElement)), hashCount);
  
      }
docs: Calculate the probability of a false positive given the specified
  number of inserted elements.
  
  @param bucketsPerElement number of inserted elements.
  @param hashCount
  @return probability of a false positive.