You have a coin. You want to know whether it is fair. An unbounded testing procedure is as follows: for(N=1,2,3,...){ Toss coin. Update head and tails counts H & T (with H+T=N). If( |H-T| > F(N,K) ){ output "coin is unfair with confidence>1-K" and stop. } } The key is the magic function F(N,K). What should it be? Roughly speaking I think it ought to be F(N,K) =approx= sqrt(2*N*(C*ln(1/K)+ln(A+ln(B+N)))) where A and B and C are appropriate positive constants. Using A=7, B=2, and C=1 seems to work not too horribly provided N>=8. But I do not know what the best values of A,B,C are nor whether this F(N,K) formula really has much validity. -- Warren D. Smith http://RangeVoting.org <-- add your endorsement (by clicking "endorse" as 1st step)