# Minimum number of independent trials needed to detect a bias [closed]

Suppose, I suspect that the probability of occurrence of a particular bit as $0$ is $.558$. Since, it is not $.5$, so this is possibly a bias. Now, my question is:

What is the minimum number of independent trials I need to confirm my result?

I mean, observing this scenario for, say 100 times, must not be convincing. There should be a theoretical result regarding this. It would be very helpful if someone links such papers while answering.

What I am looking for is: Suppose I suspect a possible bias of $0.5 \pm x$, $x \in (0, .5]$. Then, at least, say $2^{1/x}$ trials are need to confirm my suspicion.

## closed as off-topic by CodesInChaos, e-sushi, tylo, Gilles 'SO- stop being evil', SethDec 2 '14 at 20:29

This question appears to be off-topic. The users who voted to close gave this specific reason:

• "Questions on mathematics are off-topic unless they relate directly to cryptography. These questions can usually be asked on Mathematics Stack Exchange." – CodesInChaos, e-sushi, tylo, Gilles 'SO- stop being evil', Seth
If this question can be reworded to fit the rules in the help center, please edit the question.

• Is this just confidence intervals for a binomial distribution? – bmm6o Nov 25 '14 at 21:30
• @bmm6o I don't think so! Or, probably I am misunderstanding. Can you elaborate a bit? – pushpen.paul Nov 26 '14 at 10:22
• @owlstead Sorry for late response. But I am not getting what exactly bmm6o and you are talking about. – pushpen.paul Nov 26 '14 at 10:23

## 1 Answer

I searched the web, and finally (I think) I got:

In page 47, 48 of this thesis, it is mentioned that -

To detect a bias of $p(1+q)$ (where $p$ is the probability for an Uniform Random event), we need roughly $\dfrac{1}{pq^2}$ samples.

• That seems to be the correct order of magnitude. Statisticians have more precise evaluations, taking into account the confidence level that we want in the conclusions. We are talking about a Chi-squared test with one degree of freedom. There are also methods to decide dynamically if we can stop the test or continue, for given confidence levels or reaching the wrong conclusions. – fgrieu Nov 26 '14 at 15:11