I'm trying to develop an algorithm for finding biased coins. The basic problem formulation is this:
- There are an infinite number of coins
- Some proportion $t$ of the coins is biased (this number is known)
- All biased coins have the same probability $p_b$ of coming up heads (this number is also known)
- All other coins are fair
- Biased coins are otherwise indistinguishable from fair ones
The task is to find one biased coin, with some confidence, using the fewest number of coin flips.
I know the basic solution to a related problem, i.e. determining whether a single coin is biased. Following the formulation in https://en.wikipedia.org/wiki/Checking_whether_a_coin_is_fair, I can set my desired maximum error $E$ to be equal to $|p_b - 0.5|$ and use the equation $n = \frac{Z^2}{4E^2}$ to get the number of coin tosses $n$ required to determine whether the coin is indeed fair using a given $Z$ value.
However, I'm curious how the method might change given my formulation, where there are multiple coins and a known proportion are biased. A brute force algorithm, I suppose, would be to select a coin, flip it $n$ times, select another coin, flip it $n$ times, etc. until a biased one is found. But this feels sub-optimal.
Is it possible, for instance, to abandon a coin before $n$ flips is reached based on some criteria, i.e. using the evidence collected so far to judge whether it is worthwhile to keep flipping that coin or move on to another? It seems like the value of $t$, particularly if it is low, should be a useful prior that I can leverage.
I'm also concerned that if I test multiple coins, I am at risk of inadvertently finding significance where there is none.
