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);

    }
public static double getFalsePositiveProbability ( int bucketsPerElement , int hashCount ) { return Math . pow ( 1 - Math . exp ( - hashCount * ( 1 / ( double ) bucketsPerElement ) ) , hashCount ) ; }
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.