I hold 100 fair coins in my hands. Then, I toss the 100 coins high into the air all at once. I understand that the chance of getting 100 heads when they land is 1 in 2 exp 100. Can someone help me determine, on average, how many attempts at tossing 100 coins all at once need to be made to obtain 100 heads. (I believe this might be the "expected" number of tosses.) I'm asking because my intuition says that if the 100 coin toss was made once per second then the universe is not old enough to expect a toss with 100 heads as an outcome and I'd like to confirm this. (The universe is roughly 13.82 billion years or approximately 4.35 exp 17 seconds old.) Thank you.
$\endgroup$ 12 Answers
$\begingroup$A succeed/fail experiment with a fixed probability $p$ of success like this one is known in probability theory as a Bernoulli trial. The probability that the first success occurs at the $k$th try is governed by the geometric distribution. You could look this up and get your answer, but it’s not too hard to work out for yourself.
For the first success to occur at the $k$th try, the preceding $k-1$ trials must have been failures, so $P(X=k)=(1-p)^{k-1}p$. This sequence is geometric, hence the name of this probability distribution. The expected value is $$E(X) = \sum_{k=1}^\infty (1-p)^{k-1}p\cdot k = \frac1p.$$ Plugging in your value of $p$, this is $0.5^{-100} = 2^{100} \approx 1.27\cdot10^{30}.$
Sometimes the distribution of the probability that there are $k$ failures before the first success is called the geometric distribution. This is just $X-1$, with $X$ defined as above, and its expected value is $\frac{1-p}p$. With such a small probability of success, one trial more or less isn’t going to make much difference, and indeed, for $p=0.5^{100}$, this yields the same value to many decimal places.
$\endgroup$ $\begingroup$I'm going to assume that what you want is at least a $0.5$ probability of getting $100$ heads on at least one trial over $n$ trials. This is essentially a Bernoulli Trial, with $p = \frac{1}{2}^{100}, n=n$, and required $P(\ge1)\ge0.5$. The equation we will follow is $$P(k) = {n \choose k}p^k(1-p)^{n-k}$$ Since $P(\ge 1) = 1 - P(0)$, $$P( \ge 1) = 1- {n \choose 0}\left(\frac{1}{2}^{100}\right)^0\left(1-\frac{1}{2}^{100}\right)^n \ge 0.5 \\ \left(1-\frac{1}{2}^{100}\right)^n \le 0.5 \\ n\log\left(1-\frac{1}{2}^{100}\right) \le \log(0.5) \\ n \ge \frac{\log(0.5)}{\log\left(1-\frac{1}{2}^{100}\right)}$$ You can apply the change of base formula here, I just decided to plug it into wolfram alpha. $$n \ge 8.79 \cdot 10^{29}$$ So, taking your figure for the number of seconds in the universe, you would need approximately $2 \cdot 10^{12}$ trials per second to have a $0.5$ chance at landing $100$ heads in a single toss of $100$ coins (Assuming that all of the coins have no bias and that each flip is independent of the others).
$\endgroup$ 1