# Win a coin game in 10th round

Two players are tossing a fair coin in one round. If it is heads, the first one gets a dollar from the second player. Otherwise, the first player gives a dollar to the second one. If both players have 6 dollars in the beginning of the game, what is the probability that the first player wins all the money exactly on 10th round.

• I am considering sample space to be 2^10; however, a friend of mine considers it to be 960. Whose idea is erroneous and why? Thanks. – Ulugbek Abdullaev Oct 26 '16 at 18:06
• The sample space is not as big as $2^{10}$, because the sequence $HHHHHHTTTT$ and $HHHHHHHHHH$ are considered exactly the same game (they quit playing after the sixth heads). Of course, if you think that they continue playing after one has lost just to "see what would happen", but without any money involved, and analyze those games, then the sample space has size $2^{10}$. It all depends on your interpretation. – Arthur Oct 26 '16 at 18:07
• @Arthur I got your point. Could you elaborate how to exclude those unnecessary? I'm just stuck.. – Ulugbek Abdullaev Oct 26 '16 at 18:41
• Hint: out of those ten rounds, how many Heads were there? How many Tails? We know the last one was $H$...what about the next to last? – lulu Oct 26 '16 at 19:04
• @BruceET It's very nearly the whole story. We see that we want $8$ Heads and $2$ Tails...there must be at least one $T$ in the first $6$ slots and and both $T$ must be in the first $8$. Easy to count. – lulu Oct 26 '16 at 21:58

If the coin is tossed 10 times, there could be wins at trials number 6, 8, and 10.

A win at the 6th requires six heads in a row (probability $.5^6 = 0.015625.$)

A first win at the 8th requires that exactly one of the first six tosses must be tails, followed by two heads (probability $6(.5)^8 = 0.0234375.$)

The simulation below confirms these two results (within simulation error), and suggests that the probability of a first win at the 10th toss must have probability about 0.0265 (two or three place accuracy). I will leave it to you use similar logic to find a combinatorial formula and the exact probability.

m = 10^6; frst.win = numeric(m)
for(i in 1:m)
{ toss = sample(c(-1,1), 10, rep=T)  # vector of 1's (Hs) and -1's (Ts)
cs = cumsum(toss)                  # 1st player's cumulative totals
frst.win[i] = match(6, cs) }       # toss on which cum tot first reaches 6
table(frst.win)/m
frst.win
6        8       10
0.015633 0.023540 0.026513