Wikipedia:Reference desk/Archives/Mathematics/2023 March 23

= March 23 =

Problem of points formula
The problem concerns a game of chance with two players $$A,B$$ who have equal chances of winning each round. The players contribute equally to a prize pot, and agree in advance that the first player to have won a certain number of rounds will collect the entire prize. Now suppose that the game is interrupted by external circumstances before either player has achieved victory – so $$A,B$$ have respectively $$a,b$$ rounds left in order to win.

Fermat's solution to the problem taught in probability textbooks is the general formula
 * $$\sum_{k\,=\,a}^{a\,+\,b\,-\,1}\binom{a+b-1}{k}\Bbb{P}(A)^k\Bbb{P}(B)^{a\,+\,b\,-\,1\,-\,k}$$

such that $$\Bbb{P}(A)+\Bbb{P}(B)=1$$. But this formula does not represent in any way the possible strings of rounds played until winning (for example, in the case $$a=1,b=2$$ we get $$A,BA,BB$$).

After very little trial and error I dicovered a direct and equivalent formula, which represents both the amount of all possible strings of rounds and the probability of either side winning:
 * $$\begin{align}&N_A=\sum_{k\,=\,0}^{b\,-\,1}\binom{a+k-1}{k}=\binom{a+b-1}{a},\qquad\sum_{k\,=\,0}^{b\,-\,1}\binom{a+k-1}{k}\Bbb{P}(A)^a\Bbb{P}(B)^k\\&N_B=\sum_{k\,=\,0}^{a\,-\,1}\binom{b+k-1}{k}=\binom{a+b-1}{b},\qquad\sum_{k\,=\,0}^{a\,-\,1}\binom{b+k-1}{k}\Bbb{P}(A)^k\Bbb{P}(B)^b\end{align}$$

My question is if and how could this simple formula escape Fermat's notice? He was a brilliant mathematician after all. I believe this is the correct formula that should be taught in textbooks. יהודה שמחה ולדמן (talk) 19:47, 23 March 2023 (UTC)


 * Above I see several formulas, but you did not indicate what they represent. So they are a bit like declaring the answer to be 42. Can you give a reference to a textbook in which Fermat's solution takes this form? Our article notes that Fermat simplified (?) the analysis by letting the players continue to play (with no real-life purpose) after one has already won. Are you suggesting that Fermat's solution is wrong, or that your formula is simpler? --Lambiam 21:48, 23 March 2023 (UTC)
 * The book "A First Course in Probability" by Sheldon M. Ross uses Fermat's formula.
 * I am saying my formula is way simpler, because it kills two birds with one stone by calculating both the amount of strings of rounds (left formulae) and their probability of winning (right formulae). יהודה שמחה ולדמן (talk) 22:30, 23 March 2023 (UTC)
 * The text explains Fermat's analysis but does not state that Fermat gave this formula. Binomial coefficients were not included in the common mathematical tool box of his days. Pascal invented his famous triangle to study this kind of problems, but his work describing it (Traité du triangle arithmétique) was published only in 1665, after both his and Fermat's death. The formula in the given form is due to Ross; using what we know today, deriving it from Fermat's analysis is straightforward. I expect that an analysis that leads straightforwardly to your formula is more involved than Fermat's. --Lambiam 00:57, 24 March 2023 (UTC)
 * I did not quite get your words an analysis that leads straightforwardly to your formula is more involved than Fermat's. What do you mean? יהודה שמחה ולדמן (talk) 07:48, 24 March 2023 (UTC)
 * The analysis as formulated by Ross is given in one succinct sentence: "" What follows is a justification of this compelling argument, and its ineluctible conclusion expressed in a formula. You did not present a justification of your formula, but I expect an equally compelling argument will not be equally simple and perspicuous. --Lambiam 12:15, 24 March 2023 (UTC)
 * WLOG, $$A$$ can win after at least $$a$$ rounds or at most $$a+b-1$$ rounds. In other words, a string must end with $$A$$.
 * For every $$k=0,...,b-1$$ there are exactly $$a-1$$ $$A$$'s and at most $$k$$ $$B$$'s during the first $$a-1+k$$ rounds, and the $$a+k$$'th round is an $$A$$. Therefore we get $$N_A$$ strings in total. יהודה שמחה ולדמן (talk) 14:33, 24 March 2023 (UTC)

Writing $$p$$ for $$\Bbb{P}(A)$$ and $$q=1{-}p$$ for $$\Bbb{P}(B),$$ the formula given by Ross can be written as
 * $$\sum_{k=a}^{a{+}b{-}1}\binom{a{+}b{-}1}{k}\,p^k\,q^{a{+}b{-}1{-}k},$$

whereas your version becomes
 * $$\sum_{k=0}^{b{-}1}\binom{a{+}k{-}1}{k}\,p^a\,q^k.$$

Using the somewhat obvious observation that at least $$a$$ wins for player A in $$a+b-1$$ trials is equivalent to fewer than $$b$$ wins for player B, we can rewrite the Ross version as
 * $$\sum_{k=0}^{b{-}1}\binom{a{+}b{-}1}{k}\,p^{a{+}b{-}1{-}k}\,q^k,$$

corresponding to the change of summation variable $$k~{:}{=}~a{+}b{-}1{-}k.$$ I see no immediate reason to prefer some version strongly over any of the others. It is conceivable that Fermat also considered a summation over the continuations ending on a win, but felt his approach was more easily explained. Computationally, tabulation using $$P_A(a,b)=pP_A(a{-}1,b)+qP_A(a,b{-}1)$$ for $$a,b>0,$$ which I suppose was Pascal's approach, is simpler. — Preceding unsigned comment added by Lambiam (talk • contribs) 01:21, 25 March 2023 (UTC)