Suppose we have a set A and a subset B. If we know |A|, then we can calculate |B| by finding the probability p that an element chosen uniformly at random from A belongs to B. Specifically |A|p=|B|.
Suppose we generate n elements of A uniformly at random and use this data to estimate p (number of elements in B divided by n) and hence estimate |B|.
How reliable is this estimate? I.e. how can we compute the error?
As a side question, is there a name for this technique? (it seems to be a mathematical version of the mark-and-recapture technique)