5D Tree Methods
We look at some examples where the conditional probability formula can be combined with elementary probability rules to arrive at a solution.
example 1
We return to coin flipping. First we will flip two coins. What is the probability of getting (a) two heads, (b) two tails, (c) one head and one tail? To be specific, we name the coins “first coin” and “second coin”, and we label events
1H : first coin is a head |
, | 2H : second coin is a head , |
1T : first coin is a tail |
, | 2T : second coin is a tail . |
Using the general conditional probability formula,
P(E Ù F) = P(E) · P(F | E) ,
we deduce that the probability of two heads is
P(2 heads) = P(1H Ù 2H) = P(1H) · P(2H | 1H) .
Now, the probability the first coin is a head is
P(1H) = 1/2 .
Likewise, the probability the second coin is a head given that the first coin is a head is
P(2H | 1H) = 1/2 .
In fact, what happens with the first coin has nothing to do with the second coin, and vice versa - we say that the two coins are “independent” of each other. No matter what happens with the first coin, the probability the second coin is a head remains at 1/2; thus our formula gives
P(2 heads) = 1/2 · 1/2 = 1/4 .
By the same argument we find that
P(2 tails) = P(1T Ù 2T) = P(1T) · P(2T | 1T) = 1/2 · 1/2 = 1/4 .
The question of one head and one tail is a little more complicated, for there are two ways this event can occur - we could get a head on the first coin and a tail on the second, or a tail on the first coin and a head on the second. We combine the conditional probability formula with our probability Rule 5 and calculate that
P(1 head and 1 tail) = P[(1H Ù 2T) Ú (1T Ù 2H)] |
= P(1H Ù 2T) + P(1T Ù 2H) |
= P(1H) · P(2T | 1H) + P(1T) · P(2H | 1T) |
= 1/2 · 1/2 + 1/2 · 1/2 = 1/4 + 1/4 = 1/2 . |
(As the events (1H Ù 2T) and (1T Ù 2H) are mutually exclusive, we do not have to subtract for double-counting.)
The above method can be illustrated by the tree diagram below at the left. The tree has 4 leaves - the top leaf corresponds to 2 heads, the bottom leaf to two tails, and each of the other two leaves to one head and one tail. To calculate the probability of a leaf, we multiply the probabilities listed on the branches leading to the leaf from “Begin“. For example, the probability of two heads is 1/2 · 1/2 = 1/4, and the probability of two tails is the same. Since there are two leaves corresponding to one head and one tail, each of probability 1/4, the probability of this event is 1/4 + 1/4 = 1/2.
tree diagram - 2 coins |
tree diagram - 3 coins |
For 3 coins a similar method works, as illustrated in the tree diagram at the right. For example, to find the probability of getting all heads in the flipping of 3 coins, corresponding to the top leaf in the tree, we do the calculation
P(3 heads) = P(1H Ù 2H Ù 3H) = P(1H) · P(2H) · P(3H) = 1/2 · 1/2 · 1/2 = 1/8 .
The case of two heads and one tail is more complicated. The tree shows that there are three sequences giving two heads and one tail - namely,
1) head, head, tail , 2) head, tail, head , 3) tail, head, head .
The first of these has probability
P(1H Ù 2H Ù 3T) = P(1H) · P(2H) · P(3T) = 1/2 · 1/2 · 1/2 = 1/8 .
Similar calculations show that the other two ways of getting two heads and a tail have the same probability 1/8; then adding these three probabilities, we find that
P(2 heads and 1 tail) = 1/8 + 1/8 + 1/8 = 3/8 .
The tree method works for more than three coins, although the possibilities can become numerous and the tree diagrams horrendous. In flipping four coins there is only one way of getting all heads, so the probability of this event is
P(4 heads) = P(H Ù H Ù H Ù H) |
= P(H) · P(H) · P(H) · P(H) = 1/2 · 1/2 · 1/2 · 1/2 = 1/16 . |
However if we want to know, for example, the probability of getting two heads and two tails, the calculations are more complicated because there are several possible sequences. (Can you list them all?) For problems involving many coins, counting methods are used.
example 2
When Grace shoots a free throw, the probability she hits it is 3/4. If Grace has been fouled and will shoot two free throws, what is the probability she will (a) hit both shots, (b) miss both shots, (c) hit one shot and miss one shot?
We will assume that what Grace does on the second shot is independent of what she does on the first shot, although in an actual basketball game this assumption might not be totally valid. For example, if she misses the first shot she might concentrate more on the second and increase her probability of hitting it. On the other hand, missing the first shot might make her nervous so that she is more likely to miss the second shot. But for the sake of simplicity we will ignore these considerations, and assume that her chances of hitting any given throw are always 3/4.
The problem is much like the flipping of two coins, except that the probabilities are different. The tree diagram is displayed at the right. The probability that Grace hits both shots is
P(hit Ù hit) = P(hit) · P(hit) = 3/4 · 3/4 = 9/16 ,
and the probability she misses both shots is
P(miss Ù miss) = P(miss) · P(miss) = 1/4 · 1/4 = 1/16 .
The tree diagram shows there are two ways Grace can hit one shot and miss the other - she can hit the first and miss the second, or vice versa. The probability of this event is
P(one hit & one miss) = P(hit then miss) + P(miss then hit) |
= P(hit) · P(miss) + P(miss) · P(hit) |
= 3/4 · 1/4 + 1/4 · 3/4 = 3/16 + 3/16 = 6/16 = 3/8 . |
Now suppose Grace is fouled while shooting a three point shot, and will shoot three free throws. The probability she hits all three is
P(hit Ù hit Ù hit) = P(hit) · P(hit) · P(hit) = 3/4 · 3/4 · 3/4 = 27/64 ,
while the probability she misses all three is
P(miss Ù miss Ù miss) = P(miss) · P(miss) · P(miss) = 1/4 · 1/4 · 1/4 = 1/64 .
There are three ways Grace can hit two free throws and miss one, and the probability of this event is
P(2 hits & 1 miss) |
= P(1H Ù 2H Ù 3M) + P(1H Ù 2M Ù 3H) + P(1M Ù 2H Ù 3H) |
= P(H) · P(H) · P(M) + P(H) · P(M) · P(H) + P(M) · P(H) · P(H) |
|
|
= 3/4 · 3/4 · 1/4 + 3/4 · 1/4 · 3/4 + 1/4 · 3/4 · 3/4 |
|
= 9/64 + 9/64 + 9/64 = 27/64 . |
With a similar computation, you can check that the probability of one hit and two misses is 9/64.
example 3
Two cards will be drawn in succession from a deck of cards. What is the probability of getting two kings if
(a) the first card is replaced and the cards reshuffled before the second draw?
(b) the first card is not replaced before the second draw?
For both parts (a) and (b) we use the conditional probability formula
P(2 kings) |
= P(first card king & second card king) |
= P(first card king) · P(second card king | first card king) . |
In each case the probability the first card is a king is 4/52. In (a), when the first card is replaced, the probability the second card is a king remains the same, 4/52. But in (b), after the first king is drawn there are only 51 cards left and 3 kings, so the probability the second card is a king, given the first is a king, is 3/51. Thus in the two cases the probability of getting two kings are
(a) P(2 kings) = 4/52 · 4/52 = 1/13 · 1/13 = 1/169 , |
(b) P(2 kings) = 4/52 · 3/51 = 1/13 · 1/17 = 1/221 . |
Now let us consider the probability of getting a king and a “nonking” in the two draws. We let “K” denote “king” and “N” denote “nonking”, and in both (a) and (b) we use the formula
P(K & N) |
= P(1K Ù 2N) + P(1N Ù 2K) |
= P(1K) · P(2N | 1K) + P(1N) · P(2K | 1N) . |
In case (a), under replacement, the calculations continue as
while in case (b), when the first card is not replaced, the calculations change to
Thus the probability of a king and nonking is 24/169 ≈ .142 when the first card is replaced before the second draw, and it is 32/221 ≈ .145 when the first card is not replaced before the second draw.
The previous card example is a simple illustration of the statistical concepts of sampling with replacement and sampling without replacement. In the former case what happens on the second trial is not affected by the results of the first trial, but in the latter case the results of the first trial do have an influence on the second trial.
example 4
A bag contains 6 red marbles, 4 blue marbles, and 2 green marbles. Three marbles will be taken at random from the bag, one marble at a time and without replacement. We compute the probability of getting
|
Altogether there are 6 + 4 + 2 = 12 marbles in the bag. Since we sample without replacement, after each draw this number decreases by one.
(a) The only way to get 3 red marbles is with the sequence red, red, red. The probability the first marble is red is 6/12. After the first marble is red, there are 11 marbles remaining and 5 red ones; then the probability the second is red is 5/11. Finally, after the first two are red, there are 4 red marbles out of 10 remaining in the bag, and the probability the third is red is 4/10. The probability of getting three red marbles is the product
P(RRR) = 6/12 · 5/11 · 4/10 = 1/11 .
(b) The probability of the sequence red, blue, green is
P(RBG) = 6/12 · 4/11 · 2/10 = 2/55 .
(c) The three sequences giving 2 red marbles and 1 green marble are RRG, RGR, GRR. The probability of 2 red marbles and 1 green therefore is
P(RRG) + P(RGR) + P(GRR) |
= (6/12 · 5/11 · 2/10) + (6/12 · 2/11 · 5/10) + (2/12 · 6/11 · 5/10) |
= 1/22 + 1/22 + 1/22 = 3/22 . |
(d) There are six sequences giving one marble of each color; they are
RBG , RGB , BRG , BGR , GRB , GBR .
The probability of the first sequence, RBG, was calculated in part (b) as 2/55. You will find that the probability of each of the other 5 sequences is the same, as in each case the three factors in the numerator are 6, 4, and 2, and the three factors in the denominator are 12, 11, and 10. Thus the probability of drawing one marble of each color is the sum
P(RBG) + P(RGB) + P(BRG) + P(BGR) + P(GRB) + P(GBR) |
= 2/55 + 2/55 + 2/55 + 2/55 + 2/55 + 2/55 = 12/55 . |
(e) The sequences yielding three marbles of the same color are RRR and BBB. (The sequence GGG is impossible, as there are only 2 green marbles.) Thus the probability of this event is
P(RRR) + P(BBB) = (6/12 · 5/11 · 4/10) + (4/12 · 3/11 · 2/10) |
= 1/11 + 1/55 = 5/55 + 1/55 = 6/55 . |
Note that if we were sampling with replacement - that is, if we were to replace the marble after each draw - then the arithmetic is different because the probability for any given color remains the same from draw to draw. For example, the answer to part (a) would change to
P(RRR) = 6/12 · 6/12 · 6/12 = 1/2 · 1/2 · 1/2 = 1/8 .
example 5
Suppose that, in the city of Honolulu, 1/2 of all voters are Democrats, 1/3 of all voters are Republicans, and 1/6 are Independents. A pollster will phone two voters at random. We calculate the probability she will call
(a) 2 Republicans,
(b) no Republicans,
(c) a Democrat and an Independent,
(d) two voters of the same type.
The probabilities for each call are
P(D) = 1/2 , P(R) = 1/3 , P(I) = 1/6 .
(Since Honolulu has so many voters, the probabilities are not changed significantly if the pollster from call to call disqualifies the people she has already called.)
(a) The probability of two Republicans is
P(RR) = 1/3 · 1/3 = 1/9 .
(b) The probability of no Republican on any given call is
P(~R) = 1 − P(R) = 1 − 1/3 = 2/3 ,
and the probability of no Republican in two successive calls is
P(~R & ~R) = P(~R) · P(~R) = 2/3 · 2/3 = 4/9 .
(c) There are two ways the pollster can call a Democrat and an Independent - she can call a Democrat first and an Independent second, or vice versa. The probability is
P(Democrat & Independent) |
= P(1D Ù 2I) + P(1I Ù 2D) |
|
= P(D) · P(I) + P(I) · P(D) |
|
= (1/2 · 1/6) + (1/6 · 1/2) = 1/12 + 1/12 = 1/6 . |
(d) The three sequences that give two voters of the same type are DD, RR, II, and the probability of this event is the sum
P(DD) + P(RR) + P(II) |
= P(D) · P(D) + P(R) · P(R) + P(I) · P(I) |
= (1/2 · 1/2) + (1/3 · 1/3) + (1/6 · 1/6) |
= 1/4 + 1/9 + 1/36 = 14/36 = 7/18 . |
example 6
A brown sack has 1 ham sandwich and 2 chicken sandwiches, while a blue sack has 2 ham sandwiches and 2 tuna sandwiches. If Albert chooses a sack at random and then one sandwich at random from that sack, what is the probability he gets a (a) chicken sandwich? (b) ham sandwich? |
The probability Albert chooses the brown sack is 1/2, and likewise for the blue sack.
(a) To get a chicken sandwich, Albert must choose the brown sack and then a chicken sandwich from that sack. We use the conditional probability formula to deduce that
P(chicken) |
= P(brown Ù chicken) |
|
= P(brown) · P(chicken | brown) |
|
= 1/2 · 2/3 = 1/3 . |
(b) To get a ham sandwich Albert can choose either sack and then a ham sandwich; the probability is
P(ham) |
= P(brown Ù ham) + P(blue Ù ham) |
|
= P(brown) · P(ham | brown) + P(blue) · P(ham | blue) |
|
= (1/2 · 1/3) + (1/2 · 2/4) = 1/6 + 1/4 = 5/12 . |
example 7
The University of Hawaii baseball team will play a three game series with Stanford University. Suppose the probability Hawaii wins any given game with Stanford is 2/3. What is the probability Hawaii will more games than Stanford in the series?
We let H denote a win by Hawaii and S a win by Stanford; then we may write the four sequences resulting in Hawaii winning more games than Stanford as
HHH , HHS , HSH , SHH .
The probability that Stanford wins any given game is 1 − 2/3 = 1/3. The probability that Hawaii wins more games in the series is
P(HHH) + P(HHS) + P(HSH) + P(SHH) |
= (2/3 · 2/3 · 2/3) + (2/3 · 2/3 · 1/3) + (2/3 · 1/3 · 2/3) + (1/3 · 2/3 · 2/3) |
= 8/27 + 4/27 + 4/27 + 4/27 = 20/27 . |
EXERCISES 5D
|
|
|
|
|
|
|