Coin this Flip !

On Wednesday, your Math teacher gives you a coin.

She says," Keep flipping this coin until you see the pattern Head, Tail, Head. Record the number of flips required to reach this pattern, and start flipping again (and counting up from 1 again) until you see that pattern again. Then you record the second number, and start again. At the end of the day you average all of the numbers you’ve recorded."

Confused you still do the needful like the obedient student that you are.

On Thursday, the Math teacher gives you the coin again and says," Do the EXACT same thing except you flip until you see the pattern Head, Tail, Tail."

Will Thursday’s number be equal, higher or lower than Wednesday's?

Lower Equal Higher Can`t Say

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

3 solutions

Satyen Nabar
May 27, 2014

The two patterns differ only in their final required elements (Heads on Wednesday and Tails on Thursday). So let’s look at success and failure AFTER successfully flipping the first two elements (HT).

When you flip HTH on Wednesday, you stop counting. But suppose you fail and flip HTT on Wednesday, you would have to wait until you see the next H to start hoping for the pattern again.

On Thursday, however, if you flip HTT, you stop counting. But if you flip HTH, you have failed to achieve your goal of HTT, but you are one-third of the way to achieving it again (because you got the last H which can be used as the first element of the pattern).

On average, HTH will occur in about 10 flips and HTT will occur in about 8 flips.

Can you demonstrate how to calculate the expected value?

Calvin Lin Staff - 7 years ago

Log in to reply

Let E0 be the the expected game length starting from scratch.

Let Eh be expected number of throws remaining after throwing an H.

Let Et be expected number of throws remaining after throwing a T

Let Eht be expected number of throws remaining after throwing HT and so on...

At the beginning, we expect that E0 throws remain, and the value of E0 is what we need to find. After one throw either Eh or Et throws to remain, with a .5 chance of each possibility.

[0] E0 = (1+Eh)/2 + (1+Et)/2

And note that after a throw of T, we're essentially back at the beginning of the game, so:

[1] E0 = Et

thus substituting [1] into [0]:

[2] E0 = Eh + 2

Now proceeding similarly, one throw after being in position H we will wind up in HH or HT. And for the HTH game, we can note that note that Ehh is the same as Eh:

Eh = (1+Ehh)/2 + (1+Eht)/2

2Eh = 1+Eh + 1+Eht

[3] Eh = Eht + 2

And substituting [2] into [3]:

[4] E0 = 4 + Eht

Now proceeding as before, after HT we'll expect Ehth or Ehtt:

[5] Eht = (1+Ehth)/2 + (1+Ehtt)/2

And since HTH is the end of the game, and HTT puts us right back at the beginning:

[6] Ehth = 0

[7] Ehtt = E0

Hence combining [5], [6], [7]:

[8] Eht = 1/2 + (1+E0)/2

And substituting [8] into [4]:

E0 = 4 + 1/2 + (1+E0)/2

2E0 = 8 + 1 + 1 + E0

E0 = 10

Thus the HTH game requires, on average, 10 throws to complete.

Using same for HTT it will be seen it takes on average 8 throws to complete.

Equations are same till [5]

But here HTT is the end of game and HTH crucially puts us back to Eh, not to beginning of game.

[6] Ehtt = 0

[7] Ehth = Eh

From [3] Ehth = Eh = Eht +2

Combining [5] [6] [7],

Eht = (1+ Eht +2)/2 + 1/2

Eht = 4

From [4] E0 = Eht +4 = 8

Whew!

Satyen Nabar - 7 years ago

Do we use state diagrams, or Markov chains?

Michael Tang - 7 years ago

Imagine you have tossed HT. If you are looking for HTH and the next toss gives you HTT, then your next chance to see HTH is after a total of 6 tosses, whereas if you are looking for HTT and the next toss gives you HTH, then your next chance to see HTT is after a total of 5 tosses.

I will think more about this over the weekend...

Satyen Nabar - 7 years ago

You need to mention that your coin is not biased.

Vishnu Bhagyanath - 5 years, 11 months ago
David Vaccaro
Jul 21, 2014

A gambler bets at a fair casino against a sequence of tosses of a fair coin at even odds.

On Wednesday at each time he takes a new $1 from his fortune and gambles it on Heads, if this wins he gambles his winnings ($2) on tails, and if that wins he gambles his winnings ($4) on Tails getting $8 back. He keeps going until he observes "HTH" for the first time. When this occurs his winnings will be $10 ($8 from the winning sequence HTH and $2 from the sequence starting at the final heads). Since the coin is fair he must on average have taken $10 out of his fortune- and since he puts in a new dollar in each round we have that the average wait for "HTH" is 10 rounds.

On Thursday he does the same thing but gambling on the sequence "HTT". In this case after HTT comes up, his winnings is only $8 (since only the accumulator pays out, since the final T and T both lose). so the expected wait on Thursday is just 8 rounds.

Note that the sequence you need to wait longest for is "HHH" or "TTT" which takes on average 8+4+2=14 rounds.

Rohan Jain
Jun 5, 2014

case 1 HTH suppose you last there flips and prob for getting HTH just after these flips would be would be:

HHH =1/4 HHT =1/8
HTT =1/8 THH =1/4 THT =1/8 TTH =1/4 TTT =1/8

CASE 2 similarly fot HTT HHH =1/4 HHT =1/8
HTH =1/4 THH =1/4 THT =1/8 TTH =1/4 TTT =1/8

clearly HTT would have got in lesser flips than HTH. NOTE: prob of occurring any of the three above mentioned flips is equal(1/8) and events occurring before this have same probability (but its immaterial to consider them)

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...