# How many times do you have to flip a coin to ensure a heads

**URL:** <https://boards.straightdope.com/t/how-many-times-do-you-have-to-flip-a-coin-to-ensure-a-heads/405290>\
**Category:** Great Debates\
**Created:** [May 23, 2007, 11:06pm UTC](https://boards.straightdope.com/t/how-many-times-do-you-have-to-flip-a-coin-to-ensure-a-heads/405290 "2007-05-23T23:06:03Z")\
**Posts on this page:** 20\
**Page:** 3

<div class="post-metadata">

**Author:** ![Indistinguishable](https://avatars.discourse-cdn.com/v4/letter/i/90ced4/32.png) [@Indistinguishable](https://boards.straightdope.com/u/Indistinguishable)\
**Post date:** [May 24, 2007, 2:01am UTC](https://boards.straightdope.com/t/how-many-times-do-you-have-to-flip-a-coin-to-ensure-a-heads/405290/41 "2007-05-24T02:01:27Z")

</div>

[QUOTE=kanicbird]  
Here is the premises:

If you flip a infinite number of coins a infinite number of times you will get a infinite number of coins that will never come up heads.

-but-

If you flip any one coin a infinite number of times it will hit heads and tails equally.

These 2 can’t coexist.  
[/QUOTE]

You’re right that those two premises can’t coexist, but the laws of probability don’t guarantee either one of them. The laws of probability do tell us that the second premise holds for any particular fair coin with probability 1; however, the first premise doesn’t even have that support. (With countably many coins, the laws of probability, as conventionally formulated, actually give the first premise a probability 0 of holding [to those who care about this sort of thing, I can rant all day about the arbitrariness of the [countable additivity condition](http://en.wikipedia.org/wiki/Probability_axioms#Third_axiom) in [Kolmogorov’s axioms](http://en.wikipedia.org/wiki/Probability_axioms)]; with an uncountable infinity of coins, the situation is different, but depends strongly upon the particular probability distribution you assume, there not being a particular distinguished one to pick in this case).

---

<div class="post-metadata">

**Author:** ![Shodan](https://avatars.discourse-cdn.com/v4/letter/s/9f8e36/32.png) [@Shodan](https://boards.straightdope.com/u/Shodan)\
**Post date:** [May 24, 2007, 2:25am UTC](https://boards.straightdope.com/t/how-many-times-do-you-have-to-flip-a-coin-to-ensure-a-heads/405290/42 "2007-05-24T02:25:54Z")

</div>

You can’t flip a coin an infinite number of times.

Regards,  
Shodan

---

<div class="post-metadata">

**Author:** ![Shamozzle](https://avatars.discourse-cdn.com/v4/letter/s/9f8e36/32.png) [@Shamozzle](https://boards.straightdope.com/u/Shamozzle)\
**Post date:** [May 24, 2007, 2:36am UTC](https://boards.straightdope.com/t/how-many-times-do-you-have-to-flip-a-coin-to-ensure-a-heads/405290/43 "2007-05-24T02:36:01Z")

</div>

[QUOTE=Indistinguishable]  
…\<SNIP\> Which should really put the nail into the coffin of the idea that a probability of 0 is the same thing as impossibility.  
[/QUOTE]

Can you explain to me how a probability of 0 is not the same as an impossibility?

If I have a die with no “1” on it, the probability that I roll a “1” is zero. It is possible to role a “1”. What am I missing?

---

<div class="post-metadata">

**Author:** ![Kimstu](https://avatars.discourse-cdn.com/v4/letter/k/ecd19e/32.png) [@Kimstu](https://boards.straightdope.com/u/Kimstu)\
**Post date:** [May 24, 2007, 2:54am UTC](https://boards.straightdope.com/t/how-many-times-do-you-have-to-flip-a-coin-to-ensure-a-heads/405290/44 "2007-05-24T02:54:20Z")

</div>

> [@Shamozzle](#):
>
> Can you explain to me how a probability of 0 is not the same as an impossibility?
> 
> If I have a die with no “1” on it, the probability that I roll a “1” is zero. It is [impossible] to [roll] a “1”. What am I missing?

Nothing, in the case of a die with a finite number of sides. Rolling a “1” with a die having no “1” on it is not a possible outcome, and thus has zero probability.

But what I think **Indistinguishable** is getting at is that the situation gets more complicated in the case of infinite possible outcomes.

If you have a fair die with 6 numbered sides, the probability of rolling any of those 6 numbers on one roll is 1/6. If there are 12 sides, the probability of rolling any of them is 1/12. And so on.

Thus if you have a fair die with an infinite number of sides, the probability of rolling any one of them must be 1/(infinity), which is zero. Yet, if you **do** roll that die (leaving aside the physical question of how you possibly could roll a die with an infinite number of sides, and no smart-ass remarks about spherical dice, please), you will in theory get one of those sides as the outcome.

So this is a situation where an outcome may have probability zero and **yet** be possible anyway.

---

<div class="post-metadata">

**Author:** ![Indistinguishable](https://avatars.discourse-cdn.com/v4/letter/i/90ced4/32.png) [@Indistinguishable](https://boards.straightdope.com/u/Indistinguishable)\
**Post date:** [May 24, 2007, 3:19am UTC](https://boards.straightdope.com/t/how-many-times-do-you-have-to-flip-a-coin-to-ensure-a-heads/405290/45 "2007-05-24T03:19:27Z")

</div>

Yeah, what **Kimstu** said. To be explicit, all impossible events have probability zero, but not all events of probability zero are impossible. One illustrative example would be a dartboard. You toss your dart and you hit the board at, say, x = 0.06892062362…, y = 0.908246236222… What was the probability of hitting that exact point? Well, zero, under the conventional model (infinitely many points on the dartboard, each with equal probability of getting hit; that probability is supposed to be a real number, and the probabilities can’t add up to more than 1; therefore, each point has probability 0 of getting hit). All the same, you did actually hit that exact point. So, since you pulled off an event of probability 0, clearly, events of probability 0 are not impossible.

I would imagine the Internet would be filled with pages illustrating the distinction between “probability 0” and “impossible” (and between “probability 1” and “guaranteed”), since it’s an all too common mistake to conflate them, but am sorely disappointed to find that Google fails me in this regard. At any rate, Wikipedia has [a bit](http://en.wikipedia.org/wiki/Almost_surely#.22Almost_sure.22_versus_.22sure.22) on the distinction.

---

<div class="post-metadata">

**Author:** ![Indistinguishable](https://avatars.discourse-cdn.com/v4/letter/i/90ced4/32.png) [@Indistinguishable](https://boards.straightdope.com/u/Indistinguishable)\
**Post date:** [May 24, 2007, 3:22am UTC](https://boards.straightdope.com/t/how-many-times-do-you-have-to-flip-a-coin-to-ensure-a-heads/405290/46 "2007-05-24T03:22:45Z")

</div>

Oh, and, actually, smart-ass remarks about spherical dice are perfect. Take a perfect sphere, toss it up in the air, have it come to the ground, and note which exact point it lands on. Every particular exact point on the sphere has a probability of 0 of being the one it lands on (by the same reasoning as in the above dartboard example), yet, nonetheless, one of them does end up as such. Another example where an event of probability 0 comes to pass.

---

<div class="post-metadata">

**Author:** ![Czarcasm](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/czarcasm/32/4050_2.png) [@Czarcasm](https://boards.straightdope.com/u/Czarcasm)\
**Post date:** [May 24, 2007, 3:33am UTC](https://boards.straightdope.com/t/how-many-times-do-you-have-to-flip-a-coin-to-ensure-a-heads/405290/47 "2007-05-24T03:33:51Z")

</div>

[QUOTE=Indistinguishable]  
Oh, and, actually, smart-ass remarks about spherical dice are perfect. Take a perfect sphere, toss it up in the air, have it come to the ground, and note which exact point it lands on. Every particular exact point on the sphere has a probability of 0 of being the one it lands on (by the same reasoning as in the above dartboard example), yet, nonetheless, one of them does end up as such. Another example where an event of probability 0 comes to pass.  
[/QUOTE]

Sonofabitch-this actually makes sense to me.  
Thank you.

---

<div class="post-metadata">

**Author:** ![Larry\_Borgia](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/larry_borgia/32/156_2.png) [@Larry\_Borgia](https://boards.straightdope.com/u/Larry_Borgia)\
**Post date:** [May 24, 2007, 4:09am UTC](https://boards.straightdope.com/t/how-many-times-do-you-have-to-flip-a-coin-to-ensure-a-heads/405290/48 "2007-05-24T04:09:41Z")

</div>

[QUOTE=Indistinguishable]  
Oh, and, actually, smart-ass remarks about spherical dice are perfect. Take a perfect sphere, toss it up in the air, have it come to the ground, and note which exact point it lands on. Every particular exact point on the sphere has a probability of 0 of being the one it lands on (by the same reasoning as in the above dartboard example), yet, nonetheless, one of them does end up as such. Another example where an event of probability 0 comes to pass.  
[/QUOTE]

Dude, you’re freaking me out. The only thing I can think of is that real spheres don’t have an infinite number of points to land on.

---

<div class="post-metadata">

**Author:** ![Shamozzle](https://avatars.discourse-cdn.com/v4/letter/s/9f8e36/32.png) [@Shamozzle](https://boards.straightdope.com/u/Shamozzle)\
**Post date:** [May 24, 2007, 4:22am UTC](https://boards.straightdope.com/t/how-many-times-do-you-have-to-flip-a-coin-to-ensure-a-heads/405290/49 "2007-05-24T04:22:35Z")

</div>

Any surface has an infinite number of points.

---

<div class="post-metadata">

**Author:** ![Shamozzle](https://avatars.discourse-cdn.com/v4/letter/s/9f8e36/32.png) [@Shamozzle](https://boards.straightdope.com/u/Shamozzle)\
**Post date:** [May 24, 2007, 4:29am UTC](https://boards.straightdope.com/t/how-many-times-do-you-have-to-flip-a-coin-to-ensure-a-heads/405290/50 "2007-05-24T04:29:03Z")

</div>

[QUOTE=Kimstu]  
Nothing, in the case of a die with a finite number of sides. Rolling a “1” with a die having no “1” on it is not a possible outcome, and thus has zero probability.

But what I think **Indistinguishable** is getting at is that the situation gets more complicated in the case of infinite possible outcomes.

If you have a fair die with 6 numbered sides, the probability of rolling any of those 6 numbers on one roll is 1/6. If there are 12 sides, the probability of rolling any of them is 1/12. And so on.

Thus if you have a fair die with an infinite number of sides, the probability of rolling any one of them must be 1/(infinity), which is zero. Yet, if you **do** roll that die (leaving aside the physical question of how you possibly could roll a die with an infinite number of sides, and no smart-ass remarks about spherical dice, please), you will in theory get one of those sides as the outcome.

So this is a situation where an outcome may have probability zero and **yet** be possible anyway.  
[/QUOTE]  
Ok, I get that. The terminology is a bit disturbing though. Semantics, I guess.

So is this true, then:

With an infinite number of monkeys hammering on an infinite number of typewriters, not only is “Hamlet” being hammered out by one of the monkeys, but, in fact, an infinite number of “Hamlets” are being initiated at any given moment in time, and further, that every and any publication of past, present, or future is being initiated an infinite number of times per given moment in time?

---

<div class="post-metadata">

**Author:** ![I\_Love\_Me\_Vol.I](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/i_love_me_vol.i/32/521_2.png) [@I\_Love\_Me\_Vol.I](https://boards.straightdope.com/u/I_Love_Me_Vol.I)\
**Post date:** [May 24, 2007, 4:31am UTC](https://boards.straightdope.com/t/how-many-times-do-you-have-to-flip-a-coin-to-ensure-a-heads/405290/51 "2007-05-24T04:31:48Z")

</div>

If a probability of 0 still leaves room for something to possibly occur then how do you indicate the probability of something that is impossible? Do you write it as a probability of “Super-Duper 0”?

Or maybe – “Really, REALLY…no, I’m _SERIOUS_ this time… **ZERO!** ”

I mean, what does the zero in “probability=0” mean if it doesn’t mean “nothing”? And, is there no such thing as impossible? Can anything happen? At any given time and place?  
Well damn-- on review i see that was kind of answered a few posts ago— but I still am not convinced. I don’t see how there is 0 probability of a dart hitting adatbpard at a particular point. I think the probability should be .000000000000000000 (many zeroes later) 00001

---

<div class="post-metadata">

**Author:** ![Indistinguishable](https://avatars.discourse-cdn.com/v4/letter/i/90ced4/32.png) [@Indistinguishable](https://boards.straightdope.com/u/Indistinguishable)\
**Post date:** [May 24, 2007, 4:32am UTC](https://boards.straightdope.com/t/how-many-times-do-you-have-to-flip-a-coin-to-ensure-a-heads/405290/52 "2007-05-24T04:32:33Z")

</div>

[QUOTE=Shamozzle]  
So is this true, then:

With an infinite number of monkeys hammering on an infinite number of typewriters, not only is “Hamlet” being hammered out by one of the monkeys, but, in fact, an infinite number of “Hamlets” are being initiated at any given moment in time, and further, that every and any publication of past, present, or future is being initiated an infinite number of times per given moment in time?  
[/QUOTE]

This happens with probability 1, but is not guaranteed. It’s logically possible that no monkey ever manages to hit any key other than ‘Q’.

(You don’t need an infinite number of monkeys, incidentally. Just the one, with the one typewriter, sitting there forever. With probability 1, every finite string of characters will appear somewhere in his eventual output).

---

<div class="post-metadata">

**Author:** ![Indistinguishable](https://avatars.discourse-cdn.com/v4/letter/i/90ced4/32.png) [@Indistinguishable](https://boards.straightdope.com/u/Indistinguishable)\
**Post date:** [May 24, 2007, 4:38am UTC](https://boards.straightdope.com/t/how-many-times-do-you-have-to-flip-a-coin-to-ensure-a-heads/405290/53 "2007-05-24T04:38:09Z")

</div>

[QUOTE=I Love Me, Vol. I]  
If a probability of 0 still leaves room for something to possibly occur then how do you indicate the probability of something that is impossible? Do you write it as a probability of “Super-Duper 0”?

Or maybe – “Really, REALLY…no, I’m _SERIOUS_ this time… **ZERO!** ”

I mean, what does the zero in “probability=0” mean if it doesn’t mean “nothing”? And, is there no such thing as impossible? Can anything happen? At any given time and place?  
[/QUOTE]

You indicate it by saying “this event is impossible”. In the conventional mathematical theory of probability, you can’t fully indicate an event’s possibility/impossibility through its numeric probability, same as you can’t indicate a stick’s color through its numeric length. Is that so bad? No one’s limiting you to only communicating in terms of remarks on the numeric values of probabilities.

There is such a thing as impossible, and you’re free to talk about it. It’s just not the same thing as probability of 0. Yeah, you want that 0 to mean impossible, and you could try to develop a theory where it did, but that’s not the conventional one. Think about it as analogous to the case of, say, area. How much area does the diagonal of a square take up? Well, 0, it has no area. But all the same, there are points on that diagonal. Just as a region can have points in it but still have area 0, in the conventional theory of probability, an event can be possible but still have probability 0.

---

<div class="post-metadata">

**Author:** ![I\_Love\_Me\_Vol.I](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/i_love_me_vol.i/32/521_2.png) [@I\_Love\_Me\_Vol.I](https://boards.straightdope.com/u/I_Love_Me_Vol.I)\
**Post date:** [May 24, 2007, 4:41am UTC](https://boards.straightdope.com/t/how-many-times-do-you-have-to-flip-a-coin-to-ensure-a-heads/405290/54 "2007-05-24T04:41:11Z")

</div>

So if one is to say an event has “zero chance of occurring” that event could actually still occur? Zero doesn’t actually equal zero?

---

<div class="post-metadata">

**Author:** ![Indistinguishable](https://avatars.discourse-cdn.com/v4/letter/i/90ced4/32.png) [@Indistinguishable](https://boards.straightdope.com/u/Indistinguishable)\
**Post date:** [May 24, 2007, 4:43am UTC](https://boards.straightdope.com/t/how-many-times-do-you-have-to-flip-a-coin-to-ensure-a-heads/405290/55 "2007-05-24T04:43:54Z")

</div>

[QUOTE=I Love Me, Vol. I]  
So if one is to say an event has “zero chance of occurring” that event could actually still occur? Zero doesn’t actually equal zero?  
[/QUOTE]

Zero equals zero, but “zero chance” doesn’t mean the same thing as “impossible”. If you want to say “impossible”, you’re going to have to say something more than just a remark upon the numeric value of the probability, since probabilities don’t give enough information; they can’t distinguish between “impossible” and “possible, but with less probability than any positive real number”. If you want to call an event impossible, you may, horror of horrors, be reduced to using the wording “This event is impossible”.

---

<div class="post-metadata">

**Author:** ![Indistinguishable](https://avatars.discourse-cdn.com/v4/letter/i/90ced4/32.png) [@Indistinguishable](https://boards.straightdope.com/u/Indistinguishable)\
**Post date:** [May 24, 2007, 4:54am UTC](https://boards.straightdope.com/t/how-many-times-do-you-have-to-flip-a-coin-to-ensure-a-heads/405290/56 "2007-05-24T04:54:42Z")

</div>

So, just to head it off, yes, two events can have the exact same probability, even though one is possible and the other is impossible. Probabilities aren’t fine-grained enough to make a distinction. Same as two regions can have the same area, even if one has more points than the other (e.g., the area of the border of India is 0, same as the area of the North Pole and of the empty set, even though there are more points on the border of India).

If that bothers you, feel free to develop an alternative theory of probability (or of area, for that matter) to more accurately capture your own conception of it; I even support such efforts, but, I’ll warn you, there are severe difficulties in trying to get around this particular aspect of the conventional theory.

---

<div class="post-metadata">

**Author:** ![I\_Love\_Me\_Vol.I](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/i_love_me_vol.i/32/521_2.png) [@I\_Love\_Me\_Vol.I](https://boards.straightdope.com/u/I_Love_Me_Vol.I)\
**Post date:** [May 24, 2007, 4:55am UTC](https://boards.straightdope.com/t/how-many-times-do-you-have-to-flip-a-coin-to-ensure-a-heads/405290/57 "2007-05-24T04:55:49Z")

</div>

[QUOTE=Indistinguishable]  
If you want to call an event impossible, you may, horror of horrors, be reduced to using the wording “This event is impossible”.  
[/QUOTE]  
That is very interesting to me. I never knew that using by mathematical expressions/terms/formulae/whatever there was no way to express a particular event’s impossibility. I never dreamed that impossibility can only be expressed in prose, not in mathematical terms. I am quite glad to have my ignorance fought here.

---

<div class="post-metadata">

**Author:** ![Indistinguishable](https://avatars.discourse-cdn.com/v4/letter/i/90ced4/32.png) [@Indistinguishable](https://boards.straightdope.com/u/Indistinguishable)\
**Post date:** [May 24, 2007, 4:58am UTC](https://boards.straightdope.com/t/how-many-times-do-you-have-to-flip-a-coin-to-ensure-a-heads/405290/58 "2007-05-24T04:58:35Z")

</div>

[QUOTE=I Love Me, Vol. I]  
That is very interesting to me. I never knew that, using mathematical expressions/terms/formulae/whatever, there was no way to express a particular event’s impossibility. I am quite glad to have my ignorance fought here.  
[/QUOTE]

Glad to have helped, though I suppose my wording may have been a bit misleading. There’s no reason to say “This event is impossible” is not a mathematical expression. (Jazz it up with Greek letters and jargon and whatnot, if it helps. “Event E is not a member of the state space of the distribution D…”). It just can’t be expressed in the form of a predicate on the event’s probability.

---

<div class="post-metadata">

**Author:** ![Polerius](https://avatars.discourse-cdn.com/v4/letter/p/d78d45/32.png) [@Polerius](https://boards.straightdope.com/u/Polerius)\
**Post date:** [May 24, 2007, 7:21am UTC](https://boards.straightdope.com/t/how-many-times-do-you-have-to-flip-a-coin-to-ensure-a-heads/405290/59 "2007-05-24T07:21:04Z")

</div>

[QUOTE=I Love Me, Vol. I]  
That is very interesting to me. I never knew that using by mathematical expressions/terms/formulae/whatever there was no way to express a particular event’s impossibility. I never dreamed that impossibility can only be expressed in prose, not in mathematical terms.  
[/QUOTE]

There _is_ a way to express it in mathematical terms.

Imagine throwing a dart onto a line segment of length 1. Assume that the dart lands anywhere on the line segment with equal probability.

This is described mathematically by saying that the probability density function (pdf) of x (the position of the dart) is given by f(x) = 1 for x in [0,1], and f(x) = 0 otherwise.

The probability that the dart will land somewhere around point x0, i.e. lands somewhere between x0-D/2 and x0+D/2, where D is small, is equal to D (let’s ignore the line’s edges for now). In math terms, for very small D, we have

```auto

  Pr(x in [x0-D/2, x0+D/2]) = D*f(x0) = D, when x0 in (0,1) 

```

Notice that the above probability goes to zero as D goes to zero, that is, as we narrow the region where we want the dart to land.

But, for any non-zero value of D, we have a non-zero probability of being in that region.

Consider the point x0 = 2, though. For that point f(x) = 0. That point can never occur, nor can any region around it. That is,

```auto

  Pr(x in [x0-D/2, x0+D/2]) = D*f(x0) = 0, when x0 not in [0,1] 

```

The essential difference is that the pdf, f(x), is non-zero in the range [0,1] and zero otherwise.

To summarize, impossible events have pdf equal to 0, while possible events have pdf greater than 0 (even if they have zero probability)

---

<div class="post-metadata">

**Author:** ![Indistinguishable](https://avatars.discourse-cdn.com/v4/letter/i/90ced4/32.png) [@Indistinguishable](https://boards.straightdope.com/u/Indistinguishable)\
**Post date:** [May 24, 2007, 7:58am UTC](https://boards.straightdope.com/t/how-many-times-do-you-have-to-flip-a-coin-to-ensure-a-heads/405290/60 "2007-05-24T07:58:09Z")

</div>

[QUOTE=Polerius]  
To summarize, impossible events have pdf equal to 0, while possible events have pdf greater than 0 (even if they have zero probability)  
[/QUOTE]

But this isn’t true (in general). First of all, there’s a coherence problem to attempting to express impossibility in this way, in that pdfs aren’t uniquely determined by distributions (and, indeed, given any pdf, one can arbitrarily change its value at any one point to get another pdf for the same distribution), nor do they exist for all distributions. But even ignoring that as best we can, what you’ve said doesn’t work in general. For example, let X be a random variable uniformly distributed over (0, 1/2], let Y be either +1 or -1 with equal probabilities, and let Z be X \* Y. Like I said, Z will admit infinitely many pdfs, but the most natural one assigns a value of 1 to the argument 0 [this one will fit your criterion that Pr(Z in [-D/2, D/2]) = D \* f(0)]. Yet, despite that, it is impossible for Z to equal 0.

The other direction doesn’t work either; let X be uniformly distributed over [-1, 1], and let Y be equal to X when X is nonzero but equal to 3 when X is 0. Again, there are infinitely many corresponding pdfs for Y, but the most natural one assigns a value of 0 to the argument 3 [this again being the one fitting your “probability of being close” criterion]. Yet, despite that, it is possible for Y to equal 3.

[Previous page](https://boards.straightdope.com/t/how-many-times-do-you-have-to-flip-a-coin-to-ensure-a-heads/405290.md?page=2)

[Next page](https://boards.straightdope.com/t/how-many-times-do-you-have-to-flip-a-coin-to-ensure-a-heads/405290.md?page=4)
