# How many trials are needed to determine the probability of an outcome?

Say I have a coin, how many flips would I need to do and record to determine that results of said flips are accurate, that there is indeed a 50% chance to land on heads or tails? 100, 1000, 10000?

How do I extend this to a dice roll with n number of sides. how many rolls would I need to determine that there is indeed a 10% chance to land on the number 7 on a 10 sided die? 100, 1000, 10000?

Is there a formula for determining how many trials I must conduct to decided the probability of an outcome with a 95% or 99% confidence level?

No finite number of trials is sufficient to determine that the probability of getting a head (say) is exactly $\frac12$.

Consider the difference between P(head) = $\frac12$ and P(head) = $\frac12+\varepsilon$. For every finite $n$, there's a value for $\varepsilon>0$ which is so close to $0$ that you will find the two probabilities very difficult to distinguish with $n$ trials.

So unless you specify a value for $\varepsilon$ that you regard $\frac12+\varepsilon$ as "close enough to 50%", there's no value of $n$ that will do.

A 95% interval for P(head) will have a "margin of error" (have interval half-width) of $\frac{1}{\sqrt{n}}$.

The ideas work similarly for dice, or any other similar situation (but the numbers differ).

Is there a formula for determining how many trials I must conduct to decided the probability of an outcome with a 95% or 99% confidence level?

You need to give more information to pin down a sample size.
If you specify both an interval-width (or specify a margin of error, the half-width) and coverage probability for a confidence interval (such as "I want a 95% CI for P(head) to be no wider than 0.01" for example), then you can get a sample size from that.

• This question is answered in the wikipedia article, "Checking whether a coin is fair". See the section, "Estimator of true probability" for specifics of the general method described by Glen_b. As a supplement to the above, see: StackExchange answer on calculating maximum error Aug 22, 2015 at 20:53
• "Everyone knows" that with a standard die, each of six numbers is as likely, don't we? When my school class of 20-some tried throwing hundreds of dice each, almost every child reported 2 and 5 coming up greatly more than any other number. Had we all been using the same dice, that would most obviously indicate a physical bias. (Sidewise, since we clearly did not use the same dice, does anyone think those results should not have led our teacher to undertake more research, perhaps leading to a relevant doctorate?? Feb 26, 2021 at 22:38