Download as pdf or txt
Download as pdf or txt
You are on page 1of 13

Conditional probability

Renu Rameshan

Indian Institute of Technology Mandi

February 27 2019

RMR (IIT Mandi) Conditional probability February 27 2019 1 / 11


Introduction
Consider the following cases
(1) A 6 sided fair die is tossed. Consider the events A = {2, 4, 6} and
B = {2}.
a. P (B) = 1/6.
b. Suppose you know that event A has occurred. Will this additional
information change the probability of event B?
1
P (B|A) = .
3

(2) In this terrain what do you think will happen to the probability of
landslide provided there is heavy rain?

RMR (IIT Mandi) Conditional probability February 27 2019 2 / 11


Introduction
Consider the following cases
(1) A 6 sided fair die is tossed. Consider the events A = {2, 4, 6} and
B = {2}.
a. P (B) = 1/6.
b. Suppose you know that event A has occurred. Will this additional
information change the probability of event B?
1
P (B|A) = .
3

(2) In this terrain what do you think will happen to the probability of
landslide provided there is heavy rain?

RMR (IIT Mandi) Conditional probability February 27 2019 2 / 11


Introduction
Consider the following cases
(1) A 6 sided fair die is tossed. Consider the events A = {2, 4, 6} and
B = {2}.
a. P (B) = 1/6.
b. Suppose you know that event A has occurred. Will this additional
information change the probability of event B?
1
P (B|A) = .
3

(2) In this terrain what do you think will happen to the probability of
landslide provided there is heavy rain?

RMR (IIT Mandi) Conditional probability February 27 2019 2 / 11


Introduction

(3) Say in Mumbai there are two cab operators (Blue and Yellow). A cab was
involved in a hit-and-run case at night. You are given the following data:
a. 85% of the cabs are Blue and 15% are Yellow.
b. A witness says that the car was Yellow. It is known that the witness
correctly identified each one of the color 80% of the time and failed
20% of the time.
What is the probability that the car was actually yellow? (Adapted from
Thinking fast and slow)

In all these problems we are essentially looking at the prob-


ability of an event given the information that another event
has occurred.

RMR (IIT Mandi) Conditional probability February 27 2019 3 / 11


Conditional probability

Let A and B be two events with P (B) > 0. The probability of A,


given that B has already occurred is

P (AB)
P (A|B) = .
P (B)

You can think this way - once B has happened, then B becomes your
new sample space and you are looking at probability of A w.r.t. this
sample space!

Prior probability P (A)

Posterior probability P (A|B), the probability of A posterior to


occurrence of B.

Note that P (A|B) can be equal to, less than or greater than P (A).

RMR (IIT Mandi) Conditional probability February 27 2019 4 / 11


Frequentist view

• This is a limited perspective of conditional probability applicable


only when you are thinking in terms of naive probability. Still it
is useful.

n
• P (A) = A , where nA is number of outcomes favourable to A and n
n
is the total number of outcomes.

nB nAB
• Similarly P (B) = and P (AB) = .
n n

• Note that nAB is the number of outcomes favourable to A and B or


the cardinality of A ∩ B.

RMR (IIT Mandi) Conditional probability February 27 2019 5 / 11


Frequentist view continued
• Once it is known that B has occurred, probability of A becomes
nAB
P (A|B) = .
nB
As mentioned earlier the sample space is B now, hence n gets
replaced with nB .

Warning - this interpretation is applicable only to equally


likely outcomes!

RMR (IIT Mandi) Conditional probability February 27 2019 6 / 11


Problems

(1) When is P (A|B) = 1, P (A|B) = 0?

(2) A 6 sided fair die is thrown. Let A be the event that outcome is even.
Define event B such that
a. 0 < P (A|B) < P (A)

b. 1 > P (A|B) > P (A)

c. P (A|B) = P (A).

d. P (A|B) = 1

e. P (A|B) = 0

RMR (IIT Mandi) Conditional probability February 27 2019 7 / 11


Total probability and Bayes’ rule
Let A1 , A2 , · · · , An be pairwise disjoint (Ai ∩ Aj = ∅, i 6= j) events
such that A1 ∪ A2 ∪ · · · ∪ An = S.

Such a collection of events is referred to as a partition of the sample


space.

Assume that P (Ai ) > 0 for all 1 ≤ i ≤ n.

Let B be another event.

Total probability rule:

P (B) = P (A1 )P (B|A1 ) + P (A2 )P (B|A2 ) + · · · + P (An )P (B|An ).

RMR (IIT Mandi) Conditional probability February 27 2019 8 / 11


Bayes’ rule
If P (B) > 0, then for each k = 1, 2, · · · , n,

P (Ak )P (B|Ak )
P (Ak |B) = .
P (A1 )P (B|A1 ) + P (A2 )P (B|A2 ) + · · · + P (An )P (B|An )

A1

A3

A2 A5

A4

Figure: Sample space partitioned by 5 events A1 , · · · , A5

B = (A1 ∩ B) ∪ (A2 ∩ B) ∪ · · · ∪ (An ∩ B).

RMR (IIT Mandi) Conditional probability February 27 2019 9 / 11


Problems
P1 Mumbai car problem.

P2 A family has two children. Assume that a child can be boy or girl
with probability 0.5.
(1) Given that at least one child is a boy what is the probability that both
are boys?

(2) Given that the younger child is a boy what is the probability that both
are boys?
For both the questions (P2 1, P2 2) write down the corresponding
events and use conditional probability.

RMR (IIT Mandi) Conditional probability February 27 2019 10 / 11


Problems
P3 I have two coins one biased with tail on both sides, the other having
p(H) = 0.2 and p(T ) = 0.8.
(1) I pick a coin toss it and tell you that a tail occurred. What is the
probability that the first coin was selected?

(2) How does the probability change if


a. second coin is fair
b. p(H) = 0.9, p(T ) = 0.1 for the second coin?

RMR (IIT Mandi) Conditional probability February 27 2019 11 / 11

You might also like