Craps Monter Carlo Simulation Model (Davis-Flood)

11
1 NAVAL POSTGRADUATE SCHOOL MONTEREY, CALIFORNIA SO 2410/3410 PROJECT 1 Simulation of CRAPS using a Monte Carlo Simulation Ian Stafford Davis, MAJ, SF & Patrick Michael Flood, MAJ, SF 21 September 2009

description

The purpose of this project was to write an algorithm for the dice game Craps using a MONTE CARLO SIMULATION that estimates the probability of winning a PASS bet and the probability of winning a DON’T PASS bet.

Transcript of Craps Monter Carlo Simulation Model (Davis-Flood)

Page 1: Craps Monter Carlo Simulation Model (Davis-Flood)

1

NAVALPOSTGRADUATE

SCHOOLMONTEREY, CALIFORNIA

SO 2410/3410 PROJECT 1Simulation of CRAPS using a Monte Carlo Simulation

Ian Stafford Davis, MAJ, SF&

Patrick Michael Flood, MAJ, SF

21 September 2009

Course Professor: Professor William P. Fox

Page 2: Craps Monter Carlo Simulation Model (Davis-Flood)

2

ABSTRACT/EXECUTIVE SUMMARY

The purpose of this project was to write an algorithm for the dice game Craps that estimates the probability of winning a PASS bet and the probability of winning a DON’T PASS bet. Craps has two basic bets: PASS and DON’T PASS. In the PASS bet, a gambler wages that the shooter (the person throwing the dice) will win; in the DON’T PASS bet, a gambler wages that the shooter will looses. Additionally, an initial roll of 12(“boxcars”) means both the PASS and DON’T PASS bets are losers. After running a MONTE CARLO SIMULATION of Craps with 1000 trials ten times (10,000 trials), we identified that a PASS bet had a 49.81 percent chance of winning and a DON’T PASS bet had a 47.03 percent chance of winning. Based on those results, we recommend on placing a PASS bet in a game of Craps with the same rules.

Page 3: Craps Monter Carlo Simulation Model (Davis-Flood)

3

TABLE OF CONTENTS

SECTION ……………………………………………………………….………………PAGE

COVER PAGE ……………………………………………………………………………..1ABSTRACT/ EXECUTIVE SUMMARY ……………………………………………………..2TABLE OF CONTENTS ………………………………………………………………..……3INTRODUCTION OF THE PROBLEM ……………………………………………………..4PROBLEM IDENTIFICATION STATEMENT ……………………………………………..4ASSUMPTIONS AND VARIABLES DEFINED ……………………………………………..4MODEL AND SOLUTION ……………………………………………………………………..5STRENGTHS/ WEAKNESSES ……………………………………………………………..8SUMMARIZED ANSWER …………………………………………………………………..…9

Page 4: Craps Monter Carlo Simulation Model (Davis-Flood)

4

INTRODUCTION OF THE PROBLEM

Craps is a popular casino dice game. The rules are as follows:There are two basic bets in craps, PASS and DON'T PASS. In the PASS bet you wager that the shooter (the person throwing the dice) will win; in the DON'T PASS bet, you wager that the shooter will lose. We will play by the rule that on an initial roll of 12 (``boxcars''), both PASS and DON'T PASS bets are losers. Both are ``even-money'' bets.Conduct of the game:Roll a 7 or 11 on the first roll: Shooter WINS (PASS bets WIN and DON'T PASS bets lose). Roll a 12 on the first roll: Shooter LOSES (``boxcars'', PASS AND DON'T PASS bets lose). Roll a 2 or 3 on the first roll: Shooter LOSES (PASS bets LOSE, DON'T PASS bets WIN). Roll 4,5,6,8,9,10 on the first roll: this becomes the ``point.'' The object then becomes to roll the ``point'' again before rolling a 7. The shooter continues to roll the dice until the point or a 7 appears. PASS betters win if the shooter rolls the point again before rolling a 7. DON'T PASS betters win if the shooter rolls a 7 before rolling the point again.

PROBLEM IDENTIFICATION STATEMENT

Estimate the probability of winning a PASS bet and the probability of winning a DON'T PASS bet based on a MONTE CARLO SIMULATION with at least 1000 trials. From the simulation, determine whether PASS or DON’T PASS is the better bet. Additionally, as the number of trials increases, determine to what values the probabilities converge?

ASSUMPTIONS AND VARIABLES DEFINED

Facts:1. There are two bets: PASS and DON’T’PASS2. In the PASS bet you wager that the shooter (the person throwing the dice) will win.3. In the DON'T PASS bet, you wager that the shooter will lose.4. On an initial roll of 12 (BOXCARS), both PASS and DON'T PASS bets are losers.5. Roll a 7 or 11 (NATURAL) on the first roll: Shooter WINS (PASS bets WIN and DON'T PASS bets

lose).6. Roll a 12 (BOXCARS) on the first roll: Shooter LOSES (, PASS AND DON'T PASS bets lose).7. Roll a 2 or 3 (CRAPS) on the first roll: Shooter LOSES (PASS bets LOSE, DON'T PASS bets WIN).8. Roll 4,5,6,8,9,10 on the first roll: this becomes the ``POINT.''9. The object then becomes to roll the `”POINT'' again before rolling a 7.10. The shooter continues to roll the dice until the POINT or a 7 appears.11. PASS betters win if the shooter rolls the “POINT” again before rolling a 7.12. DON'T PASS betters win if the shooter rolls a 7 before rolling the “POINT” again.

Roll Value Shooter PASS DON'T PASS1 2 or 3 LOSE LOSE WIN1 7 or 11 WIN WIN LOSE1 12 LOSE LOSE LOSE1 4,5,6,8,9, or 10 POINT POINT POINT>1 POINT b 7 WIN WIN LOSE>1 7 b POINT LOSE LOSE WIN

Assumptions:

Page 5: Craps Monter Carlo Simulation Model (Davis-Flood)

5

1. The model assumes that all equipment is not modified or otherwise affected for HOUSE or SHOOTER advantage.

2. All rules stay the same and bets are not weighted.3. Probabilities for variable distributions are correct to serve as a basis for the model.4. Output from simulation will be similar to mathematically calculated probabilities.

Variables:1. t= Trial.2. T= Total trials in simulation (1000)3. P= PASS bet4. D= DON’T PASS bet5. W= Win6. L= Lose7. RAND()= Random generated number between 0 and 1.8. SD= Shooter Demand9. N= NATURAL (IF R= 1 and X= 7 or 11, THEN P=W and D=L).10. PW= POINT WIN (IF R>1 and X= 4,5,6,8,9,or 10 before 7, THEN PASS WIN and DON’T PASS

LOSE).11. 7L= 7 LOSE (IF R>1 and X= 7 before POINT, THEN PASS LOSE and DON’T PASS WIN).12. C= CRAPS (IF R= 1 and X= 2 or 3, THEN P=L and D=W).13. B= BOXCARS (IF R= 1 and X= 12, THEN P=L and D=L).14. PT= POINT: (IF R= 1 and X= 4,5,6,8,9 or 10, THEN POINT).

MODEL AND SOLUTION

1. Distribution of two six-sided dice and mathematical calculations to determine relevant data to build simulation.

1 2 3 4 5 61 2 3 4 5 6 72 3 4 5 6 7 83 4 5 6 7 8 94 5 6 7 8 9 105 6 7 8 9 10 116 7 8 9 10 11 12

Demand Frequency Probability CDF2 1 0.03 0.033 2 0.06 0.084 3 0.08 0.175 4 0.11 0.286 5 0.14 0.427 6 0.17 0.588 5 0.14 0.729 4 0.11 0.8310 3 0.08 0.9211 2 0.06 0.9712 1 0.03 1.00

Totals 36 1.00

P(Outcome of two six-sided dice)

Event Formula ProbabilityP(4)= P(4)/P(4)+P(7) 0.33P(5)= P(5)/P(5)+P(7) 0.40P(6)= P(6)/P(6)+P(7) 0.45P(8)= P(8)/P(8)+P(7) 0.45P(9)= P(9)/P(9)+P(7) 0.40P(10)= P(10)/P(10)+P(7) 0.33

P(POINT before 7)

Event Formula ProbabilityP(4)= P(POINT* Before) 0.03P(5)= P(POINT* Before) 0.04P(6)= P(POINT* Before) 0.06P(8)= P(POINT* Before) 0.06P(9)= P(POINT* Before) 0.04P(10)= P(POINT* Before) 0.03P(POINT WIN) SUM 0.27

P( POINT WIN)

Page 6: Craps Monter Carlo Simulation Model (Davis-Flood)

6

P(POINT- WIN) P(7-LOSE)

P(POINT)P(SD)

Dice

7 or 11- WIN

(0.22)

Point

(0.67)

4

(0.08)

4

(0.33)

7

(0.67)

5

(0.11)

5

(0.40)

7

(0.60)

6

(0.14)

6

(0.45)

7

(0.55)

8

(0.14)

8

(0.45)

7

(0.55)

9

(0.11)

9

(0.40)

7

(0.60)

10

(0.08)

10

(0.33)

7

(0.67)

2 or 3- LOSE

(0.08)

12- LOSE

(0.03)

Outcome ProbabilityP(4-WIN) 0.0264P(7-LOSE) 0.0536P(5-WIN) 0.044P(7-LOSE) 0.066P(6-WIN) 0.068P(7-LOSE) 0.077P(8-WIN) 0.068P(7-LOSE) 0.077P(9-WIN) 0.044P(7-LOSE) 0.066P(10-WIN) 0.0264P(7-LOSE) 0.0536

0.67

DEMAND Probability CFDNATURAL= 0.22 0.22POINT WIN= 0.2768 0.49687 LOSE= 0.3932 0.89CRAPS LOSE 0.08 0.97BOXCARS LOSE 0.03 1

1

Event Ratio Probability CDFP(WIN first roll)= (6+2)/36 0.222222222 0.222222222P(WIN POINT)= (3+4+5+5+4+3)/36 0.270707071 0.492929293

P(WIN)= P(NATURAL)+P(POINT WIN)

2. Build model and run MONTE CARLO SIMULATION.

AlgorithmINPUTS: Demand of outcome of first roll with distribution, Demand of outcome of subsequent rolls with distribution, rules for PASS bet WIN and LOSE, and rules for DON’T PASS WIN and LOSE.

OUTPUTS: Probability of PASS WIN and LOSE, probability of DON’T PASS WIN and LOSE, probability of NATURAL, probability of POINT WIN, probability of 7 LOSE, probability of CRAPS, and probability of BOXCARS.

Step 1: Initialize counter for T, T=0Step 2: Simulate Shooters demand (SD) for trial(T)using table below:

DEMAND Probability CFDNATURAL= 0.22 0.22POINT WIN= 0.2768 0.49687 LOSE= 0.3932 0.89CRAPS LOSE 0.08 0.97BOXCARS LOSE 0.03 1

1

Page 7: Craps Monter Carlo Simulation Model (Davis-Flood)

7

Shooter formula: =IF(RAND()<0.22,N,IF(RAND()<0.4968,PW,IF(RAND()<0.89,7L,IF(RAND()<0.97,C,B))))Step 3: Determine result of PASS bet (P)using 1=WIN and 0=LOSE

PASS formula: =IF(SD=N,1,IF(SD=PW,1,IF(SD=7L,0,IF(SD=C,0,IF(SD=5,0,0)))))Step 4: Determine result of DON’T PASS bet (D) using 1=WIN and 0=LOSE

DON’T PASS formula: =IF(SD=N,0,IF(SD=PW,0,IF(SD=7L,1,IF(SD=C,1,IF(SD=5,0,0)))))Step 5: Increase T by 1, T=T+1.Step 6: Check stopping condition, t<T go back to Step 2, otherwise stop.Step 7: Calculate summary statistics on columns for SD, P, and D.Step 8: Repeat simulation to find average of summary statistics and conduct analysis.

SOLUTION:

After running a MONTE CARLO SIMULATION of Craps with 1000 trials ten times (10,000 trials), we identified that a PASS bet had a 49.81 percent chance of winning and a DON’T PASS bet had a 47.03 percent chance of winning. Based on those results, we recommend on placing a PASS bet in a game of Craps with the same rules. See data below.

1 2 3 4 5 6 7 8 9 10 Average P(WIN)NATURAL 216 210 223 230 201 244 200 223 216 222 218.5 21.85%

POINT WIN 275 274 297 268 285 257 311 277 284 268 279.6 27.96%7 LOSE 394 409 357 384 399 387 393 380 389 394 388.6 38.86%CRAPS 78 78 87 85 82 82 66 93 79 87 81.7 8.17%

BOXCARS 37 29 36 33 33 30 30 27 32 29 31.6 3.16%PASS WIN 491 484 520 498 486 501 511 500 500 490 498.1 49.81%PASS LOSE 509 516 480 502 514 499 489 500 500 510 501.9 50.19%

DON’T PASS WIN 472 487 444 469 481 469 459 473 468 481 470.3 47.03%DON’T PASS LOSE 528 513 556 531 519 531 541 527 532 519 529.7 52.97%

Results of Craps Simulations (10,000 Trials)

Mean 498.1 Mean 501.9 Mean 470.3 Mean 529.7Standard Error 3.532232533 Standard Error 3.532232533 Standard Error 3.867384991 Standard Error 3.867384991Median 499 Median 501 Median 470.5 Median 529.5Mode 500 Mode 500 Mode 469 Mode 531Standard Deviation 11.16990003 Standard Deviation 11.16990003 Standard Deviation 12.22974516 Standard Deviation 12.22974516Sample Variance 124.7666667 Sample Variance 124.7666667 Sample Variance 149.5666667 Sample Variance 149.5666667Kurtosis 0.226113005 Kurtosis 0.226113005 Kurtosis 1.50318384 Kurtosis 1.50318384Skewness 0.719953747 Skewness -0.719953747 Skewness -0.950553565 Skewness 0.950553565Range 36 Range 36 Range 43 Range 43Minimum 484 Minimum 480 Minimum 444 Minimum 513Maximum 520 Maximum 516 Maximum 487 Maximum 556Sum 4981 Sum 5019 Sum 4703 Sum 5297Count 10 Count 10 Count 10 Count 10

DON’T PASS LOSEDON’T PASS WINPASS LOSEPASS WIN

Page 8: Craps Monter Carlo Simulation Model (Davis-Flood)

8

Mean 218.5 Mean 279.6 Mean 388.6 Mean 81.7 Mean 31.6Standard Error 4.174659001 Standard Error 4.917542295 Standard Error 4.344089215 Standard Error 2.3 Standard Error 1.01324561Median 219 Median 276 Median 391 Median 82 Median 31Mode 216 Mode 268 Mode 394 Mode 78 Mode 29Standard Deviation 13.2014309 Standard Deviation 15.55063414 Standard Deviation 13.73721628 Standard Deviation 7.273238618 Standard Deviation 3.204163958Sample Variance 174.2777778 Sample Variance 241.8222222 Sample Variance 188.7111111 Sample Variance 52.9 Sample Variance 10.26666667Kurtosis 0.385465172 Kurtosis 0.749891672 Kurtosis 2.953906873 Kurtosis 1.836656904 Kurtosis -0.643055924Skewness 0.361662769 Skewness 0.794604126 Skewness -1.193530329 Skewness -0.799297929 Skewness 0.453954752Range 44 Range 54 Range 52 Range 27 Range 10Minimum 200 Minimum 257 Minimum 357 Minimum 66 Minimum 27Maximum 244 Maximum 311 Maximum 409 Maximum 93 Maximum 37Sum 2185 Sum 2796 Sum 3886 Sum 817 Sum 316Count 10 Count 10 Count 10 Count 10 Count 10

7 LOSEPOINT WINNATURAL BOXCARSCRAPS

NATURAL22%

POINT WIN28%

7 LOSE39%

CRAPS8%

BOXCARS3%

P(Shooter Demand)

PASS WIN25%

PASS LOSE25%

DON’T PASS WIN24%

DON’T PASS LOSE26%

P(Bet Outcome)

STRENGTHS AND WEAKNESSES OF THE MODEL

STRENGTHS:

1. Generates numerous trials (10,000) in short time to collect several data points for analysis.2. Model not only provides data on the outcome of PASS and DON’T PASS bets, it is also

structured to provide statistics on the different ways of winning and losing.

WEAKNESSES:

1. Assumes that all equipment is “fair” and a limited range of betting rules.2. Does not have a built-in function for easily changing rules or weighting bets.

Outside resources: www.crapsmath.com

Page 9: Craps Monter Carlo Simulation Model (Davis-Flood)

9

SUMMARIZED ANSWER

After running a MONTE CARLO SIMULATION of Craps with 1000 trials ten times (10,000 trials), we identified that a PASS bet had a 49.81 percent chance of winning and a DON’T PASS bet had a 47.03 percent chance of winning. Based on those results, we recommend on placing a PASS bet in a game of Craps with the same rules.