All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars
 perplexus dot info

 Coin tossing (Posted on 2004-06-11)
I threw a coin n times, and never got three tails in a row. I calculated the odds of this event, and found out they were just about even; 50%-50%. How many times did I throw the coin?

A second question: what were the chances of having not gotten three heads in a row either?

 See The Solution Submitted by Federico Kereki Rating: 3.6667 (6 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
 The first part now, re: Now that I know... | Comment 24 of 25 |
(In reply to Now that I know... by Charlie)

Actually, it turns out that if the assumption is made that tossing would have stopped before 10 if HHH had been achieved before 10 was up, the answer to the first part would not be 10.

Here's the result of Oskar's formulae:

`i    h       hh       hhh        t       tt      ttt 1 0.500000 0.000000 0.000000 0.500000 0.000000 0.000000 2 0.250000 0.250000 0.000000 0.250000 0.250000 0.000000 3 0.250000 0.125000 0.125000 0.250000 0.125000 0.125000 4 0.187500 0.125000 0.187500 0.187500 0.125000 0.187500 5 0.156250 0.093750 0.250000 0.156250 0.093750 0.250000 6 0.125000 0.078125 0.296875 0.125000 0.078125 0.296875 7 0.101563 0.062500 0.335938 0.101563 0.062500 0.335938 8 0.082031 0.050781 0.367188 0.082031 0.050781 0.367188 9 0.066406 0.041016 0.392578 0.066406 0.041016 0.392578`
`10 0.053711 0.033203 0.413086 0.053711 0.033203 0.413086`
`11 0.043457 0.026855 0.429688 0.043457 0.026855 0.42968812 0.035156 0.021729 0.443115 0.035156 0.021729 0.44311513 0.028442 0.017578 0.453979 0.028442 0.017578 0.45397914 0.023010 0.014221 0.462769 0.023010 0.014221 0.46276915 0.018616 0.011505 0.469879 0.018616 0.011505 0.46987916 0.015060 0.009308 0.475632 0.015060 0.009308 0.47563217 0.012184 0.007530 0.480286 0.012184 0.007530 0.48028618 0.009857 0.006092 0.484051 0.009857 0.006092 0.48405119 0.007975 0.004929 0.487097 0.007975 0.004929 0.48709720 0.006452 0.003987 0.489561 0.006452 0.003987 0.489561`

Note, first that p(hhh) never reaches .5, but approaches asymptotically with larger n.  On Oskar's interpretation of not getting three tails in a row for a given n, that would get closer and closer to the 50% of the question the higher n is, rather than choosing 10, seemingly making the solution to the first part not solvable.

However, my previous post did note that in the case of an intent to stop if HHH were achieved before n tosses, that we should discount those cases where HHH was achieved by n-1.  In the case we had assumed was 10, that was a probability of .393, so that the probability of going all the way to 10 tosses (meaning not getting HHH before then) and not getting a TTT along the way (and the only possible place for HHH was tosses 8-10), was 1 - .413 - .393 = .194 (the subtractions being for finding TTT by toss 10 or finding HHH by toss 9).

But .194 is certainly not near 50% either.  We need 1-p(n,ttt)-p(n-1,hhh) to be as close to .5 as possible.  When n = 5, this would be 1 - .25 - .1875 = .5625; when n=6, this is 1 - .296875 - .25 = .453125.  The latter is closer to the desired 50%, though not that great a match.

Thus, Oskar's answer of n = 10 for the first part was based on allowing tosses to continue even after an HHH was achieved, while the probability calculation of the conditional probability at 10, in some ways accounted for a stopping when HHH was achieved, but not properly adjusting the probability for the chances of that happening.  There is no way that a near 50% probability can be best approximated by n=10 under these calculations.

Continuing with the n=6 choice--the best that can be made under the assumption that tossing stops when either triple appears--we can calculate the conditional probability asked for in part 2.

Again, there was a .453125 a priori probability of the observed conditions happening (tossing continued to the 6th toss and TTT was not achieved).  If HHH was achieved it had to be reached exactly at toss 6 (i.e., tosses 4-6, completed at 6), which had probability .296875 - .25 = .046875, so the probability of having gotten HHH given going 6 tosses and not getting TTT is .046875/.453125 = .103448, and the probability of not getting that HHH of .896552. This is alternatively calculated from (.125000+ 0.078125+.125000+ 0.078125)/.453125, where the numerator is the total of the h, hh, t and tt probabilities on line 6.

 Posted by Charlie on 2004-06-17 08:51:29

 Search: Search body:
Forums (0)