# Coin game between A and B

Consider the following simple game. In a single round, Player A tosses a fair coin, and then Player B tosses a fair coin. Two rounds are played. The winner is the player with the larger number of Heads tossed. If the numbers are equal, the winner is whoever tossed the ﬁrst Head. If nobody tosses any Head, there is no winner.

a) Write down a sample space for this experiment, and the probability of each outcome (element of the sample space).

attempt:

$$S_{A} = [TH,HH,TT,HT]$$
$$S_B = [TH,HH,TT,HT]$$
P(H) = P(T) = 1/2

b)What is the probability that Player A wins the game, given that his ﬁrst toss is Head?

attempt:

Based on this as reference
Part b is regarding conditional probability as far as my understanding goes.

P(A win | first toss is head)

formula: $$P(A|B) = \frac{P(A \cap B)}{P(A)}$$

$$P(A\,win | first\;toss\,is\,head) = \frac{P(A\,win \cap\,first\,toss\,is\,head)}{P(A\,win)}$$

P(getting head on first toss) = 1/2
P( getting head on second toss) = $$\frac{1}{2} *\frac{1}{2}*\frac{1}{2}$$

Not sure how to calculate the P (A win), as there are multiple ways to win based on the question, and I'm stuck going further than this.

c) Given that Player A wins, what is the probability that his ﬁrst toss was Head?

• Hint: if $A$ throws $H$ first then the only way $A$ can lose is if $A$ throws $T$ second AND $B$ throws $HH$.
– lulu
Apr 17, 2019 at 19:38

A) The sample space is slightly more complex than you have written, by my understanding. The sample space consists of all tuples $$\{(a,b)|a\in S_A, b\in S_b\}$$ because any given game is player A's state AND player B's state. Thus, there are 16 different outcomes and the probability of any given outcome is $$\frac{1}{16}$$.

B) There are 8 games where player A flipped a head first: (HH, TT), (HH, TH), (HH, HT), (HH, HH), (HT, TT), (HT, TH), (HT, HT), and (HT, HH). I am not quite sure from the rules if A wins (HH, HH) and (HT, HT) because player A tosses a coin AND THEN player B tosses a coin so player A technically flipped a head first. Assuming that is how it is played, player A wins $$\frac{7}{8}$$ of the games. If those two cases are define ties, player A wins $$\frac{5}{8}$$ of the games. Symbolically, this is $$P(\text{A wins}|\text{A flipped a head first})$$.

C) Bayes' Theorem: $$P(B|A)=\frac{P(A|B)P(B)}{P(A)}$$ where $$A$$ is the event that player A wins and $$B$$ is the event that player A flipped a head first. We calculated $$P(A|B)$$ in (b) and $$P(A)$$ and $$P(B)$$ can be found by counting the states in which each event occurs.

The sample space has sixteen elements; the identity of an element specifies the sequence obtained by $$A$$ and the sequence obtained by $$B$$. Each element has equal probability of $$\frac1{16}$$. The game outcome table would be $$\begin{array}{c|c} sequences & winner \\ \hline HH - HH & -- \\ HH - HT & A \\ HH - TH & A \\ HH - TT & A \\ HT - HH & B \\ HT - HT & -- \\ HT - TH & A \\ HT - TT & A \\ TH - HH & B \\ TH - HT & B \\ TH - TH & -- \\ TH - TT & A \\ TT - HH & B \\ TT - HT & B \\ TT - TH & B \\ TT - TT & -- \end{array}$$ Of the results in the table, the first $$8$$ have $$A$$ throwing heads on the first toss. Of those, $$5$$ are wins for $$A$$ (one is a win for $$B$$, the other two are not a win for either). So your answer should be $$\frac58$$.

Using Bayes theorem, Prob($$A$$ throwing heads first) = $$\frac8{16}$$; Prob ($$A$$ throwing heads first AND $$A$$ winning) = $$\frac5{16}$$ so Prob ($$A$$ winning given that a$$A$$ throws heads first) = $$\frac5{16} / \frac8{16} = \frac58$$.

• why are 5 wins for A and not 7? ( If the numbers are equal, the winner is whoever tossed the ﬁrst Head, else then one with the more number of heads) , following that statement that's (HH-HH), (HH-HT) , (HH-TH), (HH-TT) , (HT-TH), (HT-HT) . ( HT-TT). No?
– Kal
Apr 17, 2019 at 22:20
• Because if they both do identical sequences "there is no winner." That is to say, $A$ does not win in those two cases of (HH-HH) and (HT-HT). Apr 17, 2019 at 23:22