Difference between revisions of "Counting Rules"
(Created page with "==Resources== * [https://www.hamilton.ie/ollie/EE304/Counting.pdf Some Simple Counting Rules], Hamilton Institute * [https://www.stat.purdue.edu/~huang251/slides4.pdf Basic Co...") |
|||
Line 1: | Line 1: | ||
+ | ==The Counting Principle== | ||
+ | Before we can delve into the properties of probability and odds, we need to understand the '''Counting Principle'''. We use the Counting Principle to determine how many different ways one can choose/do certain events. It is easier to define the Principle through examples: | ||
+ | |||
+ | ===Independent Events=== | ||
+ | Let's say that John is at a deli sub restaurant. There are 3 different breads, 3 different cheeses, 3 different condiments, and 3 different vegetables he can place on his sandwich, assuming that he can only place one from each category on to his sandwich. How many different ways can he set up his sandwich? | ||
+ | |||
+ | Since choosing a cheese doesn't affect the number of choices of vegetables, condiments, or bread, these events are called '''independent events'''. For this problem, we will multiply <math>3\times3\times3\times3</math> , so <math>3^4</math> , which is 81. So there are 81 different possible combinations to form this sandwich. | ||
+ | |||
+ | ====Practice Problems==== | ||
+ | 1) Thomas goes to a McDonalds' restaurant and chooses to create his own burger. He has 2 different kinds of cheese, 3 different breads, and 3 different sauces he can choose from, but he can only choose one of each category. How many different ways can he create this burger? | ||
+ | |||
+ | 2) Diane is ordering pizza for her family. There are 4 different possible sizes of the pizza. Also, she has to choose one of 5 toppings to place on the pizza and one of 3 different types of cheese for the pizza. In addition, she must choose one of 3 different kinds of crust. How many different ways can she have her pizza? | ||
+ | |||
+ | 3) | ||
+ | :a) How many 3-digit numbers can be formed from the digits 2, 3, 4, 5, 7 and 9? | ||
+ | |||
+ | :b) How many of these numbers are less than 400? | ||
+ | |||
+ | ====Answers==== | ||
+ | 1) <math>(2)(3)(3)=18</math> | ||
+ | |||
+ | 2) <math>(4)(5)(3)(3)=180</math> | ||
+ | |||
+ | 3) | ||
+ | :a) Since there are six available digits, the answer is <math>(6)(6)(6)=216</math> | ||
+ | |||
+ | :b) For the value of the 3-digit number to be less than 400, we only have two choices for the first digit, namely 2 or 3. After that we can choose the other two digits freely. The answer is thus <math>(2)(6)(6)=72</math>. | ||
+ | |||
+ | ===Dependent Events=== | ||
+ | Assume that John is now working at a library. He must put 5 books on a shelf in any order. How many different ways can he order the books on the shelf? Unlike the independent events, when John puts a book on the shelf, that eliminates one book from the remaining choices of books to put next on the shelf; thus these are referred to as '''dependent events'''. At first, he has 5 different choices, so our first number in the multiplication problem will be 5. Now that one is missing, the number is reduced to 4. Next, it's down to 3, and so on. So, the problem will be | ||
+ | :<math>(5)(4)(3)(2)(1)</math> | ||
+ | However, there is a symbol for this very idea. A <math>!</math> represents the term ''factorial''. So, for example, <math>3!=(3)(2)(1)</math> . Factorials are very useful in statistics and probability. | ||
+ | |||
+ | Therefore, the problem can be rewritten as <math>5!</math> , which ends up being equal to 120. | ||
+ | |||
+ | However, not all dependent event problems are that simple. Let's say that there are 10 dogs at a dog competition. How many different ways can one select the Champion AND the Runner-Up? This problem could actually be considered simpler than the last one, but it doesn't involve a factorial. So, how many different ways can the judge determine the Champion? Of course, there are 10 different dogs, so 10 different ways. Next, how many dogs are left to select the Runner-Up from? Well, you removed one, so it's down to 9. Instead of placing a factorial, though, you will only multiply 10 and 9, resulting in 90. | ||
+ | |||
+ | ===Independent Or Dependent?=== | ||
+ | To help you differentiate between the two, we will do a few more examples, but we will have to decide if it is dependent or independent before solving the problem. | ||
+ | |||
+ | Let's say that you are creating a 5-digit garage door opener code (the digits would include 0-9). If there were absolutely no restrictions, would the events be independent of each other or dependent on each other? Of course, there are no restrictions, since you could have five 4's for the code, so to solve the problem, you multiply 10 by itself 5 times, resulting in 100000. | ||
+ | |||
+ | Alternatively, suppose that the first number of the code cannot be 0, and that there can be no repeated numbers whatsoever. Obviously these events are dependent on each other, because there cannot be any repetitions. Let's look at this problem one number at a time. | ||
+ | |||
+ | The first number can be all the numbers except 0, reducing the possible numbers to 9. The second number '''can''' be 0 this time, so the possible numbers returns to 10. However, it cannot be a repeat of the previous number, so there are 9 possible choices again. After that, the numbers will reduce by one each time, due to the fact that there cannot be repeats, so the problem would look like this | ||
+ | :<math>(9)(9)(8)(7)(6)=\frac{(9)(9!)}{(5!)}=27216</math> | ||
+ | Now, just one more example. Let's say that you were choosing your schedule for school. There are 8 periods each day, and there are 7 classes to choose from. Nonetheless, you must have a lunch period during the 4th period. We can think of 4th period as non existent because it is in a constant position and therefore does not affect the possible choices. With 7 slots and 7 options, the answer is simply <math>7!</math> . | ||
+ | :<math>(7!)=5040</math> | ||
+ | |||
+ | ===Review Of The Counting Principle=== | ||
+ | So, we use the Counting Principle to determine the different unique ways we can do something, such as a sandwich or a selection of classes. Sometimes, these events will affect each other, such as when you can't choose the same number twice for your garage door code, so they are dependent events. However, other times, one event has no effect on the next event, such as when you have different cheeses and breads to choose for your sandwich, so they are independent events. The Counting Principle is a fundamental mathematical idea and an essential part of probability. | ||
+ | |||
+ | ==Counting Rules== | ||
+ | '''Rule 1:''' If any one of <math>k</math> mutually exclusive and exhaustive events can occur on each of <math>n</math> trials, there are <math>k^n</math> different sequences that may result from a set of such trials. | ||
+ | *Example: Flip a coin three times, finding the number of possible sequences. <math>n=3\ ,\ k=2</math> , therefore, <math>k^n=2^3=8</math> | ||
+ | |||
+ | '''Rule 2:''' If <math>k_1,\dots,k_n</math> are the numbers of distinct events that can occur on trials <math>1,\dots,n</math> in a series, the number of different sequences of <math>n</math> events that can occur is <math>k_1\times\cdots\times k_n</math> . | ||
+ | *Example: Flip a coin and roll a die, finding the number of possible sequences. Therefore, <math>(k_1)(k_2)=(2)(6)=12</math> | ||
+ | |||
+ | '''Rule 3:''' The number of different ways that <math>n</math> distinct things may be arranged in order is <math>n!=(1)(2)(3)\times\cdots\times(n-1)(n)</math> , where <math>0!=1</math> . An arrangement in order is called a permutation, so that the total number of permutations of <math>n</math> objects is <math>n!</math> (the symbol <math>n!</math> Is called n-factorial). | ||
+ | *Example: Arrange 10 items in order, finding the number of possible ways. Therefore, <math>10!=10\cdot9\cdot8\cdot7\cdot6\cdot5\cdot4\cdot3\cdot2\cdot1=3,628,800</math> | ||
+ | |||
+ | '''Rule 4:''' The number of ways of selecting and arranging <math>k</math> objects from among <math>n</math> distinct objects is: <math>\frac{n!}{(n-k)!}</math> , or as seen on calculators, [nPr]. | ||
+ | *Example: pick 3 things from 10 items, and arrange them in order. Therefore <math>n=10\ ,\ k=3</math> , therefore <math>\frac{10!}{(10-3)!}=\frac{10!}{7!}=720</math> | ||
+ | |||
+ | '''Rule 5:''' The total number of ways of selecting <math>k</math> distinct combinations of <math>n</math> objects, irrespective of order (ie order NOT important), is: <math>\binom{n}{k}=\frac{n!}{k!(n-k)!}</math> or as seen on calculators, [nCr]. | ||
+ | *Example: Pick 3 items from 10 in any order, where <math>n=10\ ,\ k=3</math> , Therefore, <math>\binom{10}{3}=\frac{10!}{3!(7!)}=\frac{720}{6}=120</math> . | ||
+ | |||
+ | |||
+ | |||
==Resources== | ==Resources== | ||
* [https://www.hamilton.ie/ollie/EE304/Counting.pdf Some Simple Counting Rules], Hamilton Institute | * [https://www.hamilton.ie/ollie/EE304/Counting.pdf Some Simple Counting Rules], Hamilton Institute | ||
* [https://www.stat.purdue.edu/~huang251/slides4.pdf Basic Counting Rules, Permutations, Combinations], Purdue University | * [https://www.stat.purdue.edu/~huang251/slides4.pdf Basic Counting Rules, Permutations, Combinations], Purdue University |
Revision as of 16:13, 7 October 2021
Contents
The Counting Principle
Before we can delve into the properties of probability and odds, we need to understand the Counting Principle. We use the Counting Principle to determine how many different ways one can choose/do certain events. It is easier to define the Principle through examples:
Independent Events
Let's say that John is at a deli sub restaurant. There are 3 different breads, 3 different cheeses, 3 different condiments, and 3 different vegetables he can place on his sandwich, assuming that he can only place one from each category on to his sandwich. How many different ways can he set up his sandwich?
Since choosing a cheese doesn't affect the number of choices of vegetables, condiments, or bread, these events are called independent events. For this problem, we will multiply , so , which is 81. So there are 81 different possible combinations to form this sandwich.
Practice Problems
1) Thomas goes to a McDonalds' restaurant and chooses to create his own burger. He has 2 different kinds of cheese, 3 different breads, and 3 different sauces he can choose from, but he can only choose one of each category. How many different ways can he create this burger?
2) Diane is ordering pizza for her family. There are 4 different possible sizes of the pizza. Also, she has to choose one of 5 toppings to place on the pizza and one of 3 different types of cheese for the pizza. In addition, she must choose one of 3 different kinds of crust. How many different ways can she have her pizza?
3)
- a) How many 3-digit numbers can be formed from the digits 2, 3, 4, 5, 7 and 9?
- b) How many of these numbers are less than 400?
Answers
1)
2)
3)
- a) Since there are six available digits, the answer is
- b) For the value of the 3-digit number to be less than 400, we only have two choices for the first digit, namely 2 or 3. After that we can choose the other two digits freely. The answer is thus .
Dependent Events
Assume that John is now working at a library. He must put 5 books on a shelf in any order. How many different ways can he order the books on the shelf? Unlike the independent events, when John puts a book on the shelf, that eliminates one book from the remaining choices of books to put next on the shelf; thus these are referred to as dependent events. At first, he has 5 different choices, so our first number in the multiplication problem will be 5. Now that one is missing, the number is reduced to 4. Next, it's down to 3, and so on. So, the problem will be
However, there is a symbol for this very idea. A represents the term factorial. So, for example, . Factorials are very useful in statistics and probability.
Therefore, the problem can be rewritten as , which ends up being equal to 120.
However, not all dependent event problems are that simple. Let's say that there are 10 dogs at a dog competition. How many different ways can one select the Champion AND the Runner-Up? This problem could actually be considered simpler than the last one, but it doesn't involve a factorial. So, how many different ways can the judge determine the Champion? Of course, there are 10 different dogs, so 10 different ways. Next, how many dogs are left to select the Runner-Up from? Well, you removed one, so it's down to 9. Instead of placing a factorial, though, you will only multiply 10 and 9, resulting in 90.
Independent Or Dependent?
To help you differentiate between the two, we will do a few more examples, but we will have to decide if it is dependent or independent before solving the problem.
Let's say that you are creating a 5-digit garage door opener code (the digits would include 0-9). If there were absolutely no restrictions, would the events be independent of each other or dependent on each other? Of course, there are no restrictions, since you could have five 4's for the code, so to solve the problem, you multiply 10 by itself 5 times, resulting in 100000.
Alternatively, suppose that the first number of the code cannot be 0, and that there can be no repeated numbers whatsoever. Obviously these events are dependent on each other, because there cannot be any repetitions. Let's look at this problem one number at a time.
The first number can be all the numbers except 0, reducing the possible numbers to 9. The second number can be 0 this time, so the possible numbers returns to 10. However, it cannot be a repeat of the previous number, so there are 9 possible choices again. After that, the numbers will reduce by one each time, due to the fact that there cannot be repeats, so the problem would look like this
Now, just one more example. Let's say that you were choosing your schedule for school. There are 8 periods each day, and there are 7 classes to choose from. Nonetheless, you must have a lunch period during the 4th period. We can think of 4th period as non existent because it is in a constant position and therefore does not affect the possible choices. With 7 slots and 7 options, the answer is simply .
Review Of The Counting Principle
So, we use the Counting Principle to determine the different unique ways we can do something, such as a sandwich or a selection of classes. Sometimes, these events will affect each other, such as when you can't choose the same number twice for your garage door code, so they are dependent events. However, other times, one event has no effect on the next event, such as when you have different cheeses and breads to choose for your sandwich, so they are independent events. The Counting Principle is a fundamental mathematical idea and an essential part of probability.
Counting Rules
Rule 1: If any one of mutually exclusive and exhaustive events can occur on each of trials, there are different sequences that may result from a set of such trials.
- Example: Flip a coin three times, finding the number of possible sequences. , therefore,
Rule 2: If are the numbers of distinct events that can occur on trials in a series, the number of different sequences of events that can occur is .
- Example: Flip a coin and roll a die, finding the number of possible sequences. Therefore,
Rule 3: The number of different ways that distinct things may be arranged in order is , where . An arrangement in order is called a permutation, so that the total number of permutations of objects is (the symbol Is called n-factorial).
- Example: Arrange 10 items in order, finding the number of possible ways. Therefore,
Rule 4: The number of ways of selecting and arranging objects from among distinct objects is: , or as seen on calculators, [nPr].
- Example: pick 3 things from 10 items, and arrange them in order. Therefore , therefore
Rule 5: The total number of ways of selecting distinct combinations of objects, irrespective of order (ie order NOT important), is: or as seen on calculators, [nCr].
- Example: Pick 3 items from 10 in any order, where , Therefore, .
Resources
- Some Simple Counting Rules, Hamilton Institute
- Basic Counting Rules, Permutations, Combinations, Purdue University