On 06/03/2016 01:34, Warren D Smith wrote:
--so: your idea is this(?): initial ("prior") distribution of the coin-bias x is uniform on (0,1). After T+H coin tosses, the posterior is a beta(1+T,1+H) distribution on (0,1). One keeps tossing coins and as we do so the posterior keeps changing. If at any moment the CDF of the beta(1+T, 1+H) distribution at 1/2, is either less than K/2 or greater than 1-K/2, then we stop and declare "coin appears unfair, with confidence>=1-K."
As you correctly observe, that would be a bad idea. But I don't think it's what Eugene meant -- and if it is, all that means is that he applied a good idea badly. Your own proposed approach has a related property: it will never say "the coin is fair", so instead of always terminating at some point and saying the coin is unfair it will always either do that *or else run for ever until you die*. It's not clear that that's actually any better. If you have a testing procedure that, with probability p>0, terminates within N tosses saying "fair" when the coin is perfectly fair, then for any q<p there's a range of Pr(heads) within which the test will say "fair" within N tosses with probability at least q. So *if you want a procedure that can ever actually tell you the coin is fair* I think you have to accept that it can only do so within epsilon; you get to choose epsilon but you can't make it zero. Once you've chosen your epsilon, here's a version of Eugene's test that (I think) doesn't have a bias problem like the one you describe: - Keep tossing until Pr(|p-1/2|<epsilon) is either >= 1-K or <= K. Then stop and report "fair" or "unfair" respectively. Here Pr() denotes your posterior probability as given by the beta distribution. -- g