I have already asked this on stackexchange but did not get any answer.

Say I run a simple Bernoulli trial a number of times and compute the relative frequency for success. Clearly the relative frequency should represent the underlying probability for success better the more experiments I run.

My question is this: Is there any way to say how close the two values are given the number of times the experiment was run? For example if I run the experiment N times, what is the expected deviation of the relative frequency and the probability? Or turning the question around: If I want to know the probability up to an uncertainty of ε, how many experiments do I have to run?

Any pointers to results in this direction would be appreciated.

sureof knowing the probability up to an uncertainty of $\epsilon$ - there is always a chance that you get unlucky and have far more (or less) successes than you "should". You can have high probability of being close, and that's what concentration inequalities like Chebyshev can quantify. In statistics, people like to think of this concept in terms ofconfidence intervals. $\endgroup$ – Nate Eldredge Mar 23 '18 at 13:42