Jonathan212
- 198
- 4
What is the formula for this? Throwing a flipping coin N times, what is the probability that the number of tails results is higher than M?
The discussion revolves around calculating the probability of obtaining more than 600 tails in 1000 coin flips. Participants explore various mathematical approaches, including the binomial distribution and its normal approximation, while addressing computational challenges and statistical significance.
Participants do not reach a consensus on the best method for calculating the probabilities, and there are multiple competing views regarding the reliability of the normal approximation versus the binomial distribution. The discussion remains unresolved with ongoing questions about the accuracy of different approaches.
Participants note limitations in computational tools like Excel when handling large values, and there are unresolved questions about the accuracy of normal approximations compared to binomial calculations, particularly for high values of N.
This discussion may be useful for those interested in probability theory, statistical analysis, and computational methods for assessing random processes, particularly in the context of coin flipping experiments.
Jonathan212 said:This is not homework if that's what you were thinking. Sounds specialized enough to me that a google answer is not readily available. Unless you dig a lot in which case might as well derive it from scratch.

Jonathan212 said:Thanks. So the answer is:
Pr(M; N, 0.5) = N! / (M! * (N - M)!) * 0.5^M * (1 - 0.5)^(N-M)
https://en.wikipedia.org/wiki/Binomial_distribution
Is this High School level in the US nowadays?
Jonathan212 said:Oopsa. Excel can't deal with N > 170. Any trick to avoid the overflow of "171!" ?
https://www.statisticshowto.datasci...theorem/normal-approximation-to-the-binomial/Jonathan212 said:Got stuck now. Something is wrong. Do we want a normal distribution with a standard deviation of N * 0.5 * ( 1 - 0.5 ) and a mean of N * 0.5? Excel has the NORMDIST() function but it returns a result 4 times bigger than the binomial distribution at N = 170, M = 102.
Jonathan212 said:So we want sigma = sqrt( N * 0.5 * ( 1 - 0.5 ) ). And the answer for N = 1000, M = 601 is 1 in 21 million. Hurray! That's statistically significant as hell.
Looking at the error of normal versus the binomial up to N = 170:
View attachment 238253
2015 sti 0 60
It actually gets worse after N = 140. Is it meant to?
Jonathan212 said:At N = 100, M = 51, I get 0.078 from both the binomial and the normal. Sure this is right?
Jonathan212 said:But I want M or more tails, not M.
Jonathan212 said:Looks like there is no formula that saves you having to do the sum of the binomial. But luckily, there is for the normal in excel.
PeroK said:I'm taking a guess that the normal distribution, being essentially ##e^{-x^2}##, will fall off to zero faster than the binomial. So, after a certain point the relative error will increase, but relative to some very small probabilities.
what are you ultimately looking for here?
Jonathan212 said:The way to assess the statistical significance of a true random number generator's observed bias. Got the answer in Excel, it is as BvU says. Only thing is, the result is a bit suspicious for high N: probability of 600 OR MORE heads in 1000 throws is 1 in 19 billion.
Jonathan212 said:Look at some more numbers. All at 60% heads or more:
Probability of 15 or more heads in 25 throws = 1 in 4.7
Probability of 60 or more heads in 100 throws = 1 in 35
Probability of 150 or more heads in 250 throws = 1 in 1,062
Probability of 240 or more heads in 400 throws = 1 in 27,000
Probability of 300 or more heads in 500 throws = 1 in 220,000
Probability of 360 or more heads in 600 throws = 1 in 1,800,000
Probability of 480 or more heads in 800 throws = 1 in 1,200,000,000