Hold-at-20 Outcomes (Estimation)

Pig is a folk jeopardy dice game with simple rules: Two players race to reach 100 points. Each turn, a player repeatedly rolls a die until either a 1 ("pig") is rolled or the player holds and scores the sum of the rolls (i.e. the turn total). At any time during a player's turn, the player is faced with two decisions:

Problem:  Simulate a given number of hold-at-20 turns, and report the estimated probabilities of the possible scoring outcomes.

Input Format:  Enter a single positive integer indicating the number of turns simulated.  (Larger numbers will tend to yield better estimations.)

Output Format:

Sample Transcript (input underlined):

Hold-at-20 turn simulations? 1000000
Score   Estimated Probability
0       0.624076
20      0.099659
21      0.095310
22      0.074086
23      0.054599
24      0.035313
25      0.016957

Extra Exercises:

  1. What is the expected average score outcome for hold-at-20?
  2. Additionally allow the user to specify the hold value.  What is the probability of reaching 100 in a single turn?

Todd Neller