Overview¶
In simple sample spaces, one way to calculate the probability of an event involves counting the number of outcomes in the event and the number of outcomes in the sample space. This section presents some common methods for counting the number of outcomes in a set. These methods rely on special structure that exists in many common experiments, namely, that each outcome consists of several parts and that it is relatively easy to count how many possibilities there are for each of the parts.
We have seen that in a simple sample space , the probability of an event is the ratio of the number of outcomes in to the total number of outcomes in . In many experiments, the number of outcomes in is so large that a complete listing of these outcomes is too expensive, too slow, or too likely to be incorrect to be useful. In such an experiment, it is convenient to have a method of determining the total number of outcomes in the space and in various events in without compiling a list of all these outcomes. In this section, some of these methods will be presented.
Figure 1.10:Three cities with routes between them in Example 1.7.1
(sec-1-7-1)
1.7.1 Multiplication Rule¶
Example 1.7.1 is a special case of a common form of experiment.
Since each of the rows in the array in Example 1.7.2 contains pairs, the following result follows directly.
Figure 1.11:Tree diagram in which end-nodes represent outcomes
Figure 1.11 illustrates the multiplication rule for the case of and with a tree diagram. Each end-node of the tree represents an outcome, which is the pair consisting of the two parts whose names appear along the branch leading to the end-node.
Example 1.7.3: Rolling Two Dice¶
Suppose that two dice are rolled. Since there are six possible outcomes for each die, the number of possible outcomes for the experiment is , as we saw in Example 1.6.5.
The multiplication rule can be extended to experiments with more than two parts.
Theorem 1.7.2: Multiplication Rule¶
Suppose that an experiment has parts (), that the th part of the experiment can have possible outcomes (), and that all of the outcomes in each part can occur regardless of which specific outcomes have occurred in the other parts. Then the sample space of the experiment will contain all vectors of the form , where is one of the possible outcomes of part (). The total number of these vectors in will be equal to the product .
Example 1.7.4: Tossing Several Coins¶
Suppose that we toss six coins. Each outcome in will consist of a sequence of six heads and tails, such as HTTHHH
. Since there are two possible outcomes for each of the six coins, the total number of outcomes in will be . If head and tail are considered equally likely for each coin, then will be a simple sample space. Since there is only one outcome in with six heads and no tails, the probability of obtaining heads on all six coins is . Since there are six outcomes in with one head and five tails, the probability of obtaining exactly one head is .
Example 1.7.5: Combination Lock¶
A standard combination lock has a dial with tick marks for 40 numbers from 0 to 39. The combination consists of a sequence of three numbers that must be dialed in the correct order to open the lock. Each of the 40 numbers may appear in each of the three positions of the combination regardless of what the other two positions contain. It follows that there are possible combinations. This number is supposed to be large enough to discourage would-be thieves from trying every combination.
Note: The Multiplication Rule Is Slightly More General¶
In the statements of Theorems Theorem 1.7.1 and Div, it is assumed that each possible outcome in each part of the experiment can occur regardless of what occurs in the other parts of the experiment. Technically, all that is necessary is that the number of possible outcomes for each part of the experiment not depend on what occurs on the other parts. The discussion of permutations below is an example of this situation.
1.7.2 Permutations¶
Example 1.7.6: Sampling without Replacement¶
Consider an experiment in which a card is selected and removed from a deck of different cards, a second card is then selected and removed from the remaining cards, and finally a third card is selected from the remaining cards. Each outcome consists of the three cards in the order selected. A process of this kind is called sampling without replacement, since a card that is drawn is not replaced in the deck before the next card is selected. In this experiment, any one of the cards could be selected first. Once this card has been removed, any one of the other cards could be selected second. Therefore, there are possible outcomes for the first two selections. Finally, for every given outcome of the first two selections, there are other cards that could possibly be selected third. Therefore, the total number of possible outcomes for all three selections is .
The situation in Div can be generalized to any number of selections without replacement.
Definition 1.7.1: Permutations¶
Suppose that a set has elements. Suppose that an experiment consists of selecting of the elements one at a time without replacement. Let each outcome consist of the elements in the order selected. Each such outcome is called a permutation of elements taken at a time. We denote the number of distinct such permutations by the symbol .
By arguing as in Div, we can figure out how many different permutations there are of elements taken at a time. The proof of the following theorem is simply to extend the reasoning in Div to selecting cards without replacement. The proof is left to the reader.
Theorem 1.7.3: Number of Permutations¶
The number of permutations of elements taken at a time is .
Example 1.7.7: Current Population Survey¶
Div allows us to count the number of points in the sample space of Example 1.6.1. Each outcome in consists of a permutation of elements taken at a time. Hence, the sample space in that example consists of
outcomes.
When , the number of possible permutations will be the number of different permutations of all cards. It is seen from the equation just derived that
The symbol is read factorial. In general, the number of permutations of different items is .
The expression for can be rewritten in the following alternate form for :
Here and elsewhere in the theory of probability, it is convenient to define by the relation
With this definition, it follows that the relation will be correct for the value as well as for the values . To summarize:
Theorem 1.7.4: Permutations¶
The number of distinct orderings of items selected without replacement from a collection of different items () is
Example 1.7.8: Choosing Officers¶
Suppose that a club consists of 25 members and that a president and a secretary are to be chosen from the membership. We shall determine the total possible number of ways in which these two positions can be filled.
Since the positions can be filled by first choosing one of the 25 members to be president and then choosing one of the remaining 24 members to be secretary, the possible number of choices is .
Example 1.7.9: Arranging Books¶
Suppose that six different books are to be arranged on a shelf. The number of possible permutations of the books is .
Example 1.7.10: Sampling with Replacement¶
Consider a box that contains balls numbered . First, one ball is selected at random from the box and its number is noted. This ball is then put back in the box and another ball is selected (it is possible that the same ball will be selected again). As many balls as desired can be selected in this way. This process is called sampling with replacement. It is assumed that each of the balls is equally likely to be selected at each stage and that all selections are made independently of each other.
Suppose that a total of selections are to be made, where is a given positive integer. Then the sample space of this experiment will contain all vectors of the form , where is the outcome of the th selection (). Since there are possible outcomes for each of the selections, the total number of vectors in is . Furthermore, from our assumptions it follows that is a simple sample space. Hence, the probability assigned to each vector in is .
Example 1.7.11: Obtaining Different Numbers¶
For the experiment in Div, we shall determine the probability of the event that each of the balls that are selected will have a different number.
If , it is impossible for all the selected balls to have different numbers because there are only different numbers. Suppose, therefore, that . The number of outcomes in the event is the number of vectors for which all components are different. This equals , since the first component of each vector can have possible values, the second component can then have any one of the other values, and so on. Since is a simple sample space containing vectors, the probability that different numbers will be selected is
Note: Using Two Different Methods in the Same Problem¶
Div illustrates a combination of techniques that might seem confusing at first. The method used to count the number of outcomes in the sample space was based on sampling with replacement, since the experiment allows repeat numbers in each outcome. The method used to count the number of outcomes in the event was permutations (sampling without replacement) because consists of those outcomes without repeats. It often happens that one needs to use different methods to count the numbers of outcomes in different subsets of the sample space. The birthday problem, which follows, is another example in which we need more than one counting method in the same problem.
1.7.3 The Birthday Problem¶
In the following problem, which is often called the birthday problem, it is required to determine the probability that at least two people in a group of people will have the same birthday, that is, will have been born on the same day of the same month but not necessarily in the same year. For the solution presented here, we assume that the birthdays of the people are unrelated (in particular, we assume that twins are not present) and that each of the 365 days of the year is equally likely to be the birthday of any person in the group. In particular, we ignore the fact that the birth rate actually varies during the year and we assume that anyone actually born on February 29 will consider his birthday to be another day, such as March 1.
When these assumptions are made, this problem becomes similar to the one in Div. Since there are 365 possible birthdays for each of people, the sample space will contain outcomes, all of which will be equally probable. If , there are not enough birthdays for every one to be different, and hence at least two people must have the same birthday. So, we assume that . Counting the number of outcomes in which at least two birthdays are the same is tedious. However, the number of outcomes in for which all birthdays will be different is , since the first person’s birthday could be any one of the 365 days, the second person’s birthday could then be any of the other 364 days, and so on. Hence, the probability that all persons will have different birthdays is
The probability that at least two of the people will have the same birthday is therefore
Numerical values of this probability for various values of k are given in tbl-1-1. These probabilities may seem surprisingly large to anyone who has not thought about them before. Many persons would guess that in order to obtain a value of greater than , the number of people in the group would have to be about 100. However, according to tbl-1-1, there would have to be only 23 people in the group. As a matter of fact, for the value of is 0.9999997.
5 | 0.027 | 25 | 0.569 |
10 | 0.117 | 30 | 0.706 |
15 | 0.253 | 40 | 0.891 |
20 | 0.411 | 50 | 0.970 |
22 | 0.476 | 60 | 0.994 |
23 | 0.507 |
: The probability that at least two people in a group of people will have the same birthday {#tbl-1-1}
The calculation in this example illustrates a common technique for solving probability problems. If one wishes to compute the probability of some event , it might be more straightforward to calculate and then use the fact that . This idea is particularly useful when the event is of the form “at least things happen” where is small compared to how many things could happen.
Stirling’s Formula¶
For large values of , it is nearly impossible to compute . For , and cannot be represented on many scientific calculators. In most cases for which is needed with a large value of , one only needs the ratio of to another large number . A common example of this is with large and not so large , which equals . In such cases, we can notice that
Compared to computing , it takes a much larger before becomes difficult to represent. Furthermore, if we had a simple approximation to such that , then the ratio of to would be close to 1 for large . The following result, whose proof can be found in Feller (1968), provides such an approximation.
Example 1.7.12: Approximating the Number of Permutations¶
Suppose thatwewant to compute . The approximation from Stirling’s formula is
The exact calculation yields . The approximation and the exact calculation differ by less than of 1 percent.
1.7.4 Summary¶
Suppose that the following conditions are met:
Each element of a set consists of distinguishable parts .
There are possibilities for the first part .
For each and each combination of the first parts, there are possibilities for the th part .
Under these conditions, there are elements of the set. The third condition requires only that the number of possibilities for be no matter what the earlier parts are. For example, for , it does not require that the same possibilities be available for regardless of what is. It only requires that the number of possibilities for be no matter what is. In this way, the general rule includes the multiplication rule, the calculation of permutations, and sampling with replacement as special cases. For permutations of items at a time, we have for and the possibilities for part are just the items that have not yet appeared in the first parts. For sampling with replacement from items, we have for all , and the possibilities are the same for every part. In the next section, we shall consider how to count elements of sets in which the parts of each element are not distinguishable.
1.7.5 Exercises¶
Exercise 1.7.1¶
Each year starts on one of the seven days (Sunday through Saturday). Each year is either a leap year (i.e., it includes February 29) or not. How many different calendars are possible for a year?
Exercise 1.7.2¶
Three different classes contain 20, 18, and 25 students, respectively, and no student is a member of more than one class. If a team is to be composed of one student from each of these three classes, in how many different ways can the members of the team be chosen?
Exercise 1.7.3¶
In how many different ways can the five letters a
, b
, c
, d
, and e
be arranged?
Exercise 1.7.4¶
If a man has six different sportshirts and four different pairs of slacks, how many different combinations can he wear?
Exercise 1.7.5¶
If four dice are rolled, what is the probability that each of the four numbers that appear will be different?
Exercise 1.7.6¶
If six dice are rolled, what is the probability that each of the six different numbers will appear exactly once?
Exercise 1.7.7¶
If 12 balls are thrown at random into 20 boxes, what is the probability that no box will receive more than one ball?
Exercise 1.7.8¶
An elevator in a building starts with five passengers and stops at seven floors. If every passenger is equally likely to get off at each floor and all the passengers leave independently of each other, what is the probability that no two passengers will get off at the same floor?
Exercise 1.7.9¶
Suppose that three runners from team A and three runners from team B participate in a race. If all six runners have equal ability and there are no ties, what is the probability that the three runners from team A will finish first, second, and third, and the three runners from team B will finish fourth, fifth, and sixth?
Exercise 1.7.10¶
A box contains 100 balls, of which are red. Suppose that the balls are drawn from the box one at a time, at random, without replacement. Determine
(a) The probability that the first ball drawn will be red; (b) The probability that the 50th ball drawn will be red; and (c) The probability that the last ball drawn will be red.
Exercise 1.7.11¶
Let and be positive integers such that both and are large. Use Stirling’s formula to write as simple an approximation as you can for .
- Feller, W. (1968). An Introduction to Probability Theory and Its Applications (3rd ed., Vol. 1, p. 3). John Wiley and Sons.