p4 Conditional Probability
p4 Conditional Probability
§4.1 Introduction
4.1.1 Definition. Let B be an event such that P(B) > 0. Then the conditional probability P(A|B)
of A given B is
P(A ∩ B)
P(A|B) = .
P(B)
4.1.2 Physical interpretation:
If the event B has occurred, what do we know about the probability of event A?
Example.
Dial a mobile phone no. at random. It is natural to assume that
Ask the person whether he/she weighs over 70 kg and the answer is “yes” say. Then, naturally,
Example.
Toss 2 dice. Given first dice scores 1,
P(2nd dice scores 6 | 1st dice scores 1) = P(2nd dice scores 6),
since the two events {1st dice scores 1} and {2nd dice scores 6} are independent (discussed
later).
(i), (ii) and (iii) together confirm that for any fixed event B, P(·|B) defines a probability for
the events of Ω.
14
4.1.4 Example.
A mother has two kids. You ask, “are they both boys? ” The mother says “No”. You know
now that one of the two kids must be a girl. What is the probability that the mother has a
son? Assume that a kid has equal probability (= 1/2) to be of either sex.
Solution:
Take Ω = {bb, bg, gb, gg} with equally likely outcomes (each with probability 1/4), where “ bg” means
that the elder kid is a boy and the younger one is a girl, etc.
Define A = {mother has a son} = {bb, bg, gb}, and B = {both kids are boys} = {bb}.
The required probability is
P(A ∩ B c ) P({bg, gb}) 2/4 2
P(A|B c ) = c
= = = .
P(B ) P({bg, gb, gg}) 3/4 3
P(AN ) = P(AN ∩ AN −1 ) = P(AN |AN −1 )P(AN −1 ) = P(AN |AN −1 )P(AN −1 |AN −2 )P(AN −2 )
N
Y −1
= · · · = P(AN |AN −1 )P(AN −1 |AN −2 ) · · · P(A3 |A2 )P(A2 ) = P(A2 ) P(Aj+1 |Aj ).
j=2
In general,
365 − k 364
P(Ak+1 |Ak ) = (k = 2, . . . , 365), and P(A2 ) = .
365 365
Thus
N
Y −1
P(at least 2 have same birthday) = P(AcN ) = 1 − P(A2 ) P(Aj+1 |Aj )
j=2
364 366 − N 364!
=1− ··· =1− .
365 365 (365 − N )! 365N −1
15
Clearly, as N increases, the above probability increases.
Numerical example:
0.4757, N = 22,
P(at least 2 have same birthday) ≈
0.5073, N = 23.
Thus, at least 23 persons are required for P(at least 2 have same birthday) to exceed 50%.
For (ii),
P(Bj ∩ A) P(A|Bj )P(Bj )
P(Bj |A) = = .
P(A) P(A|B1 )P(B1 ) + · · · + P(A|Bn )P(Bn )
16
Suppose the probability of recovery can be reliably derived from the above observed record.
4.2.2 Simpson’s paradox may arise if we combine results for 2 groups when different numbers and
proportions of each group receive each treatment, and when the recovery rates for each treat-
ment are markedly different between the 2 groups. In such circumstances, direct combination
may hide, or even reverse, the apparent effects.
17
Thus, the diagnosis has high probability (0.95) of being correct and the cancer is quite rare
(0.5% incidence rate).
Now, a person has been diagnosed cancer, what is the probability of his really having cancer?
Answer:
0.95 × 0.005
P(C|D) = = 0.087.
0.95 × 0.005 + 0.05 × 0.995
For reference, if the person has been diagnosed as having no cancer, the probability of his really not
having cancer is P(C c |Dc ) = 0.99975.
4.4.2 (a) A and B take turn to roll a fair dice, with A rolling first. The winner is the first to roll a six.
What is the probability that A wins?
(b) A (possibly unfair) coin is tossed repeatedly and the outcome recorded as a sequence of H’s
(heads) and T’s (tails). Define each set of adjacent H’s and each set of adjacent T’s a run.
Find the probability that a run of r heads is observed before a run of s tails.
4.4.3 One of 3 prisoners, A, B and C, is chosen randomly to be executed the next morning. Only the
warden knows who is going to die but he is not allowed to tell the prisoners until just before the
execution.
18
In the evening, prisoner A asks the warden, “Please, tell me which of B and C is not going to die.
If both are not to die, just tell me one name at random. Since I know anyway that one of them is
not going to die, you will not be giving me any information.”
The warden thought about it for a while, and replied, “I cannot tell you this. For now you think
you have only 1/3 chance of dying. Suppose I told you that B is not to die. You would then think
that you have a 1/2 chance of dying since either you or C will be executed. Thus, in effect, I would
have given you some information.”
Was the warden right?
19