Chapter 4: Probability
Chapter Goals
• Learn the basic concepts of probability.
• Learn the rules that apply to the probability of
both simple and compound events.
• In order to make inferences, we need to study
sample results in situations in which the
population is known.
1
4.3: Simple Sample Spaces
Experiment: Any process that yields a result or
an observation.
Outcome: A particular result of an experiment.
2
Example: Suppose we select two students at
random and ask each if they have a smartphone.
1.A list of possible outcomes:
(Y, Y), (Y, N), (N, Y), (N, N)
[Link] is called ordered pair notation.
[Link] outcomes may be displayed using a tree
diagram.
3
Tree diagram:
Student 1 Student 2 Outcomes
Y Y, Y
Y
N Y, N
Y N, Y
N
N N, N
1. This diagram consists of four branches: 2 first generation
branches and 4 second generation branches.
2. Each branch shows a possible outcome.
4
Sample Space: The set of all possible outcomes of an
experiment. The sample space is typically called S and
may take any number of forms: a list, a tree diagram, a
lattice grid system, etc. The individual outcomes in a
sample space are called sample points. n(S) is the
number of sample points in the sample space.
Event: any subset of the sample space. If A is an event,
then n(A) is the number of sample points that belong to
A.
Example: For the smartphone example above:
S = { (Y, Y), (Y, N), (N, Y), (N, N) }
n(S) = 4
5
Example: On the way to work, some employees at a certain
company stop for a bagel and/or a cup of coffee. The
accompanying Venn diagram summarizes the behavior of the
employees for a randomly selected work day.
Coffee Bagel
32 18 16
31
The experiment consists of selecting one employee at random.
n(S) = 97
6
4.4: Rules of Probability
• Consider the concept of probability and relate it
to the sample space.
• The probability of an event is the relative
frequency with which the event could be
expected to occur, the long-term average.
7
4.4: Rules of Probability
Equally Likely Events:
1. In a sample space, suppose all sample points are equally
likely to occur.
2. The probability of an event A is the ratio of the number of
sample points in A to the number of sample points in S.
3. In symbols:
n( A )
P(A )
n( S )
4. This formula gives a theoretical probability value of event
A’s occurrence.
5. The use of this formula requires the existence of a sample
space in which each outcome is equally likely.
8
Example: A fair coin is tossed 5 times, and a head (H) or a tail (T)
is recorded each time. What is the probability of
A = {exactly two heads in 5 tosses}, and
B = {exactly 5 heads}?
The outcomes consist of a sequence of 5 H’s and T’s.
A typical outcome: HHTTH
There are 32 possible outcomes, all equally likely.
A = {HHTTT, HTHTT, HTTHT, HTTTH, THHTT,
THTHT, THTTH, TTHHT, TTHTH, TTTHH }
n(A ) 10
P(A)
n( S ) 32
B = {HHHHH} n( B) 1
P ( B)
n( S ) 32
9
How many ways are there of getting exactly r
heads in n tosses?
toss ‘H’ head
H H ….. ….. H
1 2 3 n-1 n
n!
Number of ways = nCr = r!(n r )!
where n! = n(n1)21.
What an incredible answer:
1 + 2 + 3 + … + 14 + 15 = 5!
10
Properties:
1. The probability of any event A is between 0 and 1.
0 P(A ) 1
2. The sum of the probabilities of all outcomes in the sample space
is 1.
P(A ) 1
all outcomes
Note:
1. The probability is zero if the event cannot occur.
2. The probability is one if the event occurs every time (a sure
thing).
11
Complement of an Event: The set of all sample points in
the sample space that do not belong to event A. The
complement of event A is denoted by A (read “A
complement”).
Example:
1. The complement of the event “success” is “failure.”
2. The complement of the event “rain” is “no rain.”
3. The complement of the event “at least 3 patients
recover” out of 5 patients is “2 or fewer recover.”
12
Note:
1. P ( A ) P ( A ) 1 for any event A.
2. P ( A ) 1 P ( A ) .
3. Every event A has a complementary event.
4. Complementary probabilities are very useful when the
question asks for the probability of “at least one”.
13
Example: A fair die is thrown 5 times. What is the probability of
A = {at least one ‘6’},
B = {at most three ‘6’}?
Solution: P(A) 1 P(A )
1 P ( no '6' )
5
5
1 0.5981 .
6
P ( B) 1 P ( B)
1 P (four or five '6' )
1 ( P (four '6' ) P (five '6' ))
25 1
1 0.9967 .
5 5
6 6 14
4.5: Mutually Exclusive Events and
the Addition Rule
• Compound Events: formed by combining
several simple events.
• The probability that either event A or event B
will occur: P(A or B).
• The probability that both events A and B will
occur: P(A and B).
• The probability that event A will occur given
that event B has occurred: P(A | B)
15
Mutually Exclusive Events: Events defined in such a
way that the occurrence of one event precludes the
occurrence of any of the other events. (In short, if one of
them happens, the others cannot happen.)
Note:
1. Complementary events are also mutually exclusive.
2. Mutually exclusive events are not necessarily
complementary.
16
Example: The following table summarizes a group of diabetic
patients visited a local medical clinic last month, classified by
gender and by type of diabetes (Type-1 and Type-2).
Type of Diabetes
Gender Total
Type-1 Type-2
Male (M) 110 80 190
Female (F) 160 100 260
Total 270 180 450
One patient from this group is selected at random.
Define event A as “the patient selected has Type-1 diabetes”;
event B as “the patient selected has Type-2 diabetes”; and
event C as “the patient selected is female”.
17
Questions:
1. Are events A and B mutually exclusive?
2. Are events A and C mutually exclusive?
Solution:
1. The events A and B are mutually exclusive.
2. The events A and C are not mutually exclusive. The
intersection of A and C can be seen in the table above or in the
Venn diagram below.
A C
110 160 100
80
18
General Addition Rule: Let A and B be two events defined in a
sample space S.
P (A or B) P (A ) P ( B) P (A and B)
Illustration:
A B
Note: If two events A and B are mutually exclusive:
P(A and B) 0
19
Special Addition Rule: Let A and B be two events defined in a
sample space. If A and B are mutually exclusive events, then
P(A or B) P(A) P(B)
This can be expanded to consider more than two mutually
exclusive events:
P(A or B or C or ... or E) P(A ) P( B) P( E)
B
A
D
C
20
Example: A consumer is selected at random. The probability the
consumer has tried a snack food (F) is .5, tried a new soft drink (D)
is .6, and tried both the snack food and the soft drink is .2.
P ( Tried the snack food or the soft drink )
P ( F or D ) P ( F) P ( D) P ( F and D ) .5.6.2 .9
P ( Not tried the snack food ) P ( F) 1 P ( F) 1.5 .5
P(Tried neither the snack food nor the soft drink)
P F or D 1 P ( F or D ) 1 .9 .1
P ( Tried only the soft drink ) P ( D) P ( F and D) .6.2 .4
21
General Addition Rule for 3 events:
Let A ,B and C be three events defined in a sample space S.
P ( A or B or C) P ( A ) P ( B) P (C) P ( A and B)
P ( A and C) P ( B and C) P ( A and B and C)
Illustration:
B C
22
Example: Among a group of 200 students, 137 students are enrolled
in a mathematics class, 50 students in a history class and 124 students
in a music class. Furthermore, the number of students enrolled in both
the mathematics and history classes is 33; the number of students
enrolled in both the history and music classes is 29; the number of
students enrolled in both the mathematics and music classes is 92.
Finally, the number of students enrolled in all three classes is 18.
Given that a student is selected at random from the group of 200
students.
(a) What is the probability that he/she is enrolled in at least one of the
three classes?
(b) What is the probability that he/she is enrolled in exactly one class?
(c) What is the probability that he/she is enrolled in mathematics but
not music?
23
Solution:
(a) n() = 200, n(Ma) = 137, n(Mu) = 124, n(H) = 50,
n(Ma and H) = 33, n(Ma and Mu) = 92, n(H and Mu) = 29,
n(Ma and Mu and H) = 18,
n(Ma or Mu or H) = n(Ma) + n(Mu) + n(H)
– n(Ma and Mu) – n(Ma and H) – n(Mu and H)
+ n(Ma and Mu and H)
= 137 + 124 + 50 – 33 – 29 – 92 + 18 = 175
n(Ma or Mu or H) 175 7
P(Ma or Mu or H) =
n() 200 8
(b) P (exactly one class) P (math only) P (history only) P (music only)
30 6 21 57
. 24
200 200 200 200
4.6: Independence, the Multiplication
Rule, and Conditional
Probability
Independent Events: Two events A and B are
independent events if the occurrence (or nonoccurrence)
of one does not affect the probability assigned to the
occurrence of the other.
Note: If two events are not independent, they are
dependent.
25
Background:
1. Sometimes two events are related in such a way that the
probability of one depends upon whether the second event
has occurred.
2. Partial information may be relevant to the probability
assignment.
Conditional Probability: The symbol P(A | B) represents the
probability that A will occur given B has occurred. This is called
conditional probability.
P ( A and B)
1. P ( A| B)
P ( B)
2. Given B has occurred, the relevant sample space is no
longer S, but B (reduced sample space).
3. A has occurred if and only if the event ‘A and B’ has
occurred.
26
Independent Events: Two events A and B are
independent events if
P(A | B) = P(A) or P(B | A) = P(B)
Note:
1. If A and B are independent, the occurrence of B does
not affect the occurrence of A.
2. If A and B are independent, then so are:
A and B
A and B
A and B
3. Independence cannot be shown on a Venn diagram.
27
Example It is believed that smoking can cause lung
cancer. We can do a survey to ascertain whether this is a
fact. We looked through the records of 1,000 death
cases in a hospital and found the following figures:
Number of smokers = 130,
Number of people died of lung cancer = 46,
Number of people who smoked and died of lung cancer
= 17.
Do the figures indicate that smoking can cause lung
cancer?
28
Solution
Let S = “Smoker”, LC = “Died of lung cancer”.
From the given information, n(S) = 130, n(LC) = 46, n(S and LC) = 17.
Probability of
Lung No lung
Total dying from
cancer cancer
lung cancer
Smokers 17 113 130 0.131
Non-
29 841 870 0.033
smokers
Total 46 954 1000 0.046
29
46
Then P( LC ) 0.046
1000
n( LC and S ) 17
P ( LC | S ) 0.131
n( S ) 130
n( LC and S ) 29
P ( LC | S ) 0.033
n( S ) 870
Smokers are 2.8 times more likely to die from lung cancer
than the general population, but are 3.9 times more likely to die
from lung cancer than non-smokers. Hence the figures indicate
that smoking can cause lung cancer.
30
Example: In a sample of 1200 residents, each person was asked if he
or she favored building a new town playground. The responses are
summarized in the table below.
Age Favor (F) Oppose Total
Less than 30 (Y) 250 50 300
30 to 50 (M) 600 75 675
More than 50 (O) 100 125 225
Total 950 250 1200
If one resident is selected at random, what is the probability the
resident will:
1. Favor the new playground?
2. Favor the playground if the person selected is less than 30?
3. Favor the playground if the person selected is more than 50?
4. Are the events F and M independent?
31
Solution:
950 19
P( F)
1200 24
P ( F and Y ) 250 / 1200 5
P ( F| Y)
P ( Y) 300 / 1200 6
P ( F and O ) 100 / 1200 4
P ( F| O)
P ( O) 225 / 1200 9
P ( F and M ) 600 / 1200 8
P ( F| M ) P ( F)
P( M) 675 / 1200 9
F and M are dependent
32
General Multiplication Rule: Let A and B be two events defined
in sample space S. Then
P ( A and B) P ( A ) P ( B| A )
or
P ( A and B) P ( B) P ( A| B)
Note: How to recognize situations that result in the compound
event “and.”
1. A followed by B.
2. A and B occurred simultaneously.
3. The intersection of A and B.
4. Both A and B.
5. A but not B (equivalent to A and not B).
33
Special Multiplication Rule: Let A and B be two events defined
in sample space S. If A and B are independent events, then
P ( A and B) P ( A ) P ( B)
This formula can be expanded. If A, B, C, …, G are independent
events, then
P (A and B and C and ... and G ) P (A ) P ( B) P (C) P ( G )
Example: Suppose the event A is “Allen gets a cold this winter,” B
is “Bob gets a cold this winter,” and C is “Chris gets a cold this
winter.” P(A) = .15, P(B) = .25, P(C) = .3, and all three events are
independent. Find the probability that
1. All three get colds this winter.
2. Allen and Bob get a cold but Chris does not.
3. None of the three gets a cold this winter.
34
Solution:
P ( All three get colds this winter )
P ( A and B and C) P ( A ) P ( B) P ( C)
(.15)(.25)(.30) .0113
P ( Allen and Bob get a cold, but Chris does not )
P ( A and B and C) P ( A ) P ( B) P ( C)
(.15)(.25)(.70) .0263
P ( None of the three gets a cold this winter )
P ( A and B and C) P ( A ) P ( B) P ( C)
(.85)(.75)(.70) .4463
35
Note:
1. Independence and mutually exclusive are two very different
concepts.
a. Mutually exclusive says the two events cannot occur
together, that is, they have no intersection.
b. Independence says each event does not affect the other
event’s probability.
2. P(A and B) = P(A) P(B) when A and B are independent.
a. Since P(A) and P(B) are not zero, P(A and B) is nonzero.
b. Thus, independent events have an intersection.
3. Events cannot be both mutually exclusive and independent.
a. If two events are independent, then they are not mutually
exclusive.
b. If two events are mutually exclusive, then they are not
independent.
36
4.7: Combining the Rules of
Probability
• Many probability problems can be represented
by tree diagrams.
• Using the tree diagram, the addition and
multiplication rules are easy to apply.
37
Example: This problem involves testing individuals for the
presence of a disease. Suppose the probability of having the
disease (D) is .001. If a person has the disease, the probability of a
positive test result (Pos) is .90. If a person does not have the
disease, the probability of a negative test result (Neg) is .95. For a
person selected at random:
1. Find the probability of a negative test result given the
person has the disease.
2. Find the probability of having the disease and a positive
test result.
3. Find the probability of a positive test result.
38
Resulting tree diagram:
Test
Disease Result
.90 Pos
D
.001
.10 Neg
.05 Pos
.999
D
.95 Neg
39
Solution:
1. P ( Neg|D) 1 P ( Pos|D) 1.90 .10
2. P ( D and Pos) P ( D) P ( Pos|D) (.001)(.90) .0009
3. P ( Pos) P ( D and Pos) P ( D and Pos)
P ( D) P ( Pos|D) P ( D) P ( Pos| D)
(.001)(.90) (.999)(.05) .05085
40
Bayes’s Rule:
P(A k ) P(B | A k )
P ( A k | B)
P ( A i ) P ( B | A i )
where A1, A2, …, An is an all-inclusive set of possible outcomes
given B.
Note: This rule allows us to revise (or adjust) the probabilities
assigned to events in accordance with new information.
41
Previous Example Continued: If a person has a positive test result,
find the probability they actually have the disease.
P ( D and Pos )
P ( D | Pos )
P ( Pos )
P ( D) P ( Pos | D)
P ( D) P ( Pos | D) P ( D) P ( Pos | D)
(.001)(.90) .0009
.0177
(.001)(.90) (.999 )(.05) .05085
Note: In this example, most positive test results are “false
positives.”
42
Example: In a small tutorial group, there are seven male
students and three female students. Two students are
selected at random from the group. The first student
chosen is not returned to the group for possible
reselection; that is, the sampling is without
replacement.
1. Find the probability that the second student is female
given that the first student selected is male.
2. Find the probability that the second student is female.
3. Find the probability that the first student is male
given that the second student selected is female.
43
Resulting tree diagram:
First student Second student
selected selected
6
9 M2
7
M1
10 3 F2
7 9 M2
3 9
10 F1
2 F2
9
44
Solution:
1
1. P(F2 | M1 ) .
3
2. P (F2 ) P (M1 ) P (F2 | M1 ) P (F1 ) P (F2 | F1 )
7 3 3 2 3
.
10 9 10 9 10
7 3
3. P (M1 | F2 )
P ( M1 and F2 )
10 9 7
.
P (F2 ) 3 9
10
45
Example: A system consists of three components connected in two
branches as shown in the following diagram.
A B
For the system to work, all the components in at least one branch must
function. Assume that A and B function independently. The probabilities
that A, B and C function are 0.7, 0.6 and 0.4, respectively. If C functions,
the probabilities that A and B function become 0.75 and 0.65,
respectively. If both A and B function, the probability that C functions
becomes 0.5.
(a) Find the probability that at least one component functions.
(b) Find the probability that the system works.
46
Solution:
(a) P(A) = 0.7 , P(B) = 0.6 , P(C) = 0.4.
Since A and B are independent,
P(A and B) = P(A) P(B) = 0.7 × 0.6 = 0.42.
Also, P(A|C) = 0.75 , P(B |C) = 0.65 , P(C | A and B) = 0.5.
Then, P(A and C) = P(C) P(A|C) = 0.4 × 0.75 = 0.3,
P(B and C) = P(C) P(B |C) = 0.4 × 0.65 = 0.26,
P(A and B and C) = P(A and B) P[C | (A and B)]
= P(A)P(B) P[C | (A and B)]
= 0.21.
P(At least one component works)
= P(A) + P(B) + P(C) − P(A and B) − P(A and C) − P(B and C)
+ P(A and B and C)
= 0.7 + 0.6 + 0.4 − 0.42 − 0.3 − 0.26 + 0.21
= 0.93.
47
(b) The system works if (A and B) or C functions. Therefore,
P(work) = P[(A and B) or C]
= P(A and B) + P(C) − P(A and B and C)
= 0.42 + 0.4 − 0.21
= 0.61.
48