Chapter 5
Unraveling Counting Rules
IN THIS CHAPTER
Calculating permutations and probabilities involving them
Calculating combinations and probabilities involving them
Gaining confidence with more complex problems
Probability is the number of ways a certain outcome can occur divided by the total number of possible outcomes of some random process, such as flipping a coin. For example, P(6) when rolling a die is ⅙ because there is one 6 on a die, and there are six total faces on the die. If you roll two dice and you want the total probability of getting a sum of 5, you first figure out the number of ways to get a sum of 5, then divide by the total number of outcomes of two dice
. The number of ways to get a sum of 5 is four: You can get a 2 and a 3, which sum to 5, or you can get a 3 and a 2, which sum to 5 or you can get 4 and a 1 or a 1 and a 4, which sum to 5. Thus, the probability of getting a sum of 5 when rolling two dice is 4/36.
Figuring certain probabilities involves counting the number of ways to rearrange the desired outcomes when order makes a difference, such as the number ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access