# Coin-tossing game

I'm doing a really old IB Math Higher Level exam question about an interesting coin flipping game. I have solved some of the question (I think?), but I'm stuck now. Here it goes:

An unbiased coin is tossed $n$ times and $X$ is the number of heads obtained. Write down an expression for the probability that $X = r$.
State the mean and standard deviation of $X$. Two players, A and B, take part in the game. A has three coins and B has two coins. They each toss their coins and count the number of heads which they obtain.

a) If A obtains more heads than B, she wins 5 cents from B. If B obtains more heads than A, she wins 10 cents from A. If they obtain an equal number of heads then B wins 1 cent from A. Show that, in a series of 100 such games, the expectation of A’s winnings is approximately 31 cents.

b) On another occasion they decide that the winner shall be the player obtaining the greater number of heads. If they obtain an equal number of heads, they toss the coins again, until a definite result is achieved. Calculate the probability that

i) no result has been achieved after two tosses
ii) A wins the game.

Here's my progress so far:

$P(X = r) = ^nC_r \ \frac{1}{2}^r\ \frac{1}{2}^{n-r} =\ ^nC_r\ \frac{1}{2}^{n-r+r}\ =\ ^nC_r\ \frac{1}{2}^n$

$\mu = E(X) = \frac{1}{2}n$

$\sigma = \sqrt{\text{Var}(X)} = \sqrt{\frac{1}{2}n(1-\frac{1}{2})} = \sqrt{\frac{1}{4}n}$

$P(\text{A has 3 coins}) =\ ^{3n}C_r\ \frac{1}{2}^{3n}$

$P(\text{B has 2 coins}) =\ ^{2n}C_r\ \frac{1}{2}^{2n}$

Yield Schema:
A > B: B -= 5c
A < B: B += 10c
A = B: B += 1c

I made the Yield schema to get a overview of the rules of the game. What I'm most interested in in this question is the thought process involved in analysing this question.

-
For a) I would enumerate the cases. $A$ gets $0,1,2,3$ heads $\frac{1}{8},\frac{3}{8},\frac{3}{8},\frac{1}{8}$ of the time and $B$ gets $0,1,2$ heads $\frac{1}{4},\frac{1}{2}\frac{1}{4}$ of the time. $A$ wins the game $\frac{1}{8}+\frac{3}{8}\frac{3}{4}+\frac{3}{8}\frac{1}{4}=\frac{16}{32}=\frac{1}{2}$ of the time. Similarly, $B$ wins $\frac{3}{16}$, so there is a tie $\frac{5}{16}$ of the time. $A$'s expectation is then $5\cdot \frac{1}{2}-1\cdot \frac{5}{16}-10\cdot \frac{3}{16}=\frac{5}{16}=0.3125$ cents. For $100$ games $A$ expects to win $31.25$ cents.
For b) you get a tie $\frac{5}{16}$ of the time, so to have no result after two tosses is $(\frac{5}{16})^2$. For an infinite chain to get $A$'s winning probability you can just scale the single toss probabilities up to sum to $!$, so $A$ wins $\frac{16}{19}$
Is it the expression for $A$ winning? A wins if he gets 3 heads (1/8) regardless of what B does, or if he gets 2 heads (3/8) if B gets 0 or 1 (1/4+1/2), or if he gets 1 (3/8) and B gets 0 (1/4). As the A and B results are independent, we multiply the probabilities. As the choices for A are mutually exclusive, we add those probabilities. –  Ross Millikan Nov 2 '11 at 19:39