I. Concept Check: Prob & Stat For Comp Sci 1. Probability Basics Whalen
I. Concept Check: Prob & Stat For Comp Sci 1. Probability Basics Whalen
Solutions to exercises
I. Concept Check
1. They can’t both happen at the same time. Plenty of examples. Any event and its opposite will
work as an example—winning and losing, passing and failing, etc.
2. One of them happening doesn’t affect the chances the other happens. Plenty of examples.
Unrelated events are usually independent. The event you pass this class and the event the
mayor of Fort Worth spills coffee tomorrow.
3. + If events are possible but not certain, then they cannot be both mutually exclusive and
independent. Being independent is, in a way, the opposite of being mutually exclusive. If A and
B are mutually exclusive, then A happening makes the chances of B drop to 0—definitely not
independent!
4. Multiply for the chance the events all happen; add for the chances that at least one of the
events happens.
5. (a) Look to games of chance for examples—a roulette wheel for instance. (b) Look to chances
that depend on past experience—maybe the chance you pass a class (what percent of classes
have you passed so far?).
6. Lots of interesting examples of questions, from scientific theories to religious beliefs to what
happened in history.
7. + A function whose domain is a collection of events and whose range is the interval of real
numbers from 0 to 1 (inclusive). Note: both the collection of events and the function itself must
satisfy certain axioms, and theoretically probability is a “measure.”
10. Least likely may be (b) or (c), and which one depends on you and your friend’s chances to get a
part. It is reasonable to assume that any single person getting a part is unlikely, in which case
the least likely is (b). The most likely is definitely (a), because this includes if (b) happens or (c)
happens.
11. A sequence of components is more likely to fail.
12. In sequence: anytime multiple things have to happen for an end result. Say, two keys needed to
open a safe; both have to be present. In parallel: anytime there are options for an end result.
Say, different doors into a building; at least one door needs to be unlocked for you to get in.
13. Yes
1
PROB & STAT for COMP SCI 1. PROBABILITY BASICS Whalen
2. Fifty-fifty chances means the probability is 1/2. You reasonably assume independence (as in a
coin toss). Five times in a row means multiple events all happen, so you multiply. Then
1 1 1 1 1 1
× × × × =
2 2 2 2 2 32
3. The opposite event is not getting any tails (it lands heads both times). The chance of this
1 1 1
happening is 2 × 2 = 4. So, with the complement rule, the chance of getting tails at least once is
1
1 − 4.
4. + If you get heads exactly once, then that heads could be on the first toss, or on the second
toss, or on the third toss: HTT or THT or TTH. The chances of HTT (heads, then tails, then tails) is
1 1 1 1
× × =
2 2 2 8
Similarly for THT and TTH. These are mutually exclusive (if we get HTT, then we can’t have
gotten THT, and so on), so we use the addition rule for the chance that at least one of them
happens:
1 1 1
Chance of HTT or THT or TTH = 8 + 8 + 8
5. The event of landing heads exactly twice is the same event as landing tails exactly once, which
has the same probability as landing heads exactly once (since both heads and tails have the
same chances). From the previous problem, this equals 3/8.
1 1 1 1
6. + (a) 16 + 16 + 16 + 16
1
(b) To get exactly two heads, we could get HHTT, and the chance of this is 16. But we could also
1
get HTHT, or HTTH, or THHT, or THTH, or TTHH. Each of these has a chance of 16, and these are
mutually exclusive. So we use the addition rule for the chance at least one happens:
1 1 1 1 1 1
+ + + + +
16 16 16 16 16 16
(c) The event of getting heads once and the event of getting heads twice are mutually exclusive.
(If that bothers you, mentally insert the word “exactly” before once and twice.) So we add the
previous probabilities from part (a) and part (b)
4 6
Chance of heads once or twice = 16 + 16
2
PROB & STAT for COMP SCI 1. PROBABILITY BASICS Whalen
2. Use the multiplication rule on each part. The addition rule is needed on parts (e) and (f):
1 1
a) 6 × 6
5 5
b) ×6
6
5 1
c) ×6
6
1 5
d) ×6
6
1 5 5 1
e) (6 × 6) + (6 × 6)
1 5 5 1 1 1
f) Directly: (6 × 6) + (6 × 6) + (6 × 6)
5 5
With complement rule: 1 − (6 × 6)
11
Of course, either way you get 36
1 1 1 1 1 1
3. Use multiplication rule. Chance both are 1 is: 6 × 6 = 36. Chance both are 2 is: 6 × 6 = 36.
4. + Could be double 1s, double 2s, double 3s, double 4s, double 5s, or double 6s. Each of these is
mutually exclusive, so we use the addition rule and the work on the previous problem:
1 1 1 1 1 1 6 1
+ + + + + = =
36 36 36 36 36 36 36 6
1
5. + Chance of doubles is 6 from previous problem. Chance of doubles three times in a row, by
multiplication rule, is
1 1 1
× ×
6 6 6
6. As a rule of thumb, you can mentally replace + with the word “or” and × with the word “and.”
Chance of getting a 3 is 1/6, chance of not getting a 3 is 5/6. So in words, the calculation is the
chance that “the first die will be a 3 and the second will not be a 3, or the first will not be a 3
and the second will be a 3.”
3
PROB & STAT for COMP SCI 1. PROBABILITY BASICS Whalen
1 1 1 1 1 1
7. + The chance that all five dice display, say, a 1, is × × × × = 5 using the multiplication
6 6 6 6 6 6
rule. This is the same for all five displaying a 2, a 3, and so on. These are mutually exclusive
events (e.g., if all display 4, then they can’t all display 3). So we use the addition rule and get
that the chances are
1 1 1 1 1 1 6 1
5
+ 5+ 5+ 5+ 5+ 5= 5= 4
6 6 6 6 6 6 6 6
you get to yell “Yahtzee!”
8. (a) More than 1/6. (You get to roll three dice, not just one, so more chances of getting a six.) (b)
1 1 1
Less than 6 + 6 + 6 (this double counts some non-mutually exclusive possibilities).
9. + The error in the reasoning: the Chevalier is using the addition rule; note that
1 1 1 1 1
4× = + + +
6 6 6 6 6
but he is adding the chances of events that are not mutually exclusive. (Both the first and
second roll could be an ace, for instance.)
10. + It could be the first is a six (and not the others), or the second is a six (and not the others), or
the last is a six (and not the others). Chance of a six on the first roll but not the others is
1 5 5
× ×
6 6 6
4
PROB & STAT for COMP SCI 1. PROBABILITY BASICS Whalen
IV. General
1. Yes. 100% minus 10% minus 25% equals 65%. (Complement rule)
2. Use the multiplication rule on each part. Since draws are without replacement, the draws are
dependent, so the probabilities must be adjusted. Also, the addition rule is needed on parts (e)
and (f):
4 3
a) 52 × 51
48 47
b) × 51
52
4 48
c) × 51
52
48 4
d) ×
52 51
4 48 48 4
e) (52 × 51) + (52 × 51)
4 48 48 4 4 3
f) Directly: (52 × 51) + (52 × 51) + (52 × 51)
48 47
With complement rule: 1 − (52 × 51)
33
Both ways must give the same answer: 221
3. Use the multiplication rule for the chance all the events happen. The given chances account for
the dependence (just read the sentences).
Chance of rain, late bus, and being late all happening is 0.3 × 0.1 × 0.25 = 0.0075 (less than
1%, in fact three-fourths of a percent).
We need more information for the chance you are late regardless of other events.
4. Use the multiplication rule. According to the statements, the given chances account for
dependence.
If someone purchased the game, chance they finished it and purchased DLC is 0.75 × 0.9 =
0.675 (that is, 67.5%). From the given information, we don’t know anything about the chance
someone purchased DLC if they did not finish the game.
6. Use the addition rule. Each driver is mutually exclusive (e.g., if it is driver A, then it cannot be
driver B). (a) 0.24 + 0.39 = 0.63 (b) 0.1 + 0.08 = 0.18 (c) 0.1 + 0.24 + 0.19 = 0.53
5
PROB & STAT for COMP SCI 1. PROBABILITY BASICS Whalen
7. Use the addition rule. For drawing one marble, each color is mutually exclusive. (a) 10/21 (b)
8/21 (c) Red, yellow, or blue (pigment primary, not digital primary RGB), so 10/21.
8. Opposite of “at least one red” is “none are red” (DeMorgan’s Law). If none are red, then each of
the 3 drawn are blue. Use the multiplication rule and account for dependence since this is
without replacement.
15 14 13
Chance of all three blue is 20 × 19 × 18
15 14 13
Chance of opposite (at least one red) is 1 − 20 × 19 × 18
9. Chance a bit is not corrupted is 0.95. For chance 8 bits are not corrupted (multiple events
occurring at once), use the multiplication rule: 0.95 times itself 8 factors, or (0.95)8
10. On your first choice, if you choose randomly there is a 1/3 chance to choose the grand prize
door, in which case you want to stay (despite Monty’s offer). On the other hand, on your first
choice there is a 2/3 chance to choose a cheap prize door, in which case you want to switch
doors.
So, the chance of getting the grand prize if you switch is 2/3. (Switching is better two times out
of three.)
11. + Using the multiplication rule and accounting for dependence, the chance of drawing a royal
flush of a particular suit is
5 4 3 2 1
× × × ×
52 51 50 49 48
There are 4 suits, and a royal flush of each suit is mutually exclusive, so by the addition rule we
add this to itself four terms (that is, multiply it by 4).
5 4 3 2 1
4× × × × ×
52 51 50 49 48
If you are familiar with combinatorics, you can check for yourself that this is the same as taking
the number of royal flushes (4) divided by the total number of combinations of 5 cards from a
deck of 52 (52 choose 5 is 2,598,960).
6
PROB & STAT for COMP SCI 1. PROBABILITY BASICS Whalen
3. (a) Both routes are blocked with probability 0.25 × 0.25. So the chance we have at least one
open route from A to B is 1 − 0.25 × 0.25 = 0.9375. Same for B to C. We need an open route
both from A to B and from B to C, so we use the multiplication rule for the chance of this:
0.9375 × 0.9375
(b) The new road is a parallel connection. So we can either get from A to C the original way in
part (a), or by this new road, as long as not both are blocked. The chance we cannot use the
original way is 1 − 0.93752 . The chance we cannot use the new road is 0.25. The chance we
cannot use both is (1 − 0.93752 ) × 0.25. Finally, the chance we can use at least one way is one
minus the chance we cannot use both: 1 − (1 − 0.93752 ) × 0.25. (This is about 97%.)
4. You should get 0.947625
5. You should get 0.98901.
6. + The reliability of 𝑛 components connected in sequence, each with reliability 𝑟 independent of
the others, is 𝑟 𝑛 by the multiplication rule and independence.
7. + The reliability of 𝑛 components connected in parallel, each with reliability 𝑟 independent of
the others, is 1 − (1 − 𝑟)𝑛 by the complement rule and DeMorgan’s Laws, using the
multiplication rule for the chances of the opposite event (connection fails).