# Constantly flipping a coin would at some point result

## Main Question or Discussion Point

Not sure if this really a math issue, I think it is, but I was just wondering about something.

If given an unlimited amount of time, do you think constantly flipping a coin would at some point result in flipping 1,000,000 consecutive heads...or tails?

Obviously it could never happen in a single lifetime, or even the lifetime of the planet for all we know. But is it safe to conclude that if given an unlimited amount of time, it not only could happen, but will happen?

Strilanc
It will almost surely happen. (Look up 'almost surely' on wikipedia)

Have you seen the infinite monkey theorem? [http://en.wikipedia.org/wiki/Infinite_monkey_theorem] [Broken]

What is the probability of getting 1 million consecutive heads? It would be $p = 0.5^{1000000}$, a truly small number. The probability of not getting 1 million heads in a row would be $q = 1 - p$, very close to 1. But, given an unlimited amount of time, we have an unlimited number of trials. If flipping a coin 1 million times is a trial, and we do many trials, q slowly gets smaller and smaller and p gets larger and larger.

p gets larger very slowly. A quick estimate shows that if you did $2^{1000000-1}$ such trials, you would have a probability of getting that run of 1 million of about 0.4. If it takes one trillionth of a second to flip a coin, it would take more than $2^{1000000-46} > 10^{249988}$ years, if my calculation is correct. Estimates of the current age of the universe are on the order of $10^{10}$ years, for comparison.

** No guarantees on my calculations ;)

Last edited by a moderator:
Obviously it could never happen in a single lifetime, or even the lifetime of the planet for all we know.
I am not sure that this is obvious. Saying something could never happen means that its probability is zero. As mentioned above the probability is small, but not 0. If you could flip a coin ever second, it would take between 11 and 12 days for you to flip it one million times.

Since we are able to flip a coin 1 million times in the range of our lifetime, it is possible that we could get 1 million heads in a row in our lifetime. (I wouldn't bet on it though).

As others pointed out this is closely related to the infinite monkey theorem. I suggest you think carefully about what you say can never happen, and what you say will surely happen.

CRGreathouse
I get a rough upper bound of $10^{-301021}$ on that probability.