Probability of winning a Craps variation

360 Views Asked by At

In one of my courses, we were given a variation of the game Craps. As a bonus task I was asked to calculate the odds of winning. Two dice are rolled, and they are summed. If the sum is equal to $7$ or $11$, you win. If it is equal to $2, 3$ or $12$, you lose. If none of those conditions are met, the dice are rolled and summed up again. If the sum of the second roll matches the sum of the first roll you win, if not you lose.

The probability for winning directly is $8/36$, for losing $4/36$. I have trouble calculating the second half of the game. I ran the game for 10 million episodes and brute-forced a value ($2.7814356$) that is extremely close to the actual value.

My current approach looks like this:

total_odds = 36  # the total number of possible combinations
win_odds = 2.7814356  # The value I brute-forced
for x in range(1, 7):  # number between 1 and 6, first roll
    for y in range(1, 7):  # second roll
        if x+y in (7, 11):  # if it's 7 or 11, add one to win_odds
            win_odds += 1
lose_odds = total_odds - win_odds  # every game that's not won is lost
print(f"{100/total_odds*win_odds}, {100/total_odds*lose_odds}")
# (100 / 36) * wins to calculate percentage

If win_odds is 0, the final percentages are 25 (win) : 75 (lose). My observation from repeatedly running the game however shows a ratio of ~ 30 : 70.

How can I mathematically calculate the value I brute-forced?

1

There are 1 best solutions below

0
On BEST ANSWER

This is much easier than the craps game since there is no recursion. If you really understand how to calculate the winning probability of the craps game, you should be able to figure this out.

You actually almost got there. The remaining cases are 4, 5, 6, 8, 9, and 10. You just need to enumerate them one by one. For example, if the first roll ends up with a 4, whose probability is 3/36, the chances of winning is $(\frac{3}{36})^2$. Hence, the chances of winning this variation of the craps game is

$$\frac{8}{36}+(\frac{3}{36})^2+\cdots$$

Try to figure out the rest. It seems that the value is indeed very close to 0.3