|
Scientific Computing (P05 Spring,
2004) |
Craps is centered around the roll of a pair of dice by the "shooter". Players can place various bets on the table, and win or lose those bets based on the outcome of the shooter's rolls. The shooter's first roll can produce 3 outcomes, the most likely outcome is that the rolled value becomes the "point:"
'Craps' (2, 3, or 12); or 'a point' (4, 5, 6, 8, 9, or 10), ie the rest. Now a nice starting bet in Craps, is a bet on the PASS LINE. This is done by placing your chips on the Craps table on the area marked PASS LINE before the shooter's first roll. Now with a pass line bet, if the shooter rolls a natural you win. If the shooter rolls Craps you lose, and if the shooter rolls the point, your bet remains and you win if the shooter rolls the point again before he rolls 7, and lose if and when 7 is rolled before the point. You can also bet on the DON'T PASS LINE. This is pretty much the reverse of the above - except you don't win on a 12 for the first roll...the bet is pushed--which (I think) means that it's called off. You can also bet on the COME LINE after the shooter has had their first roll and already has the point. This is pretty much the same as a pass line bet, in that you win if the point is rolled before 7, and lose if 7 is rolled before the point. Anyway, here are all the bets summarized:
some other bets...
|
In response to questions 4.19a,b, we can simulate a million rolls of the dice and look at how many wins and losses we get in the first twenty rolls and tabulate how many wins and and losses accumulate on the first 20 rolls and then after multiples of 20000 rolls up to a million. Here is the result of one such simulation:
After 0 rolls, there are 0 wins and 0 losses.
After 1 rolls, there are 1 wins and 0 losses.
After 3 rolls, there are 1 wins and 0 losses.
After 4 rolls, there are 1 wins and 0 losses.
After 5 rolls, there are 1 wins and 0 losses.
After 6 rolls, there are 1 wins and 0 losses.
After 7 rolls, there are 1 wins and 0 losses.
After 7 rolls, there are 1 wins and 1 losses.
After 8 rolls, there are 1 wins and 2 losses.
After 9 rolls, there are 2 wins and 2 losses.
After 11 rolls, there are 2 wins and 2 losses.
After 12 rolls, there are 2 wins and 2 losses.
After 13 rolls, there are 2 wins and 2 losses.
After 13 rolls, there are 2 wins and 3 losses.
After 14 rolls, there are 3 wins and 3 losses.
After 16 rolls, there are 3 wins and 3 losses.
After 17 rolls, there are 3 wins and 3 losses.
After 18 rolls, there are 3 wins and 3 losses.
After 18 rolls, there are 4 wins and 3 losses.
After 20 rolls, there are 4 wins and 3 losses.
After 20000 rolls, there are 2871 wins and 3021 losses.
After 100000 rolls, there are 14646 wins and 15295 losses.
After 120000 rolls, there are 17489 wins and 18277 losses.
After 120000 rolls, there are 17490 wins and 18277 losses.
After 140000 rolls, there are 20369 wins and 21332 losses.
After 160000 rolls, there are 23258 wins and 24338 losses.
After 160000 rolls, there are 23259 wins and 24338 losses.
After 180000 rolls, there are 26059 wins and 27322 losses.
After 200000 rolls, there are 28934 wins and 30377 losses.
After 240000 rolls, there are 34791 wins and 36307 losses.
After 240000 rolls, there are 34791 wins and 36308 losses.
After 260000 rolls, there are 37806 wins and 39380 losses.
After 280000 rolls, there are 40758 wins and 42386 losses.
After 280000 rolls, there are 40758 wins and 42387 losses.
After 300000 rolls, there are 43689 wins and 45393 losses.
After 320000 rolls, there are 46616 wins and 48349 losses.
After 340000 rolls, there are 49559 wins and 51334 losses.
After 340000 rolls, there are 49559 wins and 51335 losses.
After 360000 rolls, there are 52477 wins and 54358 losses.
After 380000 rolls, there are 55427 wins and 57266 losses.
After 400000 rolls, there are 58263 wins and 60337 losses.
After 420000 rolls, there are 61160 wins and 63337 losses.
After 440000 rolls, there are 64045 wins and 66357 losses.
After 460000 rolls, there are 66970 wins and 69375 losses.
After 480000 rolls, there are 69901 wins and 72373 losses.
After 500000 rolls, there are 72807 wins and 75332 losses.
After 520000 rolls, there are 75656 wins and 78343 losses.
After 540000 rolls, there are 78491 wins and 81374 losses.
After 540000 rolls, there are 78491 wins and 81375 losses.
After 560000 rolls, there are 81442 wins and 84389 losses.
After 580000 rolls, there are 84385 wins and 87341 losses.
After 600000 rolls, there are 87372 wins and 90380 losses.
After 600000 rolls, there are 87372 wins and 90381 losses.
After 620000 rolls, there are 90231 wins and 93365 losses.
After 620000 rolls, there are 90231 wins and 93366 losses.
After 640000 rolls, there are 93126 wins and 96304 losses.
After 660000 rolls, there are 95978 wins and 99220 losses.
After 680000 rolls, there are 98885 wins and 102252 losses.
After 700000 rolls, there are 101763 wins and 105237 losses.
After 700000 rolls, there are 101763 wins and 105238 losses.
After 720000 rolls, there are 104629 wins and 108280 losses.
After 740000 rolls, there are 107524 wins and 111267 losses.
After 760000 rolls, there are 110493 wins and 114320 losses.
After 800000 rolls, there are 116392 wins and 120436 losses.
After 820000 rolls, there are 119460 wins and 123428 losses.
After 900000 rolls, there are 131132 wins and 135461 losses.
After 920000 rolls, there are 133981 wins and 138486 losses.
After 920000 rolls, there are 133981 wins and 138487 losses.
After 940000 rolls, there are 136905 wins and 141461 losses.
After 960000 rolls, there are 139811 wins and 144549 losses.
After 960000 rolls, there are 139811 wins and 144550 losses.
After 980000 rolls, there are 142784 wins and 147500 losses.
After 1000000 rolls, there are 145648 wins and 150570 losses.From this we can glean a few interesting inferential statistics. The total number of wins and losses is 296218 which means there are about 3.376 rolls per game (this is my answer for question 4.19d). The empirical probability of winning is 145648/296218 ~ 0.4917 which gives the house an edge of 2*0.0083 = 1.66%. In fact, simulating a hundred million rolls, I consistently get an edge of at least 1.5%, contradicting the assertion in the game description above...
As to the last question: "Do the chances of winning improve with the length of the game?" This question may be somewhat ambiguous--it's meaning certainly could use clarification. The rewording, "Does the probability of winning in exactly n games increase with n?" is a legitimate interpretation. The theoretical values are
P(1) = 8/36 = 2/9 ~ .222222
P(2) = (p(x=4))^2+(p(x=5))^2+(p(x=6))^2+(p(x=8))^2+(p(x=9))^2+(p(x=10))^2
= (3/36)^2 + (4/36)^2 + (5/36)^2 + (5/36)^2 + (4/36)^2 + (3/36)^2
= 1/72 + 2/81 + 25/648 = 25/324 ~ 0.07716
These two theoretical computation provide a good basis to test the results of simulating this process using C++ code. Simulating game play 100,000,000 times (where one play means you keep rolling until you win or lose) and counting the number of wins in a fixed number of rolls we get an empirical answer to the question by tabulating wins and losses with the length of the game. Note that the first two values are closely in line with the theoretical values.
rolls won lost
1 22168890 11113383
2 7676104 11136997
3 5520509 7989994
4 3939763 5727807
5 2817545 4127076
6 2015569 2972787
7 1435159 2134027
8 1033831 1519846
9 721139 1118062
10 533291 811232
11 384689 585277
12 273185 419087
13 195514 299100
14 142121 223298
15 102784 162647
16 73255 115700
17 53083 84851
18 39307 63245
19 27732 45038
20 20092 32646
21 14815 24124
22 10794 17628
23 7829 13134
24 5545 9375
25 4301 6890
26 3069 4928
27 2161 3652
28 1604 2628
29 1135 2061
30 844 1521
31 625 1077
32 425 767
33 366 597
34 221 395
35 202 314
36 120 197
37 88 159
38 66 120
39 63 104
40 39 50
41 33 55
42 18 43
43 28 22
44 13 18
45 7 11
46 3 5
47 4 7
48 0 8
49 4 5
50 0 4
51 0 2
52 2 2
53 0 4
54 0 2
55 0 0
56 0 0
57 1 1
58 1 0
59 0 1