Conditional probability

Now, let's consider another example. We are still throwing two dice, but this time, we are interested in the probability that the sum of the numbers showing up on two dice is equal to two. Since there's only one way to get this sum, which is one and one, the probability is the same as getting the same number on both dice. In that case, it would still be 1/36.

But how about getting the sum of the numbers that show up on the two dice to seven? As you can see, there are a total of six possible ways of getting a total of seven, outlined in the following table:

Dice 1

Dice 2

1

6

2

5

3

4

4

3

5

2

6

1

In this case, we need to use the general probability formula. From the preceding ...

Get Unity Artificial Intelligence Programming - Fourth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.