Sie sind auf Seite 1von 51

Chapter 2.

Conditional Probability
The probabilities assigned to various events depend on what is known about
the experimental situation when the assignment is made. For a particular event A,
we have used P(A) to represent the probability assigned to A; we now think of
P(A) as the original or unconditional probability of the event A.

2.1 The definition of conditional probability


In this section, we examine how to information “an
event B has occurred” affects the probability assigned to
A. We will use the notation P(A|B) to represent the
conditional probability of A given that the event B has
occurred.

50-1
Conditioning is one of the fundamental tools of
probability: probably the most fundamental tool.
It is especially helpful for calculating the
probabilities of intersections, and it is critical for
the useful Partition Theorem. Additionally, the
whole field of stochastic processes is based on the
idea of conditional probability. What happens next
in a process depends, or is conditional, on what
has happened beforehand.

2
Dependent events. Suppose A and B are two events on
the same sample space. There will often be dependence
between A and B.
This means that if we know that B has occurred, it
changes our knowledge of the chance that A will occur.
Example1: Toss a die once.

However, if we know that B has occurred, then there is


an increased chance that A has occurred:

3
Conditioning as reducing the sample space
Example 2. The car survey asked respondents which they valued
more highly in a car: ease of parking, or style/prestige. Here are the
responses:

Suppose we pick a respondent at random from all those in the table.


Let event A =“respondent thinks that prestige is more important”.
the number of A 130
P(A)    0.43.
the total number of respondent s 300
Suppose we reduce our sample space from {all people in table} to
B={all males in table}.
P(responde nt thinks prestige is more important, given that respondent is male)
the number of males who favour pretige 79
   0.53. we write P(A | B)  0.53.
the total number of males 150 4
We could follow the same working for any pair of events, A and B:
the number of B who are A
P(A | B) 
the total number of B
the number in table who are both B and A

the total number of B
(the number in B and A)/(the number in S)

(the total number of B)/(the number in S)
P(A  B)
 .
P(B)

5
This is our definition of conditional probability:
Def 1. Let A and B be two events with P(B)>0.
The conditional probability that event A occurs, given that
event B has occurred, is written P(A|B), and is given by
P(A  B)
P(A | B)  .
P(B)
Read P(A|B) as “probability of A, given B”.

Note: P(A|B) gives P(A and B, from within the set of B’s only),
P(A∩B) gives P(A and B, from the whole sample space S).

6
Methods for calculating conditional probability

(1)By reducing the sample space


(2)By the definition of conditional probability

50-7
The properties of conditional probability :
 P ( B A)  0
 P ( S A)  1
  
 P  Bi A    P Bi A
 i 1  i 1
( Bi  B j  , i  j )

 P ( B1  B2 A)  P ( B1 A)  P ( B2 A)  P ( B1 B2 A)
 P ( B A)  1  P ( B A)
 P ( B1  B2 A)  P ( B1 A)  P ( B1 B2 A)
50-8
The Multiplication Rule
For any events A and B,
P ( A  B )  P ( A) P B A ( P ( A)  0)
P ( A  B )  P ( B ) P  A B  ( P ( B )  0)

For events A1,A2,…An,

P( A1 A2  An )  P( A1 ) P A2 A1  P An A1 A2  An1 
( P( A1 A2  An1 )  0)
50-9

Example 3. A news magazine publishes three columns entitled


“Art”(A), “Books”(B), and “Cinema”(C). Reading habits of a
randomly selected reader with respect to these columns are
Read A B C AB AC BC ABC
regularly
Probability 0.14 0.23 0.37 0.08 0.09 0.13 0.05

We thus have
P ( A  B ) 0.08 P ( A  ( B  C )) 0.04  0.05  0.03
P( A | B)    0.348 P( A | B  C )    0.255
P( B) 0.23 P( B  C ) 0.47
P( A  ( A  B  C ))
P( A | reads at least one)  P( A | A  B  C ) 
P( A  B  C )
P( A) 0.14
   0.286
P( A  B  C ) 0.49
P (( A  B )  C )) 0.04  0.05  0.08
P( A  B | C )    0.459
P (C ) 0.37
10
Example 4. Four individuals have responded to a request by a blood
bank for blood donations. None of them has donated before, so
their blood types are unknown. Suppose only type A+ is desired
and only one of the four actually has this type. If the potential
donors are selected in random order for typing, what is the
probability that at least three individuals must by typed to obtain
the desired type?
Solution. Let B={first type not A+} and A={second type not A+},
P(B)=3/4. Given that the first type is not A+, two of the three
individuals left are not A+, so P(A|B)=2/3.
The multiplication rule now gives
P(at least three individuals are typed)=P(A B)=P(A|B)P(B)
=2/3*3/4=0.5

11
The multiplication rule is most useful when the
experiment consists of several stages in succession.
The rule is easily extended to experiments involving
more than two stages.
More than two events
To find P(A1∩A2∩A3) , we can apply the multiplication
rule successively:
P ( A1  A2  A3 )  P ( A3  ( A1  A2 ))
 P ( A3 | A1  A2 ) P ( A1  A2 ) (multiplication rule)
 P ( A3 | A1  A2 ) P ( A2 | A1 ) P ( A1 ) (multiplication rule)
where A1 occurs first, followed by A2 , and finallyA3 .
12
Example 5. For the blood typing experiment of the above
example,
Solution: P(third type is A)  P(third is | first isn ' t  second isn ' t )
 P (second isn ' t | first isn ' t )  P ( first isn ' t )
1 2 3 1
     0.25
2 3 4 4
Example 6: A box contains w white balls and r red balls.
Draw 3 balls without replacement. What is the probability of
getting the sequence white, red, white?
Solution:
P (W1  R2  W3 )  P (W1 ) P ( R2 | W1 ) P (W3 | R2  W1 )
 w   r   w 1 
   .
 w  r   w  r  1   w  r  2  13
2.2 The Law of Total Probability and Bayes formula
Partition of sample space

Bn n
B1 If  Bi  S
i 1

Bi B j  
then we say
B1,B2,…,Bn
B2 S
partition the sample
space S.

14
n

B1 Bn  Bi  
i 1

AB1 A
ABn Bi B j  
n

AB2 A   ABi
i 1

B2  ( ABi )( AB j )  
Total Probability Theorem For the event A,
n n
P ( A)   P ( ABi )   P ( Bi )  P ( A Bi )
i 1 i 1

P ( ABk ) P ( Bk ) P ( A Bk ) Bayes formula


P ( Bk A)   n
P ( A)
 P( Bi ) P( A Bi ) 50-15
i 1
Both formulations of the Partition Theorem are very
widely used, but especially the conditional formulation
n
P ( A)   P ( ABi )  P ( Bi )  P ( A Bi )
n

i 1 i 1

Example 7. Tom gets the bus to campus every day. The bus is on
time with probability 0.6, and late with probability 0.4.
The sample space can be written as S=“ bus journey”, we can
formulate events as follows: T = “on time”; L = “late”.
From the information given, the events have probabilities:
P(T) = 0.6 ; P(L) = 0.4
Question(a) Do the events T and L form a partition of the sample
space? Explain why or why not.
Solution. Yes. They cover all possible journeys (probabilities sum to
1), and there is no overlap in the events by definition. 16
The buses are sometimes crowded and sometimes noisy, both
of which are problems for Tom as he likes to use the bus
journeys to do his Stats assignments. When the bus is on time,
it is crowded with probability 0.5. When it is late, it is crowded
with probability 0.7. The bus is noisy with probability 0.8 when
it is crowded, and with probability 0.4 when it is not crowded.
Question(b) Formulate events C and N corresponding to the bus
being crowded and noisy. Do the events C and N form a
partition of the sample space? Explain why or why not.
Solution. Let C = “crowded”, N =“noisy”.
C and N do NOT form a partition of .
Because it is possible for the bus to be noisy when it is
crowded, so there must be some overlap between C and N.

17
Question(c) Write down probability statements corresponding
to the information given above. Your answer should
involve two statements linking C with T and L, and two
statements linking N with C.
Solution.

Questin(d) Find the probability that the bus is crowded.

Question(e) Find the probability that the bus is noisy.

18
Example 8. The case of the Perfidious Gardener.
Mr Smith owns a hysterical rosebush. It will die with probability 1/2 if
watered, and with probability 3/4 if not watered. Worse still, Smith
employs a perfidious gardener who will fail to water the rosebush
with probability 2/3. Smith returns from holiday to find the rosebush .
. . DEAD!!
What is the probability that the gardener did not water it?

19
Example 9. A chain of video stores sells three different brands of VCRs.
Of its VCR sales, 50% are brand 1(the least expensive), 30% are
brand 2, and 20% are brand 3. Each manufacturer offers a 1-year
warranty on parts and labor. It is known that 25% of brand 1’s VCRs
require warranty repair work, whereas the corresponding percentages
for brands 2 and 3 are 20% and 10%, respectively.
Question(a) What is the probability that a randomly selected purchaser
has bought a brand 1 VCR that will need repair while under warranty?
Question(b) What is the probability that a randomly selected purchaser
has a VCR that will need repair while under warranty?
Question(c) If a customer returns to the store with a VCR that needs
warranty repair work, what is the probability that it is a brand 1 VCR?
A brand 2 VCR? A brand 3 VCR?
Solution. Let ={brand i is purchased}, for i=1,2,and 3.
B={needs repair}, B’={doesn’t need repair}.
20
Then P ( A1 )  0.5, P ( A2 )  0.3, P ( A3 )  0.2,
P ( B | A1 )  0.25, P ( B | A2 )  0.2, P ( B | A3 )  0.1.

a) P ( A1  B )  P ( B | A1 )  P ( A1 )  0.25  0.5  0.125,

b) P( B)  P(brand 1 and repaired)  P(brand 1 and repaired)


 P(brand 1 and repaired)
 P( A1  B)  P( A2  B)  P( A3  B)
 P( B | A1 )  P( A1 )  P( B | A2 )  P( A2 )  P( B | A3 )  P( A3 )
 0.25  0.5  0.2  0.3  0.1 0.2  0.205.
P ( B | A1 )  P ( A1 ) 0.125
c) P ( A1 | B )    0.61,
P( B) 0.205
P ( A2 | B )  0.29, P ( A3 | B )  0.1.
21
Example 10. One machine produced a large batch of
similar manufactured items, and 100 items were
placed in one box, the probability of i defective
items in the box is i 0 1 2 3 4

P 0.1 0.2 0.4 0.2 0.1


At random 10 items are selected without replacement
from the box, if there is no defective item, then the
box can be accepted, otherwise, it can not.
To determine
(1) the probability that one box can be accepted,
(2) the probability that there are i defective items
although a box is accepted. 50-22
Solution. Let Bi denote the event that there are i
defective items in one box , i = 0,1,…,4
Let A denote the box is accepted.
Then we know 4
A   Bi , Bi B j   , i  j , i, j  0,1,2,3,4
i 0

P( Bi ) is given in the above table, and


C100i ,10
P ( A Bi )  , i  0,1,2,3,4
C100,10

By The law of Total Probability and Bayes Formula,


we can find P ( Bi A), i  0,1,2,3,4
50-23
Results are calculated as following
i 0 1 2 3 4

P( Bi ) 0.1 0.2 0.4 0.2 0.1


P ( A Bi ) 1.0 0.9 0.809 0.727 0.652

P ( Bi A) 0.123 0.221 0.397 0.179 0.080


4
P ( A)   P ( Bi )P ( A Bi )  0.814
i 0

P ( Bi ) P ( A Bi )
P ( Bi A)  , i  0,1,2,3,4
P ( A) 50-24
Example 11. 0.5% of all individuals in a certain population
are carriers of a particular disease. A diagnostic test for
this disease has a 95% detection rate for carriers and a 5%
detection rate for noncarriers. Suppose the test is applied
independently to three different blood samples from the
same randomly selected individual. If the first test is
positive, what is the probability that the selected
individual is carrier? If the three tests are positive, what is
the probability that the selected individual is carrier?

Let Ai denote the ith test is positive. Event B denotes the


individual is a carrier of a particular disease.
Given: P ( Ai B )  P ( Ai B )  0.95 , and P ( B )  0.005
C C

50-25
By Bayes formula,
P ( B ) P ( A1 B )
P ( B A1 ) 
P ( B ) P ( A1 B )  P ( B ) P ( A1 | B )
C C

0.005  0.95

0.005  0.95  0.995  0.05
 0.087.
The probability that the selected individual is carrier
is not so large.
50-26
P ( B A1 A2 )
P ( B ) P ( A1 A2 B )

P ( B ) P ( A1 A2 B )  P ( B ) P ( A1 A2 B )
C C

P ( B ) P ( A1 B ) P ( A2 B )

P ( B ) P ( A1 B ) P ( A2 B )  P ( B ) P ( A1 B ) P ( A2 B )
C C C

0.005  0.95 2
  0.6446
0.005  0.95  0.995  0.05
2 2

If the two consecutive tests are positive, then the


probability that the selected individual is a carrier is
over 50%. 50-27
If the three consecutive tests are positive, then the
probability that the selected individual is

0.005  0.95 3
P ( B A1 A2 A3 ) 
0.005  0.95  0.995  0.05
3 3

 0.9718

50-28
Hw. P65/4,5,6,9
Chinese:P35/4,5,6,9

29
2.3 Independent Events
Example 12 Suppose that there are 5 red balls and 3
white balls in a bag. If one person selected the ball
with replacement twice, one ball each time.
Let Ai ( i =1, 2 ) denote the white ball was selected
on the ith selection. To determine
P ( A1 ) , P ( A2 ) , P ( A2 A1 ) , P ( A2 A1 ) ,
Solution. P ( A1 )  3 / 8  P ( A2 ) , P ( A2 A1 )  3 / 8 ,
P ( A2 A1 )  3 / 8 ,
P ( A2 A1 )  P ( A2 )  P ( A2 A1 ) 30
If learning that A1 has occurred does not change the
Probability of A2 , then we say that A1 and A2 are independent.

P ( A1 A2 )  (3 / 8)  P ( A1 ) P ( A2 A1 )  P ( A1 ) P ( A2 )
2

Def Two events A and B are independent, if

P ( A  B )  P ( A) P ( B )

50-31
Properties of independence
 suppose that P ( A)  0, then P ( B )  P ( B A)
 suppose that P ( B )  0, then P ( A)  P ( A B )

 Suppose that P ( A)  0, P ( B )  0,
then “two events A and B are independent”
and “two events A and B are disjoint”
will not happen simultaneously .

50-32
 four pairs of events
A, B; A, B ; A , B; A , B
If any one pair of events are independent,
then the other three pairs are also independent.
Proof.
A, B ind .  A, B ind .
In fact,
P ( AB )  P ( A)  P ( A B )
 P ( A)  P ( A) P ( B )
 
 P ( A) 1  P ( B )  P ( A) P ( B )
50-33
Example 13. It is known that 30% of a certain company’s
washing machines require service while under warranty,
whereas only 10% of its dryers need such service. If
someone purchases both a washer and a dryer made by this
company, what is the probability that both machines need
warranty service? (Assuming that the two machines
function independently of one another)
Let A denote the event that the washer needs service while under
warranty, Let B defined analogously for the dryer.
Then P(A)=0.3, P(B)=0.1.
The probability that both machines need warranty service is
P ( A  B )  P ( A)  P ( B )  0.3  0.1  0.03
Moreover, the probability that neither machine needs service is
P ( AC  B C )  P ( AC )  P ( B C )  0.7  0.9  0.63.
34
Def. The three events A,B,C are mutually
Independent, the following four relations
must be satisfied:
P ( AB )  P ( A) P ( B )
P ( AC )  P ( A) P (C ) (1)
P ( BC )  P ( B ) P (C )
P ( ABC )  P ( A) P ( B ) P (C ) (2)
Note:
1) If the three relations (1) are satisfied, it is called pairwise independent.
2) It is possible that Eq. (2) will be satisfied, but one or more of the
three relations (1) will not satisfied.
3) It is also possible that each of the three relations (1) will be satisfied
but Eq.(2) will not satisfied
A, B, C mutually ind. A, B, C pairwise ind.
50-35
Pairwise independence does not imply mutual independence

Example 14. A jar contains 4 balls: one red, one white, one
blue, and one red, white& blue. Draw one ball at random.
Let A=“ ball has red on it”, B=“ ball has white on it”
C=“ ball has blue on it”.
P(A)=2/4=1/2, ( two balls satisfy event A)
likewise, P(B)=P(C)=1/2.
and P(A∩B)=1/4 (one of 4 balls has both red and white on it)
we get 1 1 1 so P ( A  B )  P ( A)  P ( B )
P ( A)  P ( B )    ,
2 2 4

Likewise, P ( A  C )  P ( A)  P (C ) P ( B  C )  P ( B )  P (C )
So A, B and C are pairwise independent. 36
But, P ( A  B  C )  1 / 4 ( one of 4 balls)
1 1 1
While P ( A) P ( B ) P (C )     P ( A  B  C ).
2 2 2
So A, B and C are NOT mutually independent,
despite being pairwise independent

37
Example 15 There is a unbiased octahedron with different
colors painted on the faces,
1 2 3 4 5 6 7 8
R R R R
W W W W
Y Y Y Y

Toss the octahedron once, observe the color on the bottom.


R red
Let the events W white
Y yellow

50-38
then P ( R )  P (W )  P (Y )  4  1
8 2
3 1
P ( RW )  , P (WY )  P ( RY ) 
8 8
1
P ( RWY )   P ( R ) P (W ) P (Y )
8
But P ( RW )  P ( R ) P (W )
P (WY )  P (W ) P (Y )
P ( RY )  P ( R ) P (Y )
Eq. (2) is satisfied, but the three relations (1) are not satisfied.
Eq(2) does not imply the three relations (1).
50-39
Def. Events A , A , …, A are mutually independent,
1 2 n
if the following relations are satisfied.

P ( Ai A j )  P ( Ai ) P ( A j ), 1  i  j  n
P ( Ai A j Ak )  P ( Ai ) P ( A j ) P ( Ak ), 1  i  j  k  n

P ( A1 A2  An )  P ( A1 ) P ( A2 ) P ( An )

50-40
Example 16 Given: three events A, B and C are
mutually independent, to prove that A and B  C
are also independent.
 
Prove. P A ( B  C )  P ( B  C )  P  A( B  C ) 

 P ( B )  P (C )  P ( BC )
 P ( AB )  P ( AC )  P ( ABC )
 P ( A )P ( B )  P (C )  P ( BC )
 P( A ) P( B  C )
50-41
Example 17. A system consists of four components, as
illustrated in the following figure .The entire system will
work if either the 1-2 subsystem works or if the 3-4
subsystem works (since the two subsystems are
connected in parallel). Since the two components in each
subsystem are connected in series, a subsystem will work
only if both its components work. If components work or
fail independently of one another and if each works with
probability p, what is the probability that the entire
system will work (the system reliability coefficient)?
A1 A2
S1:
A3 A4
42
Letting Ai(i=1,2,3,4) be the event that the ith component
works, the Ai’s are mutually independent.
The event that the 1-2 subsystem works in A1  A2 , and
similarly, A3  A4 denotes the event that the 3-4 subsystem
works.
The event that the entire system works is ( A1  A2 )  ( A3  A4 ) ,
So
P(( A1  A2 )  ( A3  A4 ))  P( A1  A2 )  P( A3  A4 ))  P(( A1  A2 )  ( A3  A4 ))
 P( A1 ) P( A2 )  P( A3 ) P( A4 )  P( A1 ) P( A2 ) P( A3 ) P( A4 )
 p2  p2  p4
 2 p 2  p 4  p 2 (2  p 2 ).

43
Example 18. A system consists of four components as in the figure,
If components work or fail independently of one another and if each
works with probability p. what is the probability that the entire
system will work ? A A
1 2
S2:
B1 B2

 
2
P ( S 2 )   P ( Ai  Bi )  2 p  p 2 2

i 1
 p ( 2  p )  p 2 ( 2  p 2 )  P ( S1 ) .
2 2

Note. For any p  ( 0 , 1 ) ,


f ( p )  (2  p )  (2  p )  0
2 2
50-44
Using the properties of independent events
calculate the probability of the union of events
If A1, A2, …, An are mutually independent,
then n n
P ( Ai )  1   (1  P ( Ai ))
i 1 i 1

n
P ( Ai )  P ( A1  A2    An )
i 1
 1  P ( A1  A2    An )
n
 1  P ( A1 A2  An )  1   P ( Ai )
n i 1
 1   (1  P ( Ai )) 50-45
Specially, when P ( Ai )  p , then

n
P ( Ai )  1  (1  p ) n

i 1

50-46
Example 19. 0.4% of all individuals in a certain
population are carriers of a particular disease.
What is the probability that at least 1 individual
has the disease in 100 individuals ?
Solution. Let A denote at least 1 individual has the disease
in 100 individuals , Ai , (i =1,2,…,100 ) denotes the i th
individual has the disease
100
then A   Ai
i 1
100
P ( A)  1   1  P ( Ai ) 1  (1  0.004)  0.33
100

i 1 47
Let the event Bn denote at least 1 individual
has the disease in n individuals ,then
n
Bn   Ai
i 1

P( Bn )  1  (1   ) n , 0   1
n  1,2,
where P ( Ai )   , i  1,2,..., n.
lim P ( Bn )  1
n 

48
Example 20. Suppose that a machine produces a defective item with
probability p (0<p<1) and produces a nondefective item with
probability 1-p. Suppose further that six items produced by the
machine are selected at random and inspected, and that the results
(defective or nondefective) for these six items are independent.
We shall determine the probability that exactly two of the six
items are defective.
Solution. It can be assumed that the sample space S contains all
possible arrangements of six items, each one of which might be
either defective or nondefective.
Let Dj denote the event that the jth item in the sample is defective,
then D C is the event that this item is nondefective.
j

49
Since the outcomes for the 6 different items are independent,
the probability of obtaining any particular sequence of defective
and nondefective items will simply be the product of the
individual probabilities for the items. For example,
P ( D1c  D2  D3c  D4c  D5  D6c )  P ( D1c ) P ( D2 ) P ( D3c ) P ( D4c ) P ( D5 ) P ( D6c )
 (1  p ) p (1  p )(1  p ) p (1  p )
 p 2 (1  p ) 4 .
It can be seen that the probability of any other particular
sequence in S containing two defective items and four
nondefective items will also be p 2 (1  p ) 4 .
 6
Since there are  2 
distinct arrangements of two defective
 
items and four nondefective items. The probability of
obtaining exactly two defectives is  6  p 2 (1  p ) 4 .
 2
50
Hw. P75/ 7, 9
P85/ 5,7
Chinese:
P43/7,9
P51/9,11

50-51

Das könnte Ihnen auch gefallen