Uploaded by hoaihieungan1512

Exercises probability

advertisement
EXERCISES: PROBABILITY
ELECTRONIC VERSION OF LECTURE
Dr. Lê Xuân Đại
HoChiMinh City University of Technology
Faculty of Applied Science, Department of Applied Mathematics
Email: ytkadai@hcmut.edu.vn
HCMC — 2021.
Dr. Lê Xuân Đại (HCMUT-OISP)
EXERCISES: PROBABILITY
HCMC — 2021.
1 / 42
OUTLINE
1
PROBABILITY
2
PROBABILITY RULES
Dr. Lê Xuân Đại (HCMUT-OISP)
EXERCISES: PROBABILITY
HCMC — 2021.
2 / 42
Probability
Classical Approach of Assigning Probabilities
SAMPLE SPACES HAVING EQUALLY LIKELY OUTCOMES
DEFINITION 1.1
In many experiments, it is natural to assume
that all outcomes in the sample space are
equally likely to occur. The probability of
any event E equals the proportion of
outcomes in the sample space that are
contained in E
number of outcomes in E
P (E ) =
number of outcomes in S
Dr. Lê Xuân Đại (HCMUT-OISP)
EXERCISES: PROBABILITY
HCMC — 2021.
3 / 42
Probability
Classical Approach of Assigning Probabilities
EXAMPLE 1.1
If 3 balls are "randomly drawn"from a bowl
containing 6 white and 5 black balls, what is
the probability that one of the balls is white
and the other 2 black?
Dr. Lê Xuân Đại (HCMUT-OISP)
EXERCISES: PROBABILITY
HCMC — 2021.
4 / 42
Probability
Classical Approach of Assigning Probabilities
SOLUTION 1.
If we regard the order in which the balls are selected as
being relevant, then the sample space consists of
11 × 10 × 9 = 990 outcomes.
Furthermore, there are 6 × 5 × 4 = 120 outcomes in which the
first ball selected is white and the other 2 are black;
5 × 6 × 4 = 120 outcomes in which the first is black, the
second is white, and the third is black; and 5 × 4 × 6 = 120 in
which the first 2 are black and the third is white.
Hence, assuming that "randomly drawn"means that each
outcome in the sample space is equally likely to occur, we
see that the desired probability is
120 + 120 + 120
4
=
990
11
Dr. Lê Xuân Đại (HCMUT-OISP)
EXERCISES: PROBABILITY
HCMC — 2021.
5 / 42
Probability
Classical Approach of Assigning Probabilities
SOLUTION 2.
Regard the outcome of the experiment as the un-ordered
set of drawn balls.
3
From this point of view, there are C 11
= 165 outcomes in the
sample space.
Now, each set of 3 balls corresponds to 3! outcomes when
the order of selection is noted. As a result, if all outcomes
are assumed equally likely when the order of selection is
noted, then it follows that they remain equally likely when
the outcome is taken to be the un-ordered set of selected
balls.
Hence, using the latter representation of the experiment,
we see that the desired probability is
C 61 ×C 52
3
C 11
Dr. Lê Xuân Đại (HCMUT-OISP)
=
4
·
11
EXERCISES: PROBABILITY
HCMC — 2021.
6 / 42
Probability
Classical Approach of Assigning Probabilities
CONCLUSION
When the experiment consists of a random selection
of k items from a set of n items, we have the
flexibility of either letting the outcome of the
experiment be the ordered selection of the k items or
letting it be the un-ordered set of items selected.
In the first solution, we would assume that each
new selection is equally likely to be any of the so
far un-selected items of the set.
In the second solution, we would assume that all
C nk possible subsets of k items are equally likely to
be the set selected.
Dr. Lê Xuân Đại (HCMUT-OISP)
EXERCISES: PROBABILITY
HCMC — 2021.
7 / 42
Probability Rules
Complement Rule
COMPLEMENT RULE
PROPOSITION 2.1
Since E and E c are always mutually
exclusive and since E ∪ E c = S, we have
1 = P (S) = P (E ∪ E c ) = P (E ) + P (E c )
P (E c ) = 1 − P (E )
Dr. Lê Xuân Đại (HCMUT-OISP)
EXERCISES: PROBABILITY
(1)
(2)
HCMC — 2021.
8 / 42
Probability Rules
Complement Rule
EXAMPLE 2.1
The
sample
n
o space of a random experiment is
a, b, c, d , e with probabilities 0.1; 0.1; 0.2; 0.4,
and
0.2,
n
o respectively. Let A denote the
n event
o
a, b, c , and let B denote the event c, d , e .
Determine the following probabilities:
1
P (A), P (B )
2
P (A c )
3
P (A ∪ B )
4
P (A ∩ B )
Dr. Lê Xuân Đại (HCMUT-OISP)
EXERCISES: PROBABILITY
HCMC — 2021.
9 / 42
Probability Rules
1
Complement Rule
n on on o
Since a , b , c are mutually exclusive, then
n o
n o
n o
P (A) = P ( a ) + P ( b ) + P ( c ) = 0.1 + 0.1 + 0.2 = 0.4.
2
n on on o
Since c , d , e are mutually exclusive, then
n o
n o
n o
P (B ) = P ( c ) + P ( d ) + P ( e ) = 0.2 + 0.4 + 0.2 = 0.8.
3
4
5
P (A c ) = 1 − P n(A) = 1 − 0.4o = 0.6
P (A∪B ) = P ( a, b, c, d , e ) = 0.1+0.1+0.2+0.4+0.2 = 1
n o
P (A ∩ B ) = P ( c ) = 0.2
Dr. Lê Xuân Đại (HCMUT-OISP)
EXERCISES: PROBABILITY
HCMC — 2021.
10 / 42
Probability Rules
Conditional Probability
GAS LEAKS
A maintenance firm has gathered the
following information regarding the failure
mechanisms for air conditioning systems.
Evidence of gas leaks
Evidence of
electrical failure
Dr. Lê Xuân Đại (HCMUT-OISP)
EXERCISES: PROBABILITY
Yes No
Yes 55 17
No 32 3
HCMC — 2021.
11 / 42
Probability Rules
Conditional Probability
EXAMPLE 2.2
The units without evidence of gas leaks or
electrical failure showed other types of
failure. If this is a representative sample of
AC failure, find the probability
That failure involves a gas leak
That there is evidence of electrical failure
given that there was a gas leak
That there is evidence of a gas leak given
that there is evidence of electrical failure
1
2
3
Dr. Lê Xuân Đại (HCMUT-OISP)
EXERCISES: PROBABILITY
HCMC — 2021.
12 / 42
Probability Rules
1
2
3
Conditional Probability
55 + 32
87
=
≈ 0.813
55 + 32 + 17 + 3 107
P(electrical failure | gas
P (electrical failure ∩ gas leak) 55/107
leak)=
=
≈
P (gas leak)
87/107
0.632
P(gas leak)=
P(gas leak | electrical
P (electrical failure ∩ gas leak)
failure)=
=
P (electrical failure)
55/107
≈ 0.764
(55 + 17)/107
Dr. Lê Xuân Đại (HCMUT-OISP)
EXERCISES: PROBABILITY
HCMC — 2021.
13 / 42
Probability Rules
Conditional Probability
EXAMPLE 2.3
Suppose that of all individuals buying a certain
digital camera, 60% include an optional memory card
in their purchase, 40% include an extra battery, and
30% include both a card and battery.
1
Given that the selected individual purchased an
extra battery, find the probability that an optional
card was also purchased
2
Given that the selected individual purchased an
optional card, find the probability that an extra
battery was also purchased
Dr. Lê Xuân Đại (HCMUT-OISP)
EXERCISES: PROBABILITY
HCMC — 2021.
14 / 42
Probability Rules
1
Given that the selected individual
purchased an extra battery, the
probability that an optional card was
also purchased is
P (A|B ) =
2
Conditional Probability
P (A ∩ B ) 0.3
=
= 0.75
P (B )
0.4
Similarly, P (battery|memory card) =
= P (B |A) =
Dr. Lê Xuân Đại (HCMUT-OISP)
P (A ∩ B ) 0.3
=
= 0.5
P (A)
0.6
EXERCISES: PROBABILITY
HCMC — 2021.
15 / 42
Probability Rules
Independence
MULTIPLICATION RULE FOR INDEPENDENT EVENTS
THEOREM 2.1
A and B are independent if and only if
(3)
P (A ∩ B ) = P (A).P (B )
P (A ∩ B ) = P (A|B ).P (B ) = P (A).P (B )
Dr. Lê Xuân Đại (HCMUT-OISP)
EXERCISES: PROBABILITY
HCMC — 2021.
16 / 42
Probability Rules
Independence
EXAMPLE 2.4
If A and B are independent then A c and B
are independent.
Dr. Lê Xuân Đại (HCMUT-OISP)
EXERCISES: PROBABILITY
HCMC — 2021.
17 / 42
Probability Rules
Independence
PROOF.
We need to show that P (A c ∩ B ) = P (A c ).P (B ).
We have
P (A c ∩ B ) + P (A ∩ B ) = P (B )
⇒ P (A c ∩B ) = P (B )−P (A∩B ) = P (B )−P (A).P (B ) =
= P (B )(1 − P (A)) = P (B ).P (A c )
Dr. Lê Xuân Đại (HCMUT-OISP)
EXERCISES: PROBABILITY
HCMC — 2021.
18 / 42
Probability Rules
Independence
EXAMPLE 2.5
If A and B are independent then A c and B c
are independent.
Dr. Lê Xuân Đại (HCMUT-OISP)
EXERCISES: PROBABILITY
HCMC — 2021.
19 / 42
Probability Rules
Independence
PROOF.
We need to show that
P (A c ∩ B c ) = P (A c ).P (B c ).
We might be able to do this straight off
P (A c ∩ B c ) = P ((A ∪ B )c ) = 1 − P (A ∪ B ) =
h
i
= 1 − P (A) + P (B ) − P (A ∩ B ) =
h
i
h
i
= 1−P (A) −P (B ) 1−P (A) = P (A c )−P (B )P (A c ) =
h
i
c
= P (A ) 1 − P (B ) = P (A c )P (B c ).
Dr. Lê Xuân Đại (HCMUT-OISP)
EXERCISES: PROBABILITY
HCMC — 2021.
20 / 42
Probability Rules
Independence
EXAMPLE 2.6
The following circuit operates only if there is a path of
functional devices from left to right. The probability
that each device functions is shown on the graph.
Assume that devices fail independently. What is the
probability that the circuit operates?
Dr. Lê Xuân Đại (HCMUT-OISP)
EXERCISES: PROBABILITY
HCMC — 2021.
21 / 42
Probability Rules
Independence
Let T and B denote the events that the top and
bottom devices operate, respectively. There is a path
if at least one device operates. The probability that
the circuit operates is
P (T ∪ B ) = 1 − P ((T ∪ B )c ) = 1 − P (T c ∩ B c )
A simple formula for the solution can be derived
from the complements T c and B c . From the
assumption that devices fail independently,
P (T c ∩ B c ) = P (T c )P (B c ) = (1 − 0.95) × (1 − 0.9) = 0.005
Therefore,
P (T ∪ B ) = 1 − P (T c ∩ B c ) = 1 − 0.005 = 0.995.
Dr. Lê Xuân Đại (HCMUT-OISP)
EXERCISES: PROBABILITY
HCMC — 2021.
22 / 42
Probability Rules
Independence
EXAMPLE 2.7
The following circuit operates only if there is a path of
functional devices from left to right. The probability
that each device functions is shown on the graph.
Assume that devices fail independently. What is the
probability that the circuit operates?
Dr. Lê Xuân Đại (HCMUT-OISP)
EXERCISES: PROBABILITY
HCMC — 2021.
23 / 42
Probability Rules
Independence
Let L denote the event that there is a path of
functional devices only through the three units on
the left. From the independence of devices,
P (L) = 1 − (1 − 0.9) × (1 − 0.9) × (1 − 0.9) = 1 − 0.13
Similarly, let M denote the event that there is a path
of functional devices only through the two units in
the middle. Then,
P (M ) = 1 − (1 − 0.95) × (1 − 0.95) = 1 − 0.052
Therefore, with the independence assumption used
again, the solution is
(1 − 0.13 ) × (1 − 0.052 ) × 0.99 ≈ 0.987
Dr. Lê Xuân Đại (HCMUT-OISP)
EXERCISES: PROBABILITY
HCMC — 2021.
24 / 42
Probability Rules
Corollary of Additional and Multiplication Rules
INCLUSION-EXCLUSION
THEOREM 2.2
P (A ∪ B ) = P (A) + P (B ) − P (A ∩ B )
Dr. Lê Xuân Đại (HCMUT-OISP)
EXERCISES: PROBABILITY
HCMC — 2021.
25 / 42
Probability Rules
Corollary of Additional and Multiplication Rules
EXAMPLE 2.8
In a certain residential suburb, 60% of all
households get Internet service from the
local cable company, 80% get television
service from that company, and 50% get both
services from that company. If a household is
randomly selected, what is the probability
that it gets exactly one of these services from
the company?
Dr. Lê Xuân Đại (HCMUT-OISP)
EXERCISES: PROBABILITY
HCMC — 2021.
26 / 42
Probability Rules
Corollary of Additional and Multiplication Rules
SOLUTION
n
o
With A = gets Internet service and
n
o
B = gets TV service , the given information implies
that P (A) = 0.6, P (B ) = 0.8, and P (A ∩ B ) = 0.5. The
foregoing proposition now yields
P(subscribes to at least one of the two services)=
P (A ∪ B ) = P (A) + P (B ) − P (A ∩ B ) = 0.6 + 0.8 − 0.5 = 0.9
The event that a household subscribes only to TV
service can be written as A c ∩ B (not Internet and
TV). So
P (A ∪ B ) = P (A) + P (A c ∩ B )
⇒ P (A c ∩ B ) = P (A ∪ B ) − P (A) = 0.9 − 0.6 = 0.3
Dr. Lê Xuân Đại (HCMUT-OISP)
EXERCISES: PROBABILITY
HCMC — 2021.
27 / 42
Probability Rules
Corollary of Additional and Multiplication Rules
Similarly, P (A ∪ B ) = P (B ) + P (A ∩ B c )
⇒ P (A ∩ B c ) = P (A ∪ B ) − P (B ) = 0.9 − 0.8 = 0.1
Therefore,
P (exactly one) = P (A ∩ B c ) + P (A c ∩ B ) = 0.1 + 0.3 = 0.4.
Dr. Lê Xuân Đại (HCMUT-OISP)
EXERCISES: PROBABILITY
HCMC — 2021.
28 / 42
Probability Rules
The Total Probability Rule
THE TOTAL PROBABILITY RULE (TWO EVENTS)
THEOREM 2.3
For any events A and B ,
P (B ) = P (B ∩ A) + P (B ∩ A c )
(4)
P (B ) = P (B |A)P (A) + P (B |A c )P (A c )
Dr. Lê Xuân Đại (HCMUT-OISP)
EXERCISES: PROBABILITY
HCMC — 2021.
(5)
29 / 42
Probability Rules
Dr. Lê Xuân Đại (HCMUT-OISP)
The Total Probability Rule
EXERCISES: PROBABILITY
HCMC — 2021.
30 / 42
Probability Rules
The Total Probability Rule
EXAMPLE 2.9
Suppose 2% of cotton fabric rolls and 3% of
nylon fabric rolls contain flaws. Of the rolls
used by a manufacturer, 70% are cotton and
30% are nylon. What is the probability that a
randomly selected roll used by the
manufacturer contains flaws?
Dr. Lê Xuân Đại (HCMUT-OISP)
EXERCISES: PROBABILITY
HCMC — 2021.
31 / 42
Probability Rules
The Total Probability Rule
n
F = a roll contains a flaw
n
o
C = a roll is cotton
n
o
c
⇒ C = a roll is nylon
o
Then the given percentages imply that
P (C ) = 0.70;
P (F |C ) = 0.02;
P (C c ) = 0.3
P (F |C c ) = 0.03
⇒ P (F ) = P (F |C )P (C ) + P (F |C c )P (C c ) =
= 0.02 × 0.70 + 0.03 × 0.30 = 0.023.
Dr. Lê Xuân Đại (HCMUT-OISP)
EXERCISES: PROBABILITY
HCMC — 2021.
32 / 42
Probability Rules
The Total Probability Rule
DEFINITION 2.1
The events E 1, E 2, . . . , E n are exhaustive if one
E i must occur, so that E 1 ∪ E 2 ∪ . . . ∪ E n = S.
Dr. Lê Xuân Đại (HCMUT-OISP)
EXERCISES: PROBABILITY
HCMC — 2021.
33 / 42
Probability Rules
The Total Probability Rule
THE TOTAL PROBABILITY RULE (MULTIPLE EVENTS)
THEOREM 2.4
Assume E 1, E 2, . . . , E n are mutually exclusive
and exhaustive events. Then for any other
event B
P (B ) = P (B ∩ E 1 ) + P (B ∩ E 2 ) + . . . + P (B ∩ E n )
P (B ) = P (B |E 1 )P (E 1 ) + P (B |E 2 )P (E 2 ) + . . . + P (B |E n )P (E n )
Dr. Lê Xuân Đại (HCMUT-OISP)
EXERCISES: PROBABILITY
HCMC — 2021.
34 / 42
Probability Rules
The Total Probability Rule
EXAMPLE 2.10
A batch of 25 injection-molded parts contains 5 that
have suffered excessive shrinkage.
1
If two parts are selected at random, and without
replacement, what is the probability that the
second part selected is one with excessive
shrinkage?
2
If three parts are selected at random, and without
replacement, what is the probability the third part
selected is one with excessive shrinkage?
Dr. Lê Xuân Đại (HCMUT-OISP)
EXERCISES: PROBABILITY
HCMC — 2021.
35 / 42
Probability Rules
The Total Probability Rule
Let A denote the event that the first part
selected has excessive shrinkage
Let B denote the event that the second
part selected has excessive shrinkage
Let C denote the event that the third part
selected has excessive shrinkage
Dr. Lê Xuân Đại (HCMUT-OISP)
EXERCISES: PROBABILITY
HCMC — 2021.
36 / 42
Probability Rules
1
2
The Total Probability Rule
P (B ) = P (B |A)P (A) + P (B |A c )P (A c ) =
4
5
5 20
× + ×
= 0.2
24 25 24 25
P (C ) = P (C |A ∩ B )P (A ∩ B ) + P (C |A ∩
B c )P (A ∩ B c ) + P (C |A c ∩ B )P (A c ∩ B )+
+P (C |A c ∩ B c )P (A c ∩ B c ) =
=
3
4
5
4 20 5
4
5 20
× × + × × + × × +
23 24 25 23 24 25 23 24 25
5 19 20
+ × ×
= 0.2
23 24 25
Dr. Lê Xuân Đại (HCMUT-OISP)
EXERCISES: PROBABILITY
HCMC — 2021.
37 / 42
Probability Rules
Bayes’ Theorem
THEOREM 2.5 (BAYES’ THEOREM)
Let E 1, E 2, . . . , E n be a collection of n mutually
exclusive and exhaustive events with prior
probabilities P (E i )(i = 1, 2, . . . , n). Then for
any other event B for which P (B ) > 0, the
posterior probability of E i given that B has
occurred is
P (E i |B ) =
Dr. Lê Xuân Đại (HCMUT-OISP)
P (B |E i )P (E i )
, i = 1, n
P (B )
EXERCISES: PROBABILITY
HCMC — 2021.
(6)
38 / 42
Probability Rules
Bayes’ Theorem
EXAMPLE 2.11
Customers are used to evaluate preliminary product designs. In
the past, 95% of highly successful products received good reviews,
60% of moderately successful products received good reviews,
and 10% of poor products received good reviews. In addition,
40% of products have been highly successful, 35% have been
moderately successful, and 25% have been poor products.
1
What is the probability that a product attains a good review?
2
If a new design attains a good review, what is the probability
that it will be a highly successful product?
3
If a product does not attain a good review, what is the
probability that it will be a highly successful product?
Dr. Lê Xuân Đại (HCMUT-OISP)
EXERCISES: PROBABILITY
HCMC — 2021.
39 / 42
Probability Rules
Bayes’ Theorem
Let G denote the event that a product attains a good review.
Let H denote the event that a product was a highly
successful product.
Let M denote the event that a product was a moderately
successful product.
Let P denote the event that a product was a poor product.
The probability that highly successful products received
good reviews is P (G|H ) = 0.95
The probability that moderately successful products
received good reviews is P (G|M ) = 0.60
The probability that poor products received good reviews is
P (G|P ) = 0.10
The probability that products have been highly successful
products is P (H ) = 0.40
The probability that products have been moderately
successful products is P (M ) = 0.35
The probability that products have been poor products is
P (P ) = 0.25
Dr. Lê Xuân Đại (HCMUT-OISP)
EXERCISES: PROBABILITY
HCMC — 2021.
40 / 42
Probability Rules
1
Bayes’ Theorem
P (G) =
P (G|H )P (H ) + P (G|M )P (M ) + P (G|P )P (P ) =
= 0.95 × 0.40 + 0.60 × 0.35 + 0.10 × 0.25 = 0.615
2
3
P (G|H )P (H ) 0.95 × 0.4
=
≈ 0.618
P (G)
0.615
P (G c |H )P (H ) (1 − 0.95) × 0.4
c
P (H |G ) =
=
≈
P (G c )
1 − 0.615
0.052
P (H |G) =
Dr. Lê Xuân Đại (HCMUT-OISP)
EXERCISES: PROBABILITY
HCMC — 2021.
41 / 42
Probability Rules
Bayes’ Theorem
THANK YOU FOR YOUR ATTENTION
Dr. Lê Xuân Đại (HCMUT-OISP)
EXERCISES: PROBABILITY
HCMC — 2021.
42 / 42
Download