Please Subscribe to this Channel for more solutions and lectures
http://www.youtube.com/onlineteaching
Chapter 4: Probability
4.3: Complements and Conditional Probability, and Bayes' Theorem
2. Chapter 4: Probability
4.1 Basic Concepts of Probability
4.2 Addition Rule and Multiplication Rule
4.3 Complements and Conditional Probability, and Bayes’ Theorem
4.4 Counting
4.5 Probabilities Through Simulations (available online)
2
Objectives:
• Determine sample spaces and find the probability of an event, using classical probability or empirical probability.
• Find the probability of compound events, using the addition rules.
• Find the probability of compound events, using the multiplication rules.
• Find the conditional probability of an event.
• Find the total number of outcomes in a sequence of events, using the fundamental counting rule.
• Find the number of ways that r objects can be selected from n objects, using the permutation rule.
• Find the number of ways that r objects can be selected from n objects without regard to order, using the combination rule.
• Find the probability of an event, using the counting rules.
3. Key Concept: Extend the use of the multiplication rule to include the
probability that among several trials, we get at least one of some specified
event. Consider conditional probability: the probability of an event occurring
when we have additional information that some other event has already
occurred. We provide a brief introduction to Bayes’ theorem.
4.3 Complements and Conditional Probability, and Bayes’Theorem
Complements: The Probability of “At Least One”
When finding the probability of some event occurring “at least once,” we
should understand the following:
• “At least one” has the same meaning as “one or more.”
• The complement of getting “at least one” particular event is that you get no
occurrences of that event.
P(at least one occurrence of event A) = 1 − P(no occurrences of event A)
3
𝑃(𝐴t least 1) = 1 − 𝑃(𝑁𝑜𝑛𝑒)
4. Example 1
If a couple plans to have 3 children, (Assume equally likely and independency)
a) what is the probability that they will have at least one girl?
b) What is the probability that they will have at most one girl?
4
Complementary Events: Rules 𝑃 𝐴 + 𝑃(𝐴) = 1
Solution: Two ways: Write the sample space
P(𝐴 ) = P(All boys)=
1
2
3
=
1
8
1) {ggg, ggb, gbg, gbb, bgg, bgb, bbg, bbb}, P (At least one girl) = 7/8
Interpretation: There is a 7/8 probability that if a couple has 3 children,
at least 1 of them is a girl.
2)𝑃(At Least One) = 1 − 𝑃(𝑁𝑜𝑛𝑒)
𝑃(At Least One Girl) = 1 −
1
2
3
= 1 −
1
8
=
7
8
=
1
8
+
3
8
=
4
8
=
1
2
𝑏)𝑃(At Most One Girl) = 𝑃(0) + 𝑃(1)
𝑃(𝐴t least 1) = 1 − 𝑃(𝑁𝑜𝑛𝑒)
5. Example 2
Assume that 3% of ties sold in the United States are bow ties (B). If 4
customers who purchased a tie are randomly selected, find the probability
that at least 1 purchased a bow tie.
5
Complementary Events: Rules
𝐺𝑖𝑣𝑒𝑛: 𝑃 𝐵 = 0.03, 𝑃 𝐵 = 1 − 0.03 = 0.97, 𝑛 = 4
𝑃 no bow ties = 𝑃 𝐵 ⋅ 𝑃 𝐵 ⋅ 𝑃 𝐵 ⋅ 𝑃 𝐵
𝑃 at least 1 bow tie = 1 − 𝑃 no bow ties
= 0.97 4
= 0.885
= 1 − 0.885 = 0.115
= 1 − 0.97 4
𝑃 𝐴 + 𝑃(𝐴) = 1
𝑃(𝐴t least 1) = 1 − 𝑃(𝑁𝑜𝑛𝑒)
6. Example 3
Assume 6% of damaged iPads are damaged by backpacks.
If 20 damaged iPads are randomly selected, find the probability of getting at
least one that was damaged in a backpack. Is the probability high enough so that
we can be reasonably sure of getting at least one iPad damaged in a backpack?
6
Complementary Events: Rules
𝐺𝑖𝑣𝑒𝑛: 𝑃 𝐷 = 0.06, 𝑃 𝐷 = 1 − 0.06 = 0.94, 𝑛 = 20
𝑃 no Damage by backpack = 𝑃 𝐷
20
𝑃 at least 1 Damaged by Bagback
= 1 − 𝑃 None Damaged
= 0.94 20 = 0.2901
= 1 − 0.2901 = 0.7099
Interpretation: n = 20 & P = 0.7099 probability of getting at least 1 iPad damaged in a backpack.
This probability is not very high, so to be reasonably sure of getting at least 1 iPad damaged in a
backpack, we should select more than 20 damaged iPads.
Very High Probability means: As n (the sample size) gets larger the probability should get closer
to 1.
𝑃 𝐴 + 𝑃(𝐴) = 1
𝑃(𝐴t least 1) = 1 − 𝑃(𝑁𝑜𝑛𝑒)
7. A conditional probability of an event is a probability obtained with the additional
information that some other event has already occurred.
Notation
P(B | A) denotes the conditional probability of event B occurring, given that event A
has already occurred.
It can be found by assuming that event A has occurred and then calculating the
probability that event B will occur.
7
4.3 Complements and Conditional Probability, and Bayes’Theorem
Conditional
Probability
𝑃 𝐴 𝐵 =
𝑃 𝐴 &𝐵
𝑃 𝐵
𝑃 𝐵 𝐴 =
𝑃 𝐴 &𝐵
𝑃 𝐴
Prob of A Given B: 𝑃(𝐴 𝐵) =
𝑃(𝐴 ∩ 𝐵)
𝑃(𝐵)
, 𝑃(𝐵) ≠ 0
Prob of B Given A: 𝑃(𝐵 𝐴) =
𝑃(𝐴 ∩ 𝐵)
𝑃(𝐴)
; 𝑃(𝐴) ≠ 0
Dependent events:
P(A and B) = P(A) P(B | A) = P(B) P(A | B)
Independent events: 𝑃 𝐴 ∩ 𝐵 = 𝑃(𝐴)𝑃(𝐵)
8. Example 4
The probability that Sean parks in a no-parking zone and gets a parking
ticket is 0.08, and the probability that Sean cannot find a legal parking
space and has to park in the no-parking zone is 0.40. If Sean arrives at
school and has to park in a no-parking zone, find the probability that he
will get a parking ticket.
8
Conditional Probability
Solution: N = parking in a no-parking zone & T = getting a ticket
𝑃 𝑇 𝑁 =
𝑃 𝑁 ∩ 𝑇
𝑃 𝑁
=
0.08
0.40
= 0.20
𝐺𝑖𝑣𝑒𝑛: 𝑃 𝑁 and 𝑇 = 0.08, 𝑃 𝑁 = 0.40
Conditional
Probability
𝑃 𝐴 𝐵 =
𝑃 𝐴and𝐵
𝑃 𝐵
𝑃 𝐵 𝐴 =
𝑃 𝐴and𝐵
𝑃 𝐴
9. Example 5
A group of 150 randomly selected CEO’s was tested for personality type. The following table gives the
result of this survey. (Contingency table or frequency distribution table for Bivariate data)
a. If one CEO is selected at random from this group, find the probability that this CEO
i. Has a Type A personality.
ii. Is a Woman.
iii. Is a Man given that he has a Type A personality.
iv.
v. Has a Type B personality given that she is a Woman.
vi. Has Type A personality and is a Woman.
9
Type A (A) Type B (B) Total
Men (M) 78 42 120
Women (W) 19 11 30
Total 97 53 150
𝑃 𝐴 =
𝑛 𝐴
𝑛(𝑠)
=
78 + 19
150
=
97
150
𝑃 𝑤 =
𝑛 𝑤
𝑛(𝑠)
=
19 + 11
150
=
30
150 =
1
5
𝑃 𝑀 𝐴 =
𝑃 𝑀 ∩ 𝐴
𝑃 𝐴
=
78
97
𝑃 𝐵 𝑊 =
𝑃 𝐵 ∩ 𝑊
𝑃 𝑊
=
11/150
30/150
=
11
30
𝑃 𝐴 ∩ 𝑊 =
𝑛 𝐴 ∩ 𝑊
𝑛(𝑠)
=
19
150
𝑃 𝐴 𝐵 =
𝑃 𝐴∩𝐵
𝑃 𝐵
, 𝑃 𝐵 𝐴 =
𝑃 𝐴∩𝐵
𝑃 𝐴
10. Example 5 Continued
A group of 150 randomly selected CEO’s was tested
for personality type. The following table gives the
result of this survey. (Contingency table or
frequency distribution table for Bivariate data)
a. If one CEO is selected at random from this group,
find the probability that this CEO
i. Is a Man or has a Type B personality
b. Are the events Woman and Type A personality
mutually exclusive? Are the events Type A and
Type B personalities mutually exclusive?
c. Are the events Type A personality and Men
independent?
10
P(M or B) = P ( M ) + P ( B ) - P (M and B)
𝑂𝑅: 𝑃(𝑀)𝑃(𝐵 𝑀) = 𝑃(𝑀 ∩ 𝐵) = 𝑃(𝐵)𝑃(𝑀 𝐵)
120
150
+
53
150
−
120
150
⋅
42
120
=
120
150
+
53
150
−
53
150
⋅
42
53
=
131
150
𝑃(𝐴 ∩ 𝑤) =
19
150
, 𝑁𝑜 𝑃(𝐴 ∩ 𝐵) = 0, 𝑌𝑒𝑠
𝑃(𝑀) =
120
150
≠ 𝑃 𝑀 𝐴 =
78
97
, 𝑁𝑂
Type A (A) Type B (B) Total
Men (M) 78 42 120
Women (W) 19 11 30
Total 97 53 150
𝑃(𝑀 ∪ 𝐵) =
𝑛(𝑀) + 𝑛(𝐵) − 𝑛(𝑀 ∩ 𝐵)
𝑁(𝑠)
=
120 + 53 − 42
150
=
131
150
𝑃 𝐴 𝐵 =
𝑃 𝐴∩𝐵
𝑃 𝐵
, 𝑃 𝐵 𝐴 =
𝑃 𝐴∩𝐵
𝑃 𝐴
11. Example 6: Find the following using the table:
a. If 1 of the 555 test subjects is randomly selected,
find the probability that the subject had a positive
test result, given that the subject actually uses
drugs. That is, find P(positive test result | subject
uses drugs).
b. If 1 of the 555 test subjects is randomly selected,
find the probability that the subject actually uses
drugs, given that he or she had a positive test result.
That is, find P(subject uses drugs | positive test
result).
11
blank Positive Test Result (P)
(Test shows drug use.)
Negative Test Result (N)
(Test shows no drug use.)
Total
Subject Uses
Drugs (D)
45
(True Positive)
5
(False Negative)
50
Subject Does Not
Use Drugs (ND)
25
(False Positive)
480
(True Negative)
505
Total 70 485 555
𝑃 𝑃 𝐷 =
𝑃 𝑃 ∩ 𝐷
𝑃 𝐷
=
45/555
50/555
=
45
50
=
9
10
= 0.9
𝑃 𝐷 𝑃 =
𝑃 𝑃 ∩ 𝐷
𝑃 𝑃
=
45/555
70/555
=
45
70
=
9
14
= 0.643
a. Interpretation: A subject who uses drugs has a
0.9 probability of getting a positive test result.
b. Interpretation: A
subject who gets a positive
test result, there is a 0.643
probability that this subject
actually uses drugs.
Note that P(positive test
result | subject uses drugs)
≠ P(subject uses drugs |
positive test result).
12. 12
Confusion of the Inverse: In general, P(B | A) ≠ P(A | B).
There could be individual cases where P(A | B) and P(B | A ) are equal, but they
are generally not equal.
Incorrect assumption of: P(B | A) = P(A | B) is called confusion of the inverse.
Example 7: Consider these events: D: It is dark outdoors. M: It is midnight.
Ignore the Alaskan winter and other such inconsistencies.
P(D | M) = 1 (It is certain to be dark given that it is midnight.)
P(M | D) = 0 (The probability that it is exactly midnight given that it
dark is almost zero.)
Here, P(D | M) ≠ P(M | D).
Confusion of the inverse occurs when we incorrectly switch those
probability values or think that they are equal.
13. We extend the discussion of conditional probability to include applications of
Bayes’ theorem (or Bayes’ rule), which we use for revising a probability value
based on additional information that is later obtained.
13
4.3 Complements and Conditional Probability, and Bayes’Theorem (Time)
14. Assume cancer has a 1% prevalence rate, meaning that 1% of the population has cancer.
P(C) = 0.01 (There is a 1% prevalence rate of the cancer.)
The false positive rate is 10%: P(positive test result given that cancer is not present) = 0.10.
The true positive rate is 80%: P(positive test result given that cancer is present) = 0.80.
Find P(C | positive test result).
That is, find the probability that a subject actually has cancer given that he or she has a
positive test result.
14
Example 8
Using the given information, we can construct a hypothetical population with
the above characteristics; how?
Positive Test Result
(Test shows cancer)
Negative Test Result
(test shows no cancer)
Total
Cancer 8
(True Positive)
2
(False Negative)
10
No Cancer 99
(False Positive)
891
(True Negative)
990
15. Assume that we have 1000 subjects. With a 1%
prevalence rate, 10 of the subjects are expected to
have cancer. The sum of the entries in the first row
of values is therefore 10.
15
Example 8: Continued
blank Positive Test Result
(Test shows cancer.)
Negative Test Result
(test shows no cancer)
Total
Cancer (C) 8
(True Positive)
2
(False Negative)
10
No Cancer 99
(False Positive)
891
(True Negative)
990
The other 990 subjects do not have cancer.
The sum of the entries in the second row
of values is therefore 990.
Among the 990 subjects without
cancer, 10% get positive test results, so
10% of the 990 cancer-free subjects in
the second row get positive test results.
See the entry of 99 in the second row.
For the 990 subjects in the second
row, 99 test positive, so the other
891 must test negative. See the
entry of 891 in the second row.
Among the 10 subjects with cancer in
the first row, 80% of the test results
are positive, so 80% of the 10 subjects
in the first row test positive. See the
entry of 8 in the first row.
The other 2 subjects in the first row
test negative. See the entry of 2 in
the first row.
Find P(C | positive test result).
|
P C P
P C Positive
P P
8/1000
107/1000
8
0.07477
107
Interpretation; For
the data given in this
example, a randomly
selected subject has a
1% chance of cancer,
but for a randomly
selected subject given
a test with a positive
result, the chance of
cancer increases to
7.48%. Based on the
data given in this
example, a positive
test result should not
be devastating news,
because there is still a
good chance that the
test is wrong.
Total 107 893 1000
16. Prior and Posterior Probability
Prior Probability
A prior probability is an initial probability value originally obtained before
any additional information is obtained.
Posterior Probability
A posterior probability is a probability value that has been revised by using
additional information that is later obtained.
Relative to the last example, P(C) = 0.01, which is the probability that a
randomly selected subject has cancer. P(C) is an example of a prior
probability.
Using the additional information that the subject has received a positive test
result, we found that P(C | positive test result) = 0.0748, and this is a posterior
probability because it uses that additional information of the positive test result.
16