You are on page 1of 25

# Conditional Probability

Quantitative Techniques - 1
Prof. Pritam Ranjan
OM & QT, IIM Indore
Email: pritamr@iimidr.ac.in
Oce: A - 102, Phone: 512

## Session - 2: Conditional probability, independence, Bayes

Theorem with application
Textbook coverage: Chapter 8

## Prof. Pritam Ranjan

QT - 1 (July 7, 2015)

1/25

Conditional Probability

Theory
Denition: If P(B) > 0,
P(A|B) =

P(A B)
P(B)

Product rule:
P(A B) = P(A|B)P(B)

## Prof. Pritam Ranjan

QT - 1 (July 7, 2015)

2/25

Conditional Probability

Theory
Total probability:
P(A) = P(A|B)P(B) + P(A|B )P(B )
If B1 , ..., Bn creates a partition of ,
P(A) = P(A|B1 )P(B1 ) + P(A|B2 )P(B2 ) + + P(A|Bn )P(Bn )

## Prof. Pritam Ranjan

QT - 1 (July 7, 2015)

3/25

Conditional Probability

URN model
1. Draw two balls one at-a-time without replacement from an urn
containing 4 red and 6 green balls. Find the probability of

## (a) getting a red ball in the rst draw.

(b) getting a red ball in the second draw.
(c) getting two dierent coloured balls.

## Prof. Pritam Ranjan

QT - 1 (July 7, 2015)

4/25

Conditional Probability

URN model
2. Flip a coin (with P(H) = 0.25). If you get a head, draw one ball
from urn-1. If you observe tail, randomly choose a ball from urn-2.
Find the probability of getting a red ball.

## Prof. Pritam Ranjan

QT - 1 (July 7, 2015)

5/25

Conditional Probability

Tree diagram
1. Draw two balls one at-a-time without replacement from an urn
containing 4 red and 6 green balls. Find the probability of

## (a) getting a red ball in the rst draw.

(b) getting a red ball in the second draw.
(c) getting two dierent coloured balls.

## Prof. Pritam Ranjan

QT - 1 (July 7, 2015)

6/25

Conditional Probability

Tree diagram
2. Flip a coin (with P(H) = 0.25). If you get a head, draw one ball
from urn-1. If you observe tail, randomly choose a ball from urn-2.
If the drawn ball is red, put it in the other urn, otherwise put it
back in the same urn. Choose another ball from the urn you have
just put the ball in. Find the prob. that the second draw is black.

## Prof. Pritam Ranjan

QT - 1 (July 7, 2015)

7/25

Conditional Probability

Independent Events
Denition Two events A and B are said to be independent if and only if (any
of the following is true)

## (a) P(A B) = P(A) P(B)

(b) P(A|B) = P(A) (assuming P(B) > 0)
(c) P(B|A) = P(B) (assuming P(A) > 0)
Related Concepts:

Conditional independence
Disjoint, mutually exclusive, exhaustive and
independence
Pairwise independent vs. mutually independent

## Prof. Pritam Ranjan

QT - 1 (July 7, 2015)

8/25

Conditional Probability

Independent Events
According to USA Today, 65% of Americans are overweight or
obese. If ve Americans are chosen at random, what is the
probability that at least one of them is overweight or obese?

## Prof. Pritam Ranjan

QT - 1 (July 7, 2015)

9/25

Conditional Probability

## Joint probability table

Questionnaire example: The question, Do you smoke? was asked
to 100 people. Results are shown in the table.

Male
Female
Total

Yes
19
12

No
41
28

## (a) What is the probability that a randomly selected individual is a

male who smokes?
(a) What is the probability that a randomly selected male is a smoker?
(b) What is the probability that a randomly selected smoker is male?

## Prof. Pritam Ranjan

QT - 1 (July 7, 2015)

10/25

Conditional Probability

## Joint probability table

(Ex 8.47) The following table gives the percentages of men and women 20 years
and older employed in various occupations (U.S. Survey). There are about
70-million men and 70-million women in the workforce.
Management
Service
Sales
Mining
Production
Total

Men
35
14
17
17
17
100%

Women
42
20
32
1
5
100%

## (a) What does the number 14 in the table represent?

(b) If you pick a person at random from the sales, what is probability you picked a
woman?
(c) If you know someones occupation, can you guess whether they are male or
female? which occupation makes this guess easiest?
(d) What is the probability of picking someone at random from the service
industry?

## Prof. Pritam Ranjan

QT - 1 (July 7, 2015)

11/25

Conditional Probability

## Joint probability table

Let A and B be two factors, and A1 , ..., Am and B1 , ..., Bn denote a
partition (i.e., all possible values of A and B).
A1

A2

B1
B2
..
.

Am

Bn
General rule:

## Prof. Pritam Ranjan

QT - 1 (July 7, 2015)

12/25

Conditional Probability

Marketing example
There are three major manufacturing companies that make a
product: Dell, HP and Lenovo. Dell has a 50% market share, and
HP has a 30% market share. 5% of Dells product is defective, 7%
of HPs is defective, and 10% of Lenovos product is defective.
(a) Construct the joint probability table.
(b) Check whether product is defective and product came from
Dell are independent?

## Prof. Pritam Ranjan

QT - 1 (July 7, 2015)

13/25

Conditional Probability

Bayes Theorem/Rule
P(1st stage event) or P(2nd stage event|1st stage event),
e.g., Draw two balls one at-a-time without replacement from an urn
containing 4 red and 6 green balls. Find the probability of

## (a) getting a red ball in the rst draw.

(b) getting a red ball in the second draw given 1st is red.
Assume: We dont know what happened in the past, but we know the
present. Can we guess what happened in the past?
Objective: to nd inverse probability: (assumption: know the outcome
of 2nd stage event, but dont know the outcome of the 1st stage event)
P(1st stage event|2nd stage event)
Stage-1: observe the color of the 1st ball,
Stage-2: observe the color of the 2nd ball.
Objective: nd P( 1st ball was red | 2nd ball is red)
Prof. Pritam Ranjan

QT - 1 (July 7, 2015)

14/25

Conditional Probability

Bayes Theorem/Rule
NOT motivating enough !!
e.g., [businessinsider.com] Suppose you are living with a partner and
come home from a business trip to discover a strange pair of
What is the probability that your partner is cheating on you?
Stage-1: partner cheated,
Stage-2: found a strange under****.
Objective: nd P(partner cheated | found a strange under****)

## Prof. Pritam Ranjan

QT - 1 (July 7, 2015)

15/25

Conditional Probability

Bayes Theorem/Rule
Stage-1 event: B, Stage-2 event: A
Simple case
P(B|A) =

P(A|B)P(B)
P(A|B)P(B)
=
P(A)
P(A|B)P(B) + P(A|B )P(B )

## More complex version:

P(Ai |Bj )P(Bj )
P(Bj |Ai ) =
k P(Ai |Bk )P(Bk )

## Prof. Pritam Ranjan

QT - 1 (July 7, 2015)

16/25

Conditional Probability

URN model
1. Draw two balls one at-a-time without replacement from an urn
containing 4 red, 6 green and 13 black balls. Find the probability of

(a) getting a red ball in the rst draw given you observed a
red ball in the second draw.
(b) getting a non-red ball in the rst draw given you
observed a red ball in the second draw.

## Prof. Pritam Ranjan

QT - 1 (July 7, 2015)

17/25

Conditional Probability

Marketing application
(Ex 8.40) Some of the managers at a company have an MBA
degree. Of managers at the level of director or higher, 60% have an
MBA. Among other managers of lower rank, 35% have an MBA.
For this company, 15% of managers have a position at the level of
director or higher. If you meet an MBA from this rm, what are the
chances that this person is a director (or higher)?

## Prof. Pritam Ranjan

QT - 1 (July 7, 2015)

18/25

Conditional Probability

## Drug testing application

An HIV test gives a positive result with probability 98% when the
patient is indeed aected by HIV, while it gives a negative result
with 99% probability when the patient is not aected by HIV. If a
patient is drawn at random from a population in which 0.1% of
individuals are aected by HIV and he is found positive, what is the
probability that he is indeed aected by HIV?

## Prof. Pritam Ranjan

QT - 1 (July 7, 2015)

19/25

Conditional Probability

Quality control
There are three major manufacturing companies that make a
product: Dell, HP and Lenovo. Dell has a 50% market share, and
HP has a 30% market share. 5% of Dells product is defective, 7%
of HPs is defective, and 10% of Lenovos product is defective.
(a) If a product is found defective, what is the probability that it
came from Dell?

## Prof. Pritam Ranjan

QT - 1 (July 7, 2015)

20/25

Conditional Probability

Quality control
Consider a rm that manufactures integrated circuits (chips).
Based on extensive (and expensive) testing of a sample of 1000
chips, it nds that the defect rate s 10%. It found that the
inspector typically had a 5% error rate on both defective and
non-defective chips. Find the probability a randomly chosen chip is
defective in the lot that has passed the inspection.

## Prof. Pritam Ranjan

QT - 1 (July 7, 2015)

21/25

Conditional Probability

A realtor is trying to sell a large piece of property. She believes
there is a 0.90 probability that the property will be sold in the next
6 months if the local economy continues to improve throughout the
period, and a 0.50 probability the property will be sold if the local
economy does not continue its improvement during the period. A
state economist consulted by the realtor believes there is a 0.70
chance the economy will continue its improvement during the next
6 months. What is the probability that the piece of property will be
sold during the period?

## Prof. Pritam Ranjan

QT - 1 (July 7, 2015)

22/25

Conditional Probability

Stock market
Two stocks A and B are known to be related in that both are in the
same industry. The probability that stock A will go up in price
tomorrow is 0.20, and the probability that both stocks A and B will
go up tomorrow is 0.12. Suppose that tomorrow you nd that stock
A did go up in price. What is the probability that stock B went up
as well?

## Prof. Pritam Ranjan

QT - 1 (July 7, 2015)

23/25

Conditional Probability

## CASE: Job application

A business graduate wants to get a job in any one of the top 10
accounting rms. Applying to any of these rms requires a lot of eort
and paperwork and is therefore costly. She estimates the cost of applying
to each of the 10 rms and the probability of getting a job oer there.
Firm
Cost
Prob

1
870
0.38

2
600
0.35

3
540
0.28

4
500
0.20

5
400
0.18

6
320
0.18

7
300
0.17

8
230
0.14

9
200
0.14

## If the graduate applies to all 10 companies, what is the probability

that she will get at least one oer?

If she can apply to only one rm, based on cost and success
probability criteria alone, should she apply to rm 5? Why?

## If she applies to companies 2, 5, 8, and 9, what is the total cost?

What is the probability that she will get at least one oer?

## Prof. Pritam Ranjan

QT - 1 (July 7, 2015)

10
170
0.08

24/25

Conditional Probability

Homework

Practice questions:

Chapter 8
Next topic: (discrete) Random Variables
Finish unsolved examples from todays lecture

## Prof. Pritam Ranjan

QT - 1 (July 7, 2015)

25/25