login
Martingale win/loss triangle, read by rows: T(n,k) = total number of dollars won (or lost) using the martingale method on all possible n trials that have exactly k losses and n-k wins, for 0 <= k <= n.
0

%I #56 Mar 31 2024 15:35:53

%S 0,1,-1,2,1,-3,3,5,-1,-7,4,11,7,-7,-15,5,19,24,4,-21,-31,6,29,53,38,

%T -12,-51,-63,7,41,97,111,41,-57,-113,-127,8,55,159,243,187,5,-163,

%U -239,-255,9,71,242,458,500,248,-130,-394,-493,-511,10,89,349,784,1084,874,202,-488,-878,-1003,-1023

%N Martingale win/loss triangle, read by rows: T(n,k) = total number of dollars won (or lost) using the martingale method on all possible n trials that have exactly k losses and n-k wins, for 0 <= k <= n.

%C The martingale betting method is as follows: bet $1. If win, bet $1 on next trial. If lose, double your bet on next trial. Repeat for a total of n times.

%C We can use row n of the triangle to find the total expected value for n trials, if we assume that the probability of each win is p. The expected value is Sum_{k=0..n} T(n,k)*p^k*(1-p)^(n-k). In a "fair" game where p = 1/2, this equals 0, as expected.

%F T(n,k) = T(n-1,k) + T(n-1,k-1) + binomial(n-1,k) for 0 < k < n.

%F Sum_{k=0..n} T(n,k) = 0 (the sum of each row equals 0).

%F The following six formulas describe the three leftmost columns and the three rightmost diagonals of the triangle drawn below.

%F T(n,0) = n (this is the scenario with n trials, 0 losses; since the martingale method has us bet 1 after each win, we end up with total earnings equal to n).

%F T(n,1) = n^2 - n - 1 (this scenario is when there are n trials with just 1 loss; calculations show that this equals n^2 - n - 1 = A165900(n)).

%F T(n,2) = (n^3 - 3n^2 - 2)/2.

%F T(n,n) = 1 - 2^n = A000225(n).

%F T(n,n-1)= 1 + 2*n - 2^n = A070313(n).

%F T(n,n-2) = (3*n^2 - n)/2 + 1 - 2^n.

%F G.f.: x*(1-y)*(1-x*y) / ((1 - x*(1+y))^2 * (1-2*x*y)). - _Kevin Ryde_, Aug 30 2022

%e Triangle T(n,k) begins:

%e n\k| 0 1 2 3 4 5 6 7 8 9

%e ---+-------------------------------------------

%e 0| 0

%e 1| 1 -1

%e 2| 2 1 -3

%e 3| 3 5 -1 -7

%e 4| 4 11 7 -7 -15

%e 5| 5 19 24 4 -21 -31

%e 6| 6 29 53 38 -12 -51 -63

%e 7| 7 41 97 111 41 -57 -113 -127

%e 8| 8 55 159 243 187 5 -163 -239 -255

%e 9| 9 71 242 458 500 248 -130 -394 -493 -511

%e Examples from triangle:

%e T(4,3) = -7: In this example, we consider all possibilities with 4 trials that result in 3 losses and one win. There are binomial(4,3) = 4 different combinations to consider (lllw, llwl, lwll, and wlll), which have net earnings of +1, 0, -2, -6 respectively when using the martingale method, giving a total of -7.

%e T(6,2) = 53: In this example, we have 6 trials and we consider the results with 2 losses and 4 wins. There are binomial(6,2) = 15 such combinations to consider (wwwwll, wwwlwl, wwwllw, wwlwwl, wwlwlw, wwllww, wlwwwl, wlwwlw, wlwlww, wllwww, lwwwwl, lwwwlw, lwwlww, lwlwww, llwwww), and summing over all 15 earnings gives us a total of 53.

%e T(2,0) = 2: In this example, we have 2 trials, with 0 losses and 2 wins. In this one single case, the martingale method gives us earnings of +1 and +1 with a total of 2.

%Y Cf. A000225, A070313, A165900.

%K sign,tabl

%O 0,4

%A _Greg Dresden_ and _Max Winnick_, Jul 12 2022