Introduction

Previously, I shared a general solution for rolling two dice problems. In response to some feedback, today I will introduce a dice-related problems involving the rolling three dice. Similar to two dice rolling, I will also provide everyone with a detailed explanation, an interesting simulation, as well as a helpful trick.

For readers new to this series, my purpose is to solve each and every probability problem in order to help individuals for interview preparation and share my passion for mathematics to inspire people of all backgrounds.

✨Please give me a 👏 if you are interested in my sharing, leave a comment 💬 to share your views/thoughts. ✨

Problem

When rolling three dice (standard fair 6-sided dice) simultaneously, should you bet on a 9 or 11?

Now, it's your turn to solve this problem first and then look at the solution below.

Solution

As I mentioned on the first day, a probability problem can be solved in various ways. Using practical experience and knowledge to find a solution is known as the heuristic approach. Another straightforward technique is to simply try the problem out many times, also referred to as the navie approach. In today's problem, I will apply both approaches.

Heuristic Approach

Each of the dice has six faces, so there will be: 6 x 6 x 6 = 216 possibilities occurring when rolling three dice at the same time.

These cases below represent scenarios that can result in a sum of 9 or 11.

None

To obtain a sum of 9, we need to count the number of ways to arrange the three combinations. For the first, second, and fifth combinations, all three numbers are different, so we can use the factorial formula to calculate the number of arrangements, here is 3! = 6. However, for the third and fourth combinations, one of the numbers is repeated. In these cases, we need to divide by 2! to account for the repeated number (twice). Lastly, if we roll three 3s, there's only one arrangement in this case.

Next, we add these possibilities, which gives us 25. This means that the probability of rolling a sum of 9 with three dice is 25/216, or about 11.6%. We can use the same process to calculate the probability of rolling a sum of 11, which is 27/216, or approximately 12.5%.

The probability of rolling a sum of 11 is 0.9% higher than the probability of rolling a sum of 9. Therefore, you would have a better chance of winning if you bet on a 11 instead of a 9.

Naive Approach

The most straightforward way to solve this problem is to roll many times and then keep track of the result. To do that, we can conduct a milion trials using the Dice Roll Probability simulation, and then estimate the probability of getting a 9 or 11.

  • First, import my module
# Import module
from dice_rolling import Dice
  • Secondly, initialise variables and Dice object
# Initialise parameters
num_dice = 3# The number of dice
num_sides = 6 # The sides of our dice

# Create Dice object
roll = Dice(num_dice, num_sides)
  • Third, get the probability result.
# Dice Roll Probability
outcome, probabilities = roll.get_dice_probability()

This is the output

None
The probability of rolling three dice

As can be seen, the probability of getting a sum of 9 is approximately 11.6%, and the probability of rolling a sum of 11 is approximately 12.5%, which is consistent with the results calculated using the heuristic approach.

Tip and Trick

Similar to the previous problem, "Rolling two dice", I will show you a memorable way to solve the problems of throwing three dice based on its visualisation.

None
Visualisation of three 6-dice rolling with 1,000,000 trials

These values were obtained from 1,000,000 trials. As you can see, this pattern is symmetrically distributed, in a ladder-like pattern. To illustrate this pattern, let's draw a trapezoid following the steps below:

  1. Place the numbers from 3 to 10 in ascending order on the left-hand side, and the increasing numbers from 11 to 18 on the right-hand side. These numbers represent the sum values.
  2. Put a list of numbers 1, 3, 6, 10, 15, 21, 25, and 27 (in green) from bottom to the top, on the left-hand side, and do the same on the right-hand side. So, how can we remember these number? Easy! - We already know that to get a sum of 3 or 18, threr is only one possibility which is 1, 1, 1 or 6, 6, 6 respectively. Now, let's start with the number 1.
None

We will get the results (red) and add them to the increasing numbers 2, 3, 4, 5, and 6 (black). The last two values, 25 and 27, are not follow the principle and must be remembered.

None

Now, back to the question today, and solve it by using this diagram.

To get the answer and decide which number to bet on, we have to

  • The probability of getting a sum of 9. First, looking at the number 9 (red), which represents for the sum of 9. Next, we get the green number right next to it, which is 25, denoting the number of possibilities. Thus, the probability is 25/216 (~11.6%).
  • The probability of getting a sum of 11. Doing the same procedure, we have the probability of 27/216 (~12.5%).

Moreover, only using this trapezoid, we can answer most questions regarding throwing three 6-sided dice to get a sum of any value.

Conclusion

During today's problem, we can promptly respond to any questions involving rolling three dice using the shortcut above, and provide interviewers with a detailed explanation using either a naive or a heuristic approach. However, remember that the question may not transparent, e.g., what is the probability of getting a sum of [value]. The brainteasers often change that question to be more like a dice game. Your task is to break down the question and then use the same techniques to find a suitable answer.

Speaking of dice game, this type of question is frequently asked since it is more engaging and effectively tests candidates' logical thinking. I am sure that every candidate has studied probability at school and is also well-prepared for their interviews. Nonetheless, two major factors that can set you apart from others are your logical reasoning and your ability to think on your feet.

Thank you so much for reading this article. Next time, we will solve another dice game problem together to enhance your logical thinking. It will be more challenging than previous problems but certainly more interesting. See you all soon.

Note: Unless otherwise noted, all images are by the author.

Source code

Preferences