Implementing Bloom Filters in Python and Understanding its error probability: A Step-by-Step Guide

Probability of False Positive and Relation among i, m, k

Assumes a function that selects each array position with equal probability. Considering m is a number of bits in the array the probability of selecting a bit is 1/m. and the probability of not setting a bit is

p = 1–1/m

and there are k hash function so the probability now for not setting a bit by k hash function is

p = (1–1/m)**k

and if there are i strings it becomes

Website