Probability of successful scenarios where you run a trial until there are N more successes than failures How would you calculate the probability of the following scenario being successful or not given the following conditions:

*

*You have two variables X and Y, one with probability P and the other 1-P.

*The goal is to keep running trials until one variable has N more successes than the other.
This can be thought of as if X shows up X gets a point and Y loses a point and the vice versa for Y. The scenario ends when one of the variables gets N points, making that variable the winner.

*How would I calculate the probability of winning in these scenarios?

I understand that for when P(X) = 0.5, the expectation is that half the scenarios will terminate with X winning. But how would one calculate it if the probabilities weren't equal?

See the formula for $h_i^0$ the bottom of this answer. For your formulation, the probability of $X$ "winning" corresponds to $h_i^0$, $N$ corresponds to $i$, $2N$ corresponds to $N$, and $P$ corresponds to $T$.
