# 2 player coin game probability

Suppose two players are playing this game: each round they flip a coin. If it's Heads, P1 gets a point. If Tails, P2 gets a point. P1 needs X points to win, while P2 needs Y. What is the probability of P1 winning?

• Is the coin fair? It might be easier by imaging them flipping $X+Y-1$ times May 30, 2021 at 12:33
• @gunes I agree that this may be self-study but isn't the OP supposed to add the tag? May 30, 2021 at 16:38
• I'm voting to reopen since there is no definite evidence that this was self-study. May 30, 2021 at 17:53
• @congriUQ you can add the answer you deleted to the above question as your effort. May 30, 2021 at 19:50
• @gunes I did see the other answer but didn't notice it was by the OP. I have undeleted my own answer. In my opinion the difficulty doesn't suggest self-study (although the solution is trivial once you see it). The OP might have deleted his/her answer given that it was incorrect. May 30, 2021 at 20:23

Let $$x$$ and $$y$$ denote the number of heads and tails needed to win the game by Player 1 and 2 respectively. Let $$Y\sim \operatorname{bin}(x+y-1,1/2)$$ denote the number of tails in next $$x+y-1$$ rounds. Without loss of generality we can ignore the fact that some of these rounds may not need to be played.
Letting $$X$$ denote the number of heads in the same rounds, the event $$Y\ge y. \tag{1a}$$ is the same event as $$x+y-1-X\ge y$$ which simplifies to $$X < x \tag{1b}$$
The complement of (1a) and (1b) is that $$X \ge x \tag{2a}$$ which is the same event as $$Y < y. \tag{2b}$$
Thus, the game is decided with probability 1 during the next $$x+y-1$$ rounds and player 1 ultimately wins the game with probability $$a_{x,y}=P(X\ge x)=P(Y This can also be proved by induction using the fact that $$a_{x,y}$$ must satisfy the recurrence relation $$a_{x,y}=\frac12(a_{x-1,y}+a_{x,y-1})$$ and using $$a_{0,y}=1$$ and $$a_{x,0}=0$$ as base cases.