[math-fun] how to test whether a coin is fair?
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)
This can be cast as a Bayesian probability. Let x be the probability of heads. We need a prior probability for x, which I will just assume is uniform. Then the posterior probability for x is P(x) = C x^h (1-x)^t, where C is a normalizing constant. The matter of whether the coin is "fair" lies outside of probability. It is personal opinion, or, being fancy and minimizing risk over the consequences, is decision theory. -- Gene From: Warren D Smith <warren.wds@gmail.com> To: math-fun@mailman.xmission.com Sent: Friday, March 4, 2016 2:09 PM Subject: [math-fun] how to test whether a coin is fair? 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)
It seems to me that |H-T| will tend to infinity as N goes to infinity (albeit at a slower rate), so limiting |H-T| (beyond that given by classical probability theory) may not be fruitful. There's also the question of the distribution of the flips--one could have a coin with the perfect numbers of flips, but, over the long run, if the distribution were exactly predictable (say, H, T, H, T, H, T, etc.), that would be a good argument for the coin not being fair. Dilbert reference: http://dilbert.com/strip/2001-10-25 Kerry On Fri, Mar 4, 2016 at 3:09 PM, Warren D Smith <warren.wds@gmail.com> wrote:
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)
_______________________________________________ math-fun mailing list math-fun@mailman.xmission.com https://mailman.xmission.com/cgi-bin/mailman/listinfo/math-fun
participants (3)
-
Eugene Salamin -
Kerry Mitchell -
Warren D Smith