Jump to content
BrainDen.com - Brain Teasers
  • 0

A Gambler's Problem


Molly Mae
 Share

Question

Let me present you with a game.  It's a gambling game.  The rules are pretty straightforward:

1. You begin the game with 10 US dollars

2. Every round, you may wager any of your current US dollars

3. After you have wagered, we toss a fair coin, which leads to one of two outcomes:
    a.  Heads - You lose your wager
    b.  Tails - You get your wager back AND win 200% of your wager's value

4. You have 100 rounds in which to maximise your profits as much as possible

5. It should go without saying, but if you ever end a round with 0 US dollars, you've lost

The game is obviously in your favour, but provide a betting strategy which uses these rules to win as many US dollars as possible.

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0
Spoiler

If you bet 10 USD in the first round, your expectancy is 20 USD. Consequently, in each round, you should bet all you money.

However, I would never bet on even 10 tails in a row.

Whatever your strategy is, there always is a chance you get bankrupt.

There is a similar problem: a coin is tossed and as long as heads come out, 2 USD are added to the bank. When tails are tossed, the game ends and you cash the bank. How much would you pay to play this game? (Remember that you might win an infinite amount of USD.)

 

Link to comment
Share on other sites

  • 0

Constant fraction of current money to maximize the median/mode:

Spoiler

The median/mode happens when you win 50 times and lose 50 times.  Therefore, if you maximize the amount of money you have after 1 win and 1 loss, that should maximize after 50 of each.

m = (1-b)(1+2b) = 1+b-2b^2

dm/db = 1-4b

dm/db=0 => b = 1/4

The constant fraction bet that maximizes median payout is 1/4 of current money.

After 1 win and 1 loss = 3/4 * 3/2 = 9/8.  After 50 wins and losses = (9/8)^50 = 361.0988642 times initial money.

Code output (assumes infinitely divisible money):

Spoiler

This is output for betting 1/4 of current money each time.

wins: probability, final money, cumulative probability, money*prob, running total of money * prob = sums to the expected value

0: 7.88861e-31, 3.2072e-13, 7.88861e-31, 2.53004e-43, 2.53004e-43
1: 7.88861e-29, 6.4144e-13, 7.9675e-29, 5.06007e-41, 5.08537e-41
2: 3.90486e-27, 1.28288e-12, 3.98454e-27, 5.00947e-39, 5.06033e-39
3: 1.27559e-25, 2.56576e-12, 1.31543e-25, 3.27286e-37, 3.32346e-37
4: 3.0933e-24, 5.13152e-12, 3.22484e-24, 1.58733e-35, 1.62057e-35
5: 5.93914e-23, 1.0263e-11, 6.26162e-23, 6.09537e-34, 6.25742e-34
6: 9.40364e-22, 2.05261e-11, 1.00298e-21, 1.9302e-32, 1.99277e-32
7: 1.26277e-20, 4.10522e-11, 1.36307e-20, 5.18396e-31, 5.38324e-31
8: 1.46797e-19, 8.21044e-11, 1.60428e-19, 1.20527e-29, 1.2591e-29
9: 1.5006e-18, 1.64209e-10, 1.66102e-18, 2.46411e-28, 2.59002e-28
10: 1.36554e-17, 3.28418e-10, 1.53165e-17, 4.48468e-27, 4.74368e-27
11: 1.11726e-16, 6.56835e-10, 1.27043e-16, 7.33857e-26, 7.81294e-26
12: 8.28636e-16, 1.31367e-09, 9.55679e-16, 1.08855e-24, 1.16668e-24
13: 5.60923e-15, 2.62734e-09, 6.56491e-15, 1.47374e-23, 1.5904e-23
14: 3.48574e-14, 5.25468e-09, 4.14223e-14, 1.83164e-22, 1.99068e-22
15: 1.99849e-13, 1.05094e-08, 2.41271e-13, 2.10028e-21, 2.29935e-21
16: 1.0617e-12, 2.10187e-08, 1.30297e-12, 2.23155e-20, 2.46149e-20
17: 5.24603e-12, 4.20374e-08, 6.549e-12, 2.2053e-19, 2.45145e-19
18: 2.419e-11, 8.40749e-08, 3.0739e-11, 2.03377e-18, 2.27892e-18
19: 1.04399e-10, 1.6815e-07, 1.35138e-10, 1.75547e-17, 1.98336e-17
20: 4.22816e-10, 3.363e-07, 5.57954e-10, 1.42193e-16, 1.62027e-16
21: 1.61073e-09, 6.72599e-07, 2.16868e-09, 1.08337e-15, 1.2454e-15
22: 5.78398e-09, 1.3452e-06, 7.95266e-09, 7.7806e-15, 9.026e-15
23: 1.96152e-08, 2.6904e-06, 2.75679e-08, 5.27728e-14, 6.17988e-14
24: 6.29322e-08, 5.38079e-06, 9.05001e-08, 3.38625e-13, 4.00424e-13
25: 1.91314e-07, 1.07616e-05, 2.81814e-07, 2.05884e-12, 2.45927e-12
26: 5.51867e-07, 2.15232e-05, 8.33681e-07, 1.18779e-11, 1.43372e-11
27: 1.51252e-06, 4.30463e-05, 2.34621e-06, 6.51087e-11, 7.94459e-11
28: 3.94337e-06, 8.60927e-05, 6.28958e-06, 3.39495e-10, 4.18941e-10
29: 9.79043e-06, 0.000172185, 1.608e-05, 1.68577e-09, 2.10471e-09
30: 2.31707e-05, 0.000344371, 3.92507e-05, 7.97931e-09, 1.0084e-08
31: 5.23209e-05, 0.000688741, 9.15716e-05, 3.60356e-08, 4.61196e-08
32: 0.000112817, 0.00137748, 0.000204389, 1.55403e-07, 2.01523e-07
33: 0.000232471, 0.00275497, 0.00043686, 6.40451e-07, 8.41974e-07
34: 0.000458105, 0.00550993, 0.000894965, 2.52413e-06, 3.3661e-06
35: 0.000863856, 0.0110199, 0.00175882, 9.51957e-06, 1.28857e-05
36: 0.00155974, 0.0220397, 0.00331856, 3.43762e-05, 4.72619e-05
37: 0.00269793, 0.0440795, 0.00601649, 0.000118923, 0.000166185
38: 0.00447288, 0.0881589, 0.0104894, 0.000394324, 0.000560509
39: 0.00711073, 0.176318, 0.0176001, 0.00125375, 0.00181426
40: 0.0108439, 0.352636, 0.028444, 0.00382393, 0.00563819
41: 0.0158691, 0.705271, 0.044313, 0.011192, 0.0168302    <---------last situation where you lose money
42: 0.0222923, 1.41054, 0.0666053, 0.0314442, 0.0482744
43: 0.0300686, 2.82108, 0.096674, 0.0848262, 0.133101
44: 0.0389526, 5.64217, 0.135627, 0.219777, 0.352878
45: 0.0484743, 11.2843, 0.184101, 0.547, 0.899878
46: 0.0579584, 22.5687, 0.242059, 1.30804, 2.20792
47: 0.0665905, 45.1374, 0.30865, 3.00572, 5.21364
48: 0.073527, 90.2747, 0.382177, 6.63763, 11.8513
49: 0.0780287, 180.549, 0.460205, 14.088, 25.9393
50: 0.0795892, 361.099, 0.539795, 28.7396, 54.6789
51: 0.0780287, 722.198, 0.617823, 56.3521, 111.031
52: 0.073527, 1444.4, 0.69135, 106.202, 217.233
53: 0.0665905, 2888.79, 0.757941, 192.366, 409.599
54: 0.0579584, 5777.58, 0.815899, 334.859, 744.459
55: 0.0484743, 11555.2, 0.864373, 560.128, 1304.59
56: 0.0389526, 23110.3, 0.903326, 900.206, 2204.79
57: 0.0300686, 46220.7, 0.933395, 1389.79, 3594.59
58: 0.0222923, 92441.3, 0.955687, 2060.73, 5655.31
59: 0.0158691, 184883, 0.971556, 2933.92, 8589.23
60: 0.0108439, 369765, 0.9824, 4009.68, 12598.9
61: 0.00711073, 739530, 0.989511, 5258.6, 17857.5
62: 0.00447288, 1.47906e+06, 0.993984, 6615.66, 24473.2
63: 0.00269793, 2.95812e+06, 0.996681, 7980.8, 32454
64: 0.00155974, 5.91624e+06, 0.998241, 9227.8, 41681.8
65: 0.000863856, 1.18325e+07, 0.999105, 10221.6, 51903.3
66: 0.000458105, 2.3665e+07, 0.999563, 10841.1, 62744.4
67: 0.000232471, 4.733e+07, 0.999796, 11002.9, 73747.2
68: 0.000112817, 9.46599e+07, 0.999908, 10679.2, 84426.5
69: 5.23209e-05, 1.8932e+08, 0.999961, 9905.39, 94331.9
70: 2.31707e-05, 3.7864e+08, 0.999984, 8773.34, 103105
71: 9.79043e-06, 7.57279e+08, 0.999994, 7414.09, 110519
72: 3.94337e-06, 1.51456e+09, 0.999998, 5972.46, 116492
73: 1.51252e-06, 3.02912e+09, 0.999999, 4581.61, 121073
74: 5.51867e-07, 6.05823e+09, 1, 3343.34, 124417
75: 1.91314e-07, 1.21165e+10, 1, 2318.05, 126735
76: 6.29322e-08, 2.42329e+10, 1, 1525.03, 128260
77: 1.96152e-08, 4.84659e+10, 1, 950.67, 129210
78: 5.78398e-09, 9.69317e+10, 1, 560.651, 129771
79: 1.61073e-09, 1.93863e+11, 1, 312.261, 130083
80: 4.22816e-10, 3.87727e+11, 1, 163.937, 130247
81: 1.04399e-10, 7.75454e+11, 1, 80.9567, 130328
82: 2.419e-11, 1.55091e+12, 1, 37.5165, 130366
83: 5.24603e-12, 3.10182e+12, 1, 16.2722, 130382
84: 1.0617e-12, 6.20363e+12, 1, 6.58638, 130389
85: 1.99849e-13, 1.24073e+13, 1, 2.47958, 130391
86: 3.48574e-14, 2.48145e+13, 1, 0.864969, 130392
87: 5.60923e-15, 4.9629e+13, 1, 0.278381, 130392
88: 8.28636e-16, 9.92581e+13, 1, 0.0822488, 130392
89: 1.11726e-16, 1.98516e+14, 1, 0.0221795, 130392
90: 1.36554e-17, 3.97032e+14, 1, 0.00542165, 130392
91: 1.5006e-18, 7.94065e+14, 1, 0.00119157, 130392
92: 1.46797e-19, 1.58813e+15, 1, 0.000233133, 130392
93: 1.26277e-20, 3.17626e+15, 1, 4.0109e-05, 130392
94: 9.40364e-22, 6.35252e+15, 1, 5.97368e-06, 130392
95: 5.93914e-23, 1.2705e+16, 1, 7.5457e-07, 130392
96: 3.0933e-24, 2.54101e+16, 1, 7.8601e-08, 130392
97: 1.27559e-25, 5.08201e+16, 1, 6.48256e-09, 130392
98: 3.90486e-27, 1.0164e+17, 1, 3.96891e-10, 130392
99: 7.88861e-29, 2.03281e+17, 1, 1.6036e-11, 130392
100: 7.88861e-31, 4.06561e+17, 1, 3.2072e-13, 130392

So the expected value for this strategy is 130392 times original money, the median/mode is 361 times original money.  The chance of losing money is about 4.43%.  Since the loss multiplier is half the win multiplier, you double your money for each extra win.

 

bet,   expected value,      median,       probability you end up with more money than before.

0     exp=1    median=1    probwinmoney=0
0.01     exp=1.64667    median=1.62843    probwinmoney=0.999563
0.02     exp=2.70481    median=2.58804    probwinmoney=0.999563
0.03     exp=4.43205    median=4.0168    probwinmoney=0.999105
0.04     exp=7.24465    median=6.09185    probwinmoney=0.999105
0.05     exp=11.8137    median=9.03264    probwinmoney=0.999105
0.06     exp=19.2186    median=13.1007    probwinmoney=0.998241
0.07     exp=31.1914    median=18.5947    probwinmoney=0.998241
0.08     exp=50.5049    median=25.8399    probwinmoney=0.998241
0.09     exp=81.5885    median=35.1698    probwinmoney=0.996681
0.1     exp=131.501    median=46.9016    probwinmoney=0.996681
0.11     exp=211.469    median=61.3044    probwinmoney=0.996681
0.12     exp=339.302    median=78.563    probwinmoney=0.993984
0.13     exp=543.201    median=98.7393    probwinmoney=0.993984
0.14     exp=867.716    median=121.737    probwinmoney=0.993984
0.15     exp=1383.08    median=147.27    probwinmoney=0.989511
0.16     exp=2199.76    median=174.848    probwinmoney=0.989511
0.17     exp=3491.19    median=203.772    probwinmoney=0.989511
0.18     exp=5529.04    median=233.151    probwinmoney=0.9824
0.19     exp=8738    median=261.942    probwinmoney=0.9824
0.2     exp=13780.6    median=289.002    probwinmoney=0.9824
0.21     exp=21688.4    median=313.164    probwinmoney=0.971556
0.22     exp=34064.2    median=333.315    probwinmoney=0.971556
0.23     exp=53393.3    median=348.481    probwinmoney=0.971556
0.24     exp=83522.3    median=357.903    probwinmoney=0.955687
0.25     exp=130392    median=361.099    probwinmoney=0.955687
0.26     exp=203163    median=357.903    probwinmoney=0.955687
0.27     exp=315927    median=348.481    probwinmoney=0.933395
0.28     exp=490326    median=333.315    probwinmoney=0.933395
0.29     exp=759537    median=313.164    probwinmoney=0.933395
0.3     exp=1.17431e+06    median=289.002    probwinmoney=0.903326
0.31     exp=1.81217e+06    median=261.942    probwinmoney=0.903326
0.32     exp=2.79125e+06    median=233.151    probwinmoney=0.903326
0.33     exp=4.29134e+06    median=203.772    probwinmoney=0.864373
0.34     exp=6.58546e+06    median=174.848    probwinmoney=0.864373
0.35     exp=1.00876e+07    median=147.27    probwinmoney=0.864373
0.36     exp=1.54241e+07    median=121.737    probwinmoney=0.815899
0.37     exp=2.35415e+07    median=98.7393    probwinmoney=0.815899
0.38     exp=3.58671e+07    median=78.563    probwinmoney=0.815899
0.39     exp=5.45495e+07    median=61.3044    probwinmoney=0.757941
0.4     exp=8.2818e+07    median=46.9016    probwinmoney=0.757941
0.41     exp=1.25518e+08    median=35.1698    probwinmoney=0.757941
0.42     exp=1.89905e+08    median=25.8399    probwinmoney=0.69135
0.43     exp=2.86832e+08    median=18.5947    probwinmoney=0.69135
0.44     exp=4.32497e+08    median=13.1007    probwinmoney=0.69135
0.45     exp=6.51042e+08    median=9.03264    probwinmoney=0.617823
0.46     exp=9.78388e+08    median=6.09185    probwinmoney=0.617823
0.47     exp=1.4679e+09    median=4.0168    probwinmoney=0.617823
0.48     exp=2.19871e+09    median=2.58804    probwinmoney=0.539795
0.49     exp=3.28803e+09    median=1.62843    probwinmoney=0.539795
0.5     exp=4.90909e+09    median=1    probwinmoney=0.460205
0.51     exp=7.31767e+09    median=0.598925    probwinmoney=0.460205
0.52     exp=1.08907e+10    median=0.349599    probwinmoney=0.460205
0.53     exp=1.61828e+10    median=0.198726    probwinmoney=0.382177
0.54     exp=2.40089e+10    median=0.109915    probwinmoney=0.382177
0.55     exp=3.55646e+10    median=0.0591004    probwinmoney=0.382177
0.56     exp=5.26014e+10    median=0.0308622    probwinmoney=0.30865
0.57     exp=7.76806e+10    median=0.0156355    probwinmoney=0.30865
0.58     exp=1.14544e+11    median=0.0076763    probwinmoney=0.30865
0.59     exp=1.68646e+11    median=0.00364769    probwinmoney=0.242059
0.6     exp=2.47934e+11    median=0.00167546    probwinmoney=0.242059
0.61     exp=3.63958e+11    median=0.000742812    probwinmoney=0.184101
0.62     exp=5.33494e+11    median=0.000317381    probwinmoney=0.184101
0.63     exp=7.80864e+11    median=0.000130469    probwinmoney=0.184101
0.64     exp=1.14128e+12    median=5.15071e-05    probwinmoney=0.135627
0.65     exp=1.66567e+12    median=1.94892e-05    probwinmoney=0.135627
0.66     exp=2.42753e+12    median=7.05253e-06    probwinmoney=0.096674
0.67     exp=3.53286e+12    median=2.43495e-06    probwinmoney=0.096674
0.68     exp=5.13428e+12    median=8.00017e-07    probwinmoney=0.0666053
0.69     exp=7.45124e+12    median=2.49421e-07    probwinmoney=0.0666053
0.7     exp=1.07988e+13    median=7.35571e-08    probwinmoney=0.0666053
0.71     exp=1.56289e+13    median=2.04488e-08    probwinmoney=0.044313
0.72     exp=2.25887e+13    median=5.33818e-09    probwinmoney=0.044313
0.73     exp=3.26036e+13    median=1.303e-09    probwinmoney=0.028444
0.74     exp=4.69955e+13    median=2.95973e-10    probwinmoney=0.028444
0.75     exp=6.76503e+13    median=6.22302e-11    probwinmoney=0.0176001
0.76     exp=9.72543e+13    median=1.2039e-11    probwinmoney=0.0176001
0.77     exp=1.3963e+14    median=2.12852e-12    probwinmoney=0.0104894
0.78     exp=2.00207e+14    median=3.41297e-13    probwinmoney=0.0104894
0.79     exp=2.86695e+14    median=4.91983e-14    probwinmoney=0.00601649
0.8     exp=4.10019e+14    median=6.312e-15    probwinmoney=0.00601649
0.81     exp=5.85642e+14    median=7.12434e-16    probwinmoney=0.00331856
0.82     exp=8.35432e+14    median=6.97946e-17    probwinmoney=0.00331856
0.83     exp=1.19027e+15    median=5.84155e-18    probwinmoney=0.00175882
0.84     exp=1.69369e+15    median=4.09957e-19    probwinmoney=0.000894965
0.85     exp=2.40706e+15    median=2.35913e-20    probwinmoney=0.000894965
0.86     exp=3.41668e+15    median=1.08355e-21    probwinmoney=0.00043686
0.87     exp=4.84384e+15    median=3.84322e-23    probwinmoney=0.00043686
0.88     exp=6.85882e+15    median=1.01045e-24    probwinmoney=0.000204389
0.89     exp=9.70029e+15    median=1.87014e-26    probwinmoney=9.15716e-05
0.9     exp=1.37025e+16    median=2.27983e-28    probwinmoney=3.92507e-05
0.91     exp=1.9333e+16    median=1.67718e-30    probwinmoney=3.92507e-05
0.92     exp=2.72449e+16    median=6.61327e-33    probwinmoney=1.608e-05
0.93     exp=3.83497e+16    median=1.1836e-35    probwinmoney=6.28958e-06
0.94     exp=5.3918e+16    median=7.5368e-39    probwinmoney=2.34621e-06
0.95     exp=7.57185e+16    median=1.17058e-42    probwinmoney=8.33681e-07
0.96     exp=1.06211e+17    median=2.35582e-47    probwinmoney=9.05001e-08
0.97     exp=1.48815e+17    median=1.87685e-53    probwinmoney=2.75679e-08
0.98     exp=2.0827e+17    median=4.13129e-62    probwinmoney=2.16868e-09
0.99     exp=2.91152e+17    median=5.13823e-77    probwinmoney=1.35138e-10
1     exp=4.06561e+17    median=0    probwinmoney=7.88861e-31

 

The median values are centered around 1/4 and mirrored exactly... which makes sense given the parabolic nature of the median outcome.  As harey correctly pointed out, the expected value for the strategy increases with the bet.  So if you want to maximize the expected value, bet everything every time.... but the odds of ending up with more than nothing is 1/2^100.  Alternatively, the lower the bet the better chance you walk away with more than you started with.

A little more math:

Spoiler

Maximizing median outcome for arbitrary probability of winning and win multiplier (rounds drops out of analysis):

m=((1-b)^(r(1-p)))  *  ((1+wb)^rp)

dm/db = r * ((1-b)^(r(1-p)-1))  *  ((1+wb)^(rp-1))  *  (wp(1-b)-(1-p)(1+wb))

setting derivative to 0 means we only care about that last bit...

0 = (wp(1-b)-(1-p)(1+wb))

0 = wp-wpb+p+wpb-1-wb

0 = wp+p-1-wb

b = (wp+p-1)/w

For a win probability of 1/2, b=(w-1)/2w.  Which is 1/4 when w=2... like the OP.

For win probability of 1/2 and win multiplier of 1, b = 0.

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...