How many flips are needed to confirm a coin's intentional bias? I've made some 'special' coins and I know for a fact that they have a very small but known/designed bias $\epsilon$.  I define bias as the probability $(\frac{1}{2} + \epsilon)$ towards heads and $(\frac{1}{2} - \epsilon)$ for tails.    If someone were to test them, how many flips would they have to perform in order to measure $\epsilon$ with 95% confidence.
I know the exact bias (somehow), and expect the other party to measure it themselves and tell it back to me.  The testing party has unlimited resources. $\epsilon$ is of the order of $2^{-64}$.
 A: It now sounds like you're after a sample size based on the width of a confidence interval of coverage $1-\alpha$. For a two sided interval of half-width $h$ (that is, the interval will be of the form ($\hat\epsilon-h,\hat\epsilon+h)$), the required sample size is:
$n \geq Z_{α/2}^2 ­\pi(1-\pi) /h^2$
where $\pi$ is the population proportion (for small $\epsilon$ relative to $\pi$ it won't matter whether you use $\pi$ or $\pi+\epsilon$).
If $\alpha$ is 0.05 (coverage 95%) the Z value is 1.96; this is often approximated by 2.
So if $\pi$ is $\frac12$ this is about $1/h^2$. If $\pi$ is even roughly in the ballpark of $\frac12$ this doesn't change much, but if it's getting close to 0 or 1, you will get smaller $n$.
If you want a one-sided interval (you care only about a lower bound on $\epsilon$, say) then the sample size reduces a little.
Hopefully this addresses your needs; strictly I should have continued asking questions to make sure I was answering the right question but this may be useful either way.

If you instead need a test with a given power to pick up a difference of $\epsilon$ that's a different calculation (though related).
