# Minimum number of flips to guarantee heads

This is a weird problem that popped into my head: given a fair coin, how many flips is required to guarantee heads?

If I get a tails, then another tails, and another etc., the chance of getting a heads increases every time. But there is still a small chance that I will get another tails.

This seems to imply that there is no finite number of flips to guarantee a heads. Does this mean that infinity is the correct answer (although infinity isn't a number as far as I understand) or is this question even answerable in the first place?

• You can theoretically flip an infinite number of tails: there is no magical force in the universe that will guarantee you will ever flip a heads. That being said, the "probability" of flipping an infinite number of tails is $0$ -- this kind of event is called almost surely impossible en.wikipedia.org/wiki/Almost_surely#Tossing_a_coin Commented Jun 11, 2016 at 18:08
• How do you know how many tails came up on the coin, before you started your experiment? How does the coin know? Commented Jun 11, 2016 at 19:21
• @imas145: you may be interested in looking into the concept of independence in statistics. Assuming a coin is flipped the same way every time, landing on tails doesn't affect the possibility of it landing on heads or on tails in future flips. Commented Jun 12, 2016 at 1:42
• @Mazura: Is infinity a number?
– user14972
Commented Jun 12, 2016 at 7:09

There is no way to guarantee that you will get a heads ever. The chance of getting heads remains a constant 50-50 on each individual flip--flips are said to be independent. It is only in the aggregate of an increasing number of flips that the probability of getting a heads on at least one flip increases. However, while this probability increases monotonically, it never reaches 1.

Yes; it is extremely unlikely that you will get 5 million tails in a row, but it is entirely possible. You can answer a similar question if you are willing to set a tolerance. I.e. if you wanted 95% confidence that a heads will appear, then you want the probability that $N$ flips in a row are tails to be less than 5%.

The probability that $N$ flips in a row are tails is $(0.5)^N$. Computing this for different values of $N$:

\begin{array}{ll} N & 0.5^ N \\ 1 & 0.5 \\ 2 & 0.25 \\ 3 & 0.125 \\ 4 & 0.0625 \\ 5 & 0.03125 \end{array}

Therefore flipping the coin $5$ times will give you $(100 - 3.125)$% = $96.875$% confidence that a heads will appear at least once.

Basically the answer: "infinite" is the correct one. Moreover, you have to be careful in saying that the chance of obtaining a Head increases 'every time'. This statement is false. Each time the chance of obtaining a head is $1/2$. What is true is that the chance of obtaining at least a head in $n$ throws is $1-2^{-n}$. This probability clearly increases with $n$, but you should appreciate the difference with respect to your statement.

If I get a tails, then another tails, and another etc., the chance of getting a heads increases every time.

no. it's still a fair coin after you throw several tails. it's always 50% odds of heads or tails on the next throw. this is just as superstitious as thinking you're at a hot craps table at the casino.