Lecture5 Slides
Lecture5 Slides
Corollary: If A and B are mutually exclusive (can’t happen at the same time), then
Example 6.7: What is the probability of getting a total of 7 or 11 when a pair of fair dice is
tossed?
Solution: Let A be the event that 7 occurs and B the event that 11 comes up. Now, a total of 7
occurs for 6 of the 36 sample points, and a total of 11 occurs for only 2 of the sample
points. Since all sample points are equally likely, we have P(A) = 1/6 and P(B) = 1/18.
The events A and B are mutually exclusive, since a total of 7 and 11 cannot both occur
on the same toss. Therefore,
1 1 2
P(A ∪ B) = P(A) + P(B) = + =.
6 18 9
This result could also have been obtained by counting the total number of points for the
event A ∪ B, namely 8, and writing
n 8 2
P(A ∪ B) = = =
N 36 9
13 13 1
Example: P(♥ or ♠) = P(♥)+ P(♠) - P(♥ and ♠) = + =
52 52 2
13 4 1 4
Example: P(♣ or K) = P(♣)+ P(K) - P(♣ and K) = + − =
52 52 52 13
Example 6.11: 9 identical cards numbered from 1 to 9. card was drawn randomly.
Let A be the event that the card has an even number.
Let B be the event that the card has a number
divisible by 4.
Let C be the event that the card has a prime number.
Calculate the probability of:
i. The occurrence of A and B (together).
ii. The occurrence of A or B.
iii. The occurrence of A only but not B.
iv. The nonoccurrence of A.
v. The occurrence of B and C together.
Solution:
S = {1, 2, 3, 4, 5, 6, 7, 8, 9} ⇒ n( S ) =
9.
A = {2, 4, 6, 8}.
B = {4, 8}.
C = {2, 3, 5, 7}.
iii. P(nonoccurrence of A)
A′ = {1, 3, 5, 7, 9} ⇒ n( A′) =
5
5
⇒ P ( A′ ) =
9
Independent Events
1 1
Example: In the die-tossing experiment, we note that P(A|B) = whereas P(A) = . That is,
3 6
P(A|B) ≠ P(A), indicating that A depends on B.
Now consider an experiment in which 2 cards are drawn in succession from an ordinary deck,
with replacement (⇒A and B are independent). The events are defined as
A: the first card is an ace,
B: the second card is a spade.
13 1 13 1
P(B|A) = = and P(B) = = .
52 4 52 4
That is, P(B|A) = P(B). When this is true, the events A and B are said to be independent.
Example: Suppose we have 2 questions; the first one is T/F, the second is MCQ with five choices.
1 1
P(Guess Answer in T/F) = , P(Guess Answer in MCQ) =
2 5
1 1 1
P(T/F) * P(MCQ) = * = = P(T/F and MCQ)
2 5 10
Multiplicative rule (or product rule), enables us to calculate the probability that two events will
both occur (in successive trials).
Example 6.13: Suppose that we have a fuse box containing 20 fuses, of which 5 are defectives. If
2 fuses are selected at random and removed from the box in succession without
replacing the first, what is the probability that both fuses are defective?
Solution: We shall let D 1 be the event that the first fuse is defective and D 2 the event that the
second fuse is defective; Hence,
5 4 1
without replacing the first ⇒ P(D 1 ∩ D 2 ) = P(D 1 ) P(D 2 | D 1 )= = .
20 19 19
with replacing the first (independent) ⇒ P(D 1 ∩ D 2 ) = P(D 1 ) P(D 2 | D 1 ) = P(D 1 ) P(D 2 | D 1 )
Example 6.16: Three cards are drawn in succession, without replacement, from an ordinary deck
of playing cards. Find the probability that the event A 1 ∩ A 2 ∩ A 3 occurs, where A 1
is the event that the first card is a red ace, A 2 is the event that the second card is a 10
or a jack, and A 3 is the event that the third card is greater than 3 but less than 7.
Solution: First we define the events
A 1 : the first card is a red ace,
A 2 : the second card is a 10 or a jack,
A 3 : the third card is greater than 3 but less than 7.
Now
2 8 12
P(A 1 ) = , P(A 2 |A 1 ) = , P(A 3 |A 1 ∩ A 2 ) = ,
52 51 50
and hence, P(A 1 ∩ A 2 ∩ A 3 ) = P(A 1 )P(A 2 |A 1 )P(A 3 |A 1 ∩ A 2 )
Example 6.17: In a certain assembly plant, three machines, A 1 , A 2 , and A 3 , make 30%, 45%, and
25%, respectively, of the products. It is known from past experience that 2%, 3%,
and 2% of the products made by each machine, respectively, are defective. Now,
suppose that a finished product is randomly
selected. What is the probability that it is defective?
Solution: Consider the following events:
B: the product is defective,
A 1 : the product is made by machine A 1 ,
A 2 : the product is made by machine A 2 ,
A 3 : the product is made by machine A 3 .
Applying the rule of elimination, we can write
Referring to the tree diagram, we find that the three branches give the probabilities
P(A 1 )P(B|A 1 ) = (0.3)(0.02) = 0.006,
P(A 2 )P(B|A 2 ) = (0.45)(0.03) = 0.0135,
P(A 3 )P(B|A 3 ) = (0.25)(0.02) = 0.005,
and hence
P(B) = 0.006 + 0.0135 + 0.005 = 0.0245.
Bayes’ Rule:
Instead of asking for P(B) in the previous example, by the rule of elimination, suppose that we
now consider the problem of finding the conditional probability P(A i |B).
In other words, suppose that a product was randomly selected and it is defective. What is the
probability that this product was made by machine A i ? Questions of this type can be answered by
using the following theorem, called
PHM111s - Probability and Statistics
Theorem: (Bayes’ Rule) If the events A 1 ,A 2 , . . . , A k constitute a partition of the sample space S
such that P(Ai) ≠ 0 for i = 1, 2, . . . , k, then for any event B in S such that P(B) ≠ 0,
P( Ar B ) P ( Ar ) P( B | Ar )
= P(A r |B) = k k
for r = 1, 2, . . . , k.
=i 1 =i 1
∑ P( Ai B) ∑ P( Ai ) P( B | Ai )
Example 6.18: With reference to the previous example, if a product was chosen randomly and
found to be defective, what is the probability that it was made by machine A 3 ?
Solution: Using Bayes’ rule to write
P( A3 ) P( B | A3 )
P(A 3 |B) =
P( A1 ) P( B | A1 ) + P( A2 ) P( B | A2 ) + P( A3 ) P( B | A3 )
and then substituting the probabilities calculated in the previous example, we have
0.005 0.005 10
=
P(A 3 |B) = = .
0.006 + 0.0135 + 0.005 0.0245 49
In view of the fact that a defective product was selected, this result suggests that it
probably was not made by machine A 3 .
Example 6.19: A manufacturing firm employs three analytical plans for the design and
development of a particular product. For cost reasons, all three are used at varying
times. In fact, plans 1, 2, and 3 are used for 30%, 20%, and 50% of the products,
respectively. The defect rate is different for the three procedures as follows:
P(D|P 1 ) = 0.01, P(D|P 2 ) = 0.03, P(D|P 3 ) = 0.02,
where P(D|P j ) is the probability of a defective product, given plan j. If a random
product was observed and found to be defective, which plan was most likely used
and thus responsible?
Solution: From the statement of the problem
P(P 1 ) = 0.30, P(P 2 ) = 0.20, and P(P 3 ) = 0.50,
we must find P(P j |D) for j = 1, 2, 3. Bayes’ rule shows:
P( P1 ) P( D | P1 )
P(P 1 |D) =
P( P1 ) P( D | P1 ) + P( P2 ) P( D | P2 ) + P( P3 ) P( D | P3 )
(0.30)(0.01) 0.003
= = = 0.158
(0.30)(0.01) + (0.20)(0.03) + (0.50)(0.02) 0.019
Similarly,
(0.03)(0.20) (0.02)(0.50)
= P(P 2 |D) = 0.316 and = P(P 3 |D) = 0.526
0.019 0.019
The conditional probability of a defect given plan 3 is the largest of the three; thus, a
defective for a random product is most likely the result of the use of plan 3.