Consider the scenario of two competing tennis players, player 1 and player 2. I have a function $g_i=f(p_i)$ which returns $g_1$, the probability of a player winning a game on serve, given a value of $p_1$, the probability of a winning a single point. The function has been built using the method described here.
I want to calculate the probability of a player winning a set with score $s_1$:$s_2$, given two inputs $p_1$, the probability of player 1 winning point on serve, and $p_2$, the probability of player 2 winning a point on serve.
For example, if $s_1=6$ and $s_2=0$, then I would want to calculate the probability of player 1 winning the set 6:0. Now this example is rather straightforward to calculate as it is simply $g_1^3*(1-g_2)^3$, where $g_1$ and $g_2$ represent the respective probabilities of each player winning a game. However I am getting lost when considering set scores that have many more combinations of game sequences, e.g. $6:4$