# 2 players, two coins game

Suppose this game: There are two players who have a fair coin each. In every round, they toss their coin. If their coin shows heads, the respective player gets a point. Player 1 needs to collect $$X$$ points, player 2 needs to collect $$Y$$ points. The player who reaches his/her goal first wins the game. If both players reach their goal in the same round, nobody wins.

What is the probability that player 1 will win the game?

Player 1 wins in round $$n$$ if she observes her $$X$$th head at $$n$$, while player 2 has still less than $$Y$$ heads in round $$n$$.

The probability for the first event, i.e., that player 1 reaches exactly $$X$$ points after the $$n$$th round is

$$P(x = X| n) = \frac{1}{2} \cdot \textrm{Bino}(X - 1|0.5,~ n - 1)$$

where I denote with $$\textrm{Bino}(k|p,~N)$$ the binomial PMF to get $$k$$ successes after $$N$$ tosses of a coin with heads probability of $$p$$. The above equation basically means that, to get exactly $$X$$ heads at the $$n$$th round, you need to have $$X - 1$$ heads in round $$n - 1$$. Having this, the probability is $$\frac{1}{2}$$ to have exactly $$X$$ in round $$n$$.

The second event is that player 2 has less than $$Y$$ in round $$n$$. This occurs with probability

$$P(y < Y|n) = \sum_{y = 0}^{Y - 1} \textrm{Bino}(y| 0.5,~n) = CDF(Y - 1|0.5,~ n).$$

The probability that player 1 wins is therefore

$$P = \frac{1}{2}\sum_{n = 0}^\infty \textrm{Bino}(X - 1|0.5,~ n - 1)\cdot CDF(Y - 1|0.5,~ n).$$

Is this correct? Can this be simplified any further, e.g., can one find a closed-form expression for the series over $$n$$?