Re:Coin Flip Brain Teaser
by madcaptenor on Friday July 24, 2009 @12:21PM
(#721760)
I like the idea of using a Chernoff bound, but 652 is way too low to be the answer!
But I get, as solutions for exp(-2(.01n-5)^2 / n) = .01, n = 10.4 and n = 24015.
In other words, we want to find n such that
Pr[X < n/2 + 5] < .01
If we express that in terms of the mean, we can apply a Chernoff bound:
Pr[X <= E[X] - a] <= Exp[-2a^2/n], for 0 < a < E[X]
If E[x] = pn, then a = pn - (n/2 + 5), which for p = 0.51 is a = .01n - 5.
So, solving Exp[-2a^2/n] = .01 (with help from Wolfram alpha) gives a quadratic equation with two solutions:
n = 348.257 and n = 651.743
The first is too small, a would be negative (n needs to be at least 500). The second is good enough.
652 does the trick.