# coin tossing to infinity

**URL:** <https://boards.straightdope.com/t/coin-tossing-to-infinity/198632>\
**Category:** Factual Questions\
**Created:** [August 30, 2003, 2:55pm UTC](https://boards.straightdope.com/t/coin-tossing-to-infinity/198632 "2003-08-30T14:55:37Z")\
**Posts on this page:** 15\
**Page:** 3

<div class="post-metadata">

**Author:** ![lucwarm](https://avatars.discourse-cdn.com/v4/letter/l/e19adc/32.png) [@lucwarm](https://boards.straightdope.com/u/lucwarm)\
**Post date:** [August 31, 2003, 7:19pm UTC](https://boards.straightdope.com/t/coin-tossing-to-infinity/198632/41 "2003-08-31T19:19:19Z")

</div>

Ok, I did some google searches, and found the following entry from what appears to be a work on probability and statistics:

> **[Chapter12.pdf](https://www.dartmouth.edu/~chance/teaching_aids/books_articles/probability_book/Chapter12.pdf)**
>
> 271.72 KB

* * *

Towards the end of the page, there is a section on the “Gambler’s Ruin” problem with an infinitely rich adversary. This seems to me to be very close to the situation described in the OP.

Anyway, the book defines “p” to be the gambler’s probability of winning and “q” to be his probability of losing. He starts off with stake “z,” and the question is asked what is the probability of eventual ruin?

When q \>= p, eventual ruin is basically certain. However, when p \> q, the probability is given as (q/p)^z. So if the gambler starts out with a decent-sized stake and a decent edge over the house, there is a good chance he will never get to zero.

This of course assumes that the text I found is legit.

---

<div class="post-metadata">

**Author:** ![ultrafilter](https://avatars.discourse-cdn.com/v4/letter/u/3d9bf3/32.png) [@ultrafilter](https://boards.straightdope.com/u/ultrafilter)\
**Post date:** [August 31, 2003, 9:03pm UTC](https://boards.straightdope.com/t/coin-tossing-to-infinity/198632/42 "2003-08-31T21:03:33Z")

</div>

That soundfs right. I knew I had seen a problem like this worked out before, but it’s been a few years.

---

<div class="post-metadata">

**Author:** ![Achernar](https://avatars.discourse-cdn.com/v4/letter/a/e274bd/32.png) [@Achernar](https://boards.straightdope.com/u/Achernar)\
**Post date:** [August 31, 2003, 9:04pm UTC](https://boards.straightdope.com/t/coin-tossing-to-infinity/198632/43 "2003-08-31T21:04:43Z")

</div>

So… what are p and z? I’m having a hard time working it out.

---

<div class="post-metadata">

**Author:** ![ultrafilter](https://avatars.discourse-cdn.com/v4/letter/u/3d9bf3/32.png) [@ultrafilter](https://boards.straightdope.com/u/ultrafilter)\
**Post date:** [August 31, 2003, 9:08pm UTC](https://boards.straightdope.com/t/coin-tossing-to-infinity/198632/44 "2003-08-31T21:08:00Z")

</div>

It’s not quite the same problem–in the “Gambler’s Ruin”, the change in position is 1 or -1, not 2 or -1. Teach me to post before thinking.

z would be 1000 if this were as described.

---

<div class="post-metadata">

**Author:** ![lucwarm](https://avatars.discourse-cdn.com/v4/letter/l/e19adc/32.png) [@lucwarm](https://boards.straightdope.com/u/lucwarm)\
**Post date:** [August 31, 2003, 11:21pm UTC](https://boards.straightdope.com/t/coin-tossing-to-infinity/198632/45 "2003-08-31T23:21:41Z")

</div>

> [@](#):
>
> \*Originally posted by ultrafilter \*  
> **It’s not quite the same problem–in the “Gambler’s Ruin”, the change in position is 1 or -1, not 2 or -1. Teach me to post before thinking.**

Agree, which is why I said it was “very close to the situation described in the OP.”

But it seems analogous – in either case, there’s a good chance that you’ll drift away forever.

Actually, it occurs to me that one can choose a gambler’s ruin problem that is isomorphic to the problem posed in the OP. Just choose p and q such that if you had a mini-gambler’s ruin problem where you start with 1 chip and the two absorbing states are 0 and 3, the odds of ruin are 50/50.

You can do this by taking the second formula from the bottom of page 488 in the text I linked to and setting q[sub]z[/sub] equal to one half; Z equal to 1; and M equal to 3. If you to this and solve for (q/p), it seems you get a cubic equation -

(q/p)^3 - 2 \* (q/p) + 1 = 0.

The only root that makes sense is if q/p = (sqrt(5)-1) /2.

Substituting this figure into the formula under “infinitely rich adversaries” on the next page gives us the probability of eventual ruin as

[(sqrt(5) - 1)/2] ^1000

My calculator gives this figure as 1.02 x 10^(-209).

So by my calculation, the odds of the number in the OP ever hitting zero are approximately one in 10 ^ 208.

Really freaking small.

(Feel free to correct my numbers though)

---

<div class="post-metadata">

**Author:** ![Achernar](https://avatars.discourse-cdn.com/v4/letter/a/e274bd/32.png) [@Achernar](https://boards.straightdope.com/u/Achernar)\
**Post date:** [August 31, 2003, 11:34pm UTC](https://boards.straightdope.com/t/coin-tossing-to-infinity/198632/46 "2003-08-31T23:34:45Z")

</div>

> [@](#):
>
> \*Originally posted by lucwarm \*  
> You can do this by taking the second formula from the bottom of page 488 in the text I linked to and setting q[sub]z[/sub] equal to one half; Z equal to 1; and M equal to 3. If you to this and solve for (q/p), it seems you get a cubic equation -
> 
> (q/p)^3 - 2 \* (q/p) + 1 = 0.
> 
> The only root that makes sense is if q/p = (sqrt(5)-1) /2.

Pretty cool. But q/p = 1 is another root, isn’t it? I’m curious what your reason for discounting it is.

Also, I think you meant 1 in 10[sup]209[/sup] as your final answer, right?

---

<div class="post-metadata">

**Author:** ![lucwarm](https://avatars.discourse-cdn.com/v4/letter/l/e19adc/32.png) [@lucwarm](https://boards.straightdope.com/u/lucwarm)\
**Post date:** [August 31, 2003, 11:55pm UTC](https://boards.straightdope.com/t/coin-tossing-to-infinity/198632/47 "2003-08-31T23:55:54Z")

</div>

> [@](#):
>
> \*Originally posted by Achernar \*  
> **Pretty cool. But q/p = 1 is another root, isn’t it? I’m curious what your reason for discounting it is.**

I discount it because it doesn’t make any sense. If q/p =1, then p=q = 1/2. If you start with 1 chip, and you’re asking whether you’ll get to 3 or to 0 first, and p = q = 1/2, then the odds of “ruin” are gonna be greater than 50/50.

Besides, if you substitute 1 for q/p into the equation I used, you end up dividing by zero. 😃

\*\*

> [@](#):
>
> Also, I think you meant 1 in 10[sup]209[/sup] as your final answer, right? \*\*

What’s an order of magnitude between friends?

(Actually, I hit the “1/x” key on my calculator and read off the answer.)

---

<div class="post-metadata">

**Author:** ![John\_Zahn](https://avatars.discourse-cdn.com/v4/letter/j/e0b2c6/32.png) [@John\_Zahn](https://boards.straightdope.com/u/John_Zahn)\
**Post date:** [September 1, 2003, 12:05am UTC](https://boards.straightdope.com/t/coin-tossing-to-infinity/198632/48 "2003-09-01T00:05:33Z")

</div>

**Imagine that you start with the number 1000. You then flip a coin, heads you add 2 to the number, tails you subtract 1. My question is this. If you flip the coin an infinite number of times will the number ever be reduced to 0?**

The best odds, are getting the 1,000 tails initially, since by giving heads +2, for every tail -1. At a certain point, I fail to see why it would be necessary to carry the experiment any further. To calculate the odds of one coin toss of getting tails is easy enough: 1/2. For two tails in a row it’s 1/4, for three, 1/8 and so on. Ten tails in a row is 1/1024, or 1/2 to the tenth power. Right? It just keeps doubling. I calculated what the odds would be for 26 tails in a row, simply doubling my last entry each time before my 8 decimal calculator ran out of space. 67,108,864/1 odds of just getting 26 tails in a row. Rounding out, that’s one in 67 million. This could be roughly the same odds of winning a lottery, perhaps. And this is with millions and millions of people playing this game, for maybe a couple of winners. And again, this is only the odds for 26 tails coming up in a row. Even if billions of people played the game every day, I doubt any lottery would even come close to ever making a pay out on a lottery that needed something to the equivalent of getting 1,000 tails in a row to win. The number would be 1/2 to the 1,000th power. Not impossible, because one could give odds on it, but a number this size is so astronomical, as to pretty much make it so, I would think.

JZ

---

<div class="post-metadata">

**Author:** ![Achernar](https://avatars.discourse-cdn.com/v4/letter/a/e274bd/32.png) [@Achernar](https://boards.straightdope.com/u/Achernar)\
**Post date:** [September 1, 2003, 12:29am UTC](https://boards.straightdope.com/t/coin-tossing-to-infinity/198632/49 "2003-09-01T00:29:38Z")

</div>

> [@](#):
>
> \*Originally posted by lucwarm \*  
> Besides, if you substitute 1 for q/p into the equation I used, you end up dividing by zero. 😃

Yeah, but it’s 0/0, so it’s okay. 😉

I do believe that Phi[sup]-1000[/sup] is the answer. On the other hand, though, p = q = 1/2 does make a certain amount of sense, because those _are_ actually the odds of success and failure; the difference is how much you get as a result. So, I’m thinking, I’m not totally convinced that the analysis done in that book isn’t actually applicable to this situation. I’ll think about it some more, though.

---

<div class="post-metadata">

**Author:** ![lucwarm](https://avatars.discourse-cdn.com/v4/letter/l/e19adc/32.png) [@lucwarm](https://boards.straightdope.com/u/lucwarm)\
**Post date:** [September 1, 2003, 2:20am UTC](https://boards.straightdope.com/t/coin-tossing-to-infinity/198632/50 "2003-09-01T02:20:35Z")

</div>

> [@](#):
>
> \*Originally posted by Achernar \*  
> \*\*On the other hand, though, p = q = 1/2 does make a certain amount of sense, because those _are_ actually the odds of success and failure; the difference is how much you get as a result. \*\*

The thing is, I was constructing a gambler’s ruin problem with the same chance of ruin as the number in the OP eventually hitting zero. Think about it – in a gambler’s ruin problem where p actually equals q, the chance of eventual ruin is 1.

> [@](#):
>
> I do believe that Phi-1000 is the answer

If by “phi” you mean the golden ratio, I agree.

---

<div class="post-metadata">

**Author:** ![shijinn](https://avatars.discourse-cdn.com/v4/letter/s/cc9497/32.png) [@shijinn](https://boards.straightdope.com/u/shijinn)\
**Post date:** [September 1, 2003, 7:31am UTC](https://boards.straightdope.com/t/coin-tossing-to-infinity/198632/51 "2003-09-01T07:31:27Z")

</div>

**John Zahn** , isn’t there a gambler’s fallacy or something saying the 26th coin wouldn’t know that the odds of getting a tail isn’t 50%?

---

<div class="post-metadata">

**Author:** ![Shade](https://avatars.discourse-cdn.com/v4/letter/s/2bfe46/32.png) [@Shade](https://boards.straightdope.com/u/Shade)\
**Post date:** [September 1, 2003, 10:45am UTC](https://boards.straightdope.com/t/coin-tossing-to-infinity/198632/52 "2003-09-01T10:45:27Z")

</div>

> [@](#):
>
> \*Originally posted by Achernar \*  
> \*\*Your argument sounds good, but I don’t see the math for it. For instance, if there’s a probability of 0.6 of decreasing, the cubic becomes:
> 
> p[sub]1,0[/sub] = 0.6 + 0.4p[sub]1,0[/sub][sup]3[/sup]
> 
> This has roots at 0.823 and 1. So, the 1/phi root increases, and the 1 root is constant. \*\*

:smack: I was using a calculator to find the roots instead of turning my brain on. Never mind.

I considered going to the extreme case where P(+2)=1 and seeing that one is still a solution, where it can be discounted, but I don’t think this helps.

---

<div class="post-metadata">

**Author:** ![nicky](https://avatars.discourse-cdn.com/v4/letter/n/f0a364/32.png) [@nicky](https://boards.straightdope.com/u/nicky)\
**Post date:** [September 1, 2003, 1:25pm UTC](https://boards.straightdope.com/t/coin-tossing-to-infinity/198632/53 "2003-09-01T13:25:41Z")

</div>

> [@](#):
>
> \*Originally posted by I Love Me, Vol. I \*  
> \*\*I am so very much not a math guru but I would like to ask something here.
> 
> Are we talking about ONE infinite series of coin tosses, or an infinite number of coin toss sets?
> 
> If you look at the latter, it seems obvious that eventually, one of the coin tossing sets will reach zero.
> 
> The more interesting question is the former: if you are only allowed one single set of tosses–even if you can toss an infinite amount of times–can you reach zero? The problem being that the higher the number goes, the less chance there will be to return to zero. \*\*

Spot on! The Inevitable-Zeros are confusing the two.

---

<div class="post-metadata">

**Author:** ![nicky](https://avatars.discourse-cdn.com/v4/letter/n/f0a364/32.png) [@nicky](https://boards.straightdope.com/u/nicky)\
**Post date:** [September 1, 2003, 1:43pm UTC](https://boards.straightdope.com/t/coin-tossing-to-infinity/198632/54 "2003-09-01T13:43:49Z")

</div>

> [@](#):
>
> \*Originally posted by enigmatic \*  
> \*\*The point was that as I see it if you tossed the coin an infinite number of times you would definitely get back to zero, as no matter how many tosses you have made there is always a chance of getting back to the start. Therefore if you keep flipping coins for an infinite length of time eventually that event will occur even though the probability of it happening decreases faster than it is increased by the multiple attempts. I suppose this all depends on your definition of infinity.
> 
> Another way I thought of expressing sort of the same problem that might make for less complicated maths is as follows. If you were to repeatedly attempt to do something starting with a 1/1000 chance of success which halved with each subsequent attempt 1/1000, 1/2000, 1/4000 etc if you kept on trying an infinite number of times would you eventually succeed. I would say that this is a much clearer cut yes than the above example even though the probability decreases faster with each attempt (although obviously the probability of success in the first few attempts is much higher).
> 
> As regards the starting number/probability I agree that for any sequence of a defined number of flips/attempts the starting point affects the probability of success, I don’t think this is the case with an infinite series I think there is a 100% probability of success no matter what the starting point is but I can’t really explain why (but I now have a headache). \*\*

But:

In your simplified example, the chance of NEVER EVER getting success is:

999/1000 \* 1999/2000 \* 3999/4000…etc

This series does not tend to zero, or go chaotic, but instead approaches 0.99something

So the chance of success is 1 minus that .99 something

Youll start the series, and theres a small chance of success - at some point - and a 99%+ chance youll carry on for ever  
Same applies to the OP.

---

<div class="post-metadata">

**Author:** ![enigmatic](https://avatars.discourse-cdn.com/v4/letter/e/898d66/32.png) [@enigmatic](https://boards.straightdope.com/u/enigmatic)\
**Post date:** [September 1, 2003, 7:07pm UTC](https://boards.straightdope.com/t/coin-tossing-to-infinity/198632/55 "2003-09-01T19:07:08Z")

</div>

Well thanks for the feedback. It’s probably pretty obvious that I am a biologist not a mathematician and I am thus way out of my depth in this kind of discussion, I understand these things are difficult to address with logic (but I can’t do the math 🙂 ). My reasoning was along the lines of if it’s possible to do something and you keep doing it for long enough it’s bound to happen eventually. But I can certainly see where the opposing viewpoint is coming from especially as concisely expressed in the last post. Could anyone who has been calculating the probability give a fairly concise explanation of their workings suitable for us non-genius types? Thanks

[Previous page](https://boards.straightdope.com/t/coin-tossing-to-infinity/198632.md?page=2)
