CS 1063 Intro. to Computer Programming
Introduction to Gambling


First try at gambling: Suppose you travel to Las Vegas with a "stake" (total amount of money) of $1000. You decide to bet on Roulette. You want to have fun playing, so you decide to bet $50 on each spin, so that you could lose 20 times before you were out of money.

Odds: With Las Vegas Roulette, assuming that you bet on a color, or on even or odd, the odds of winning are 18/38 = .47368421 (approximately). If you win you keep your bet and the house matches it, that is, you double your bet. If you lose, the house keeps your bet.

Let's pretend to bet over and over again, and until we have either lost all our money or have doubled our stake, that is, until we have $2000 and can quit satisfied: First try.

Study this first try carefully. Is this what you expected? The net amount you have won goes up and down, as you probably expected, but in these runs, we only doubled our stake twice in 31 tries; the rest of the time we lost all our money.


Second try at gambling: Let's try to get more data. Again you decide that you want to double your money and go home with $2000. You keep trying for that goal until you either reach it or until you run out of money.

So here we pretend to play until our stake is gone or until we have doubled our stake, and we do this over and over again. This means that each line in the output of the next program represents a whole trip to Las Vegas with $1000 stake. Second try.

Study the wins and losses carefully. Whoa! We won $1000 only 7 times out of 80. We lost our $1000 73 times and won an extra $1000 just 7 times.


Third try at gambling: How bad is all of this. Let's gamble for 1000 days, each time starting with a stake of $1000, and see how often we actually double our money: Third try.

Look at the link, and see the results for 1000 days, and then 10000 and then 10000. We are doubling our money only about 11 percent of the time. That sucks, since we should be winning just somewhat less that half the time (the house edge).


Fourth try: Change the bet: Suppose we try bets of size $10, $20, $25, $50, $100, $200, $500, and $1000, each time. We keep the total stake at $1000.

Here is a table summarizing the results of these bets (the line in red is what we worked out experimentally above):

Bet $1000, 0.4737 odds of winning
Number
of bets
Size of
each bet
% chance of
doubling stake
100$10 0.0028%
50$20 0.52%
40$25 1.43%
20$5010.85%
10$10025.87%
5$20037.16%
2$50044.70%
1$100047.25%


Discussion: So we can conclude that betting small amounts until we double our initial stake is a terrible strategy, which almost always ends in our losing all our money.

It is much better to bet larger amounts. From this, it becomes plausible that our best strategy is to bet the entire $1000 in one bet. In this case we will double our money 47.37 percent of the time, and lose all our money 52.63 percent of the time, on the average.

All this discussion assumes we are placing a bet with even odds of winning or losing (well, slightly worse than even). If we place a bet with long odds, then smaller bets are not as bad as with even odds.


Fifth try: Gamble on a number: Now suppose we start with a stake of $1000 and bet $50 each time, but now we bet on a single number. In roulette, there are 38 numbers (1 through 36 along with 0 and 00. If you number doesn't come up, you lose the bet, but if your number comes up you win at the rate of 35:1, that is, you keep your bet and receive 35*50 = 1750 more money. Sometimes this will push you up to or over $2000 and you can stop, having doubled your money. Other times you will have to keep betting. Here is the program with results: Fifth try.

Notice here that we lost all our money about 40% of the time, but we usually ended with more than $1000, so that the average winnings were about $954. This means that every time we play with $1000, we expect to lose about $46. This isn't a bad outcome.