Probability Lecture
Probability Lecture
A 2
S T
3 _
0 2
g 2
Probability ir n
S p
Md. Mahfuzur Rahman
R _
Z
Senior Lecturer, Statistics
M
Probability 2
0 1
A 2
T
Probability is the likeliness of occurring any event(s).
S
3 _
0 2
g 2
ir n
S p
R _
Z
M
Some related terms 3
0 1
Deterministic experiment Vs Random experiment:
A 2
T
An experiment whose outcome is predictable in advance is called
S
_
deterministic experiment. Everyone conducting that experiment
3
will get the same outcome.
0 2
g 2
ir n
An experiment whose outcome is not predictable with certainty in
p
advance is called a random experiment. If a random experiment is
S
_
performed then one of many possible outcomes will occur.
R
Z
M
Some related terms 4
0 1
Deterministic experiment Vs Random experiment:
A 2
Example:
S T
Deterministic experiment: 3 _
0 2
Measuring linear distance from Dhaka to Chittagong.
Measuring length of a scale. g 2
ir n
S p
Random experiment:
R _
Z
Measuring weight of a person at different times.
M
Tossing a coin.
Some related terms 5
0 1
Sample Space:
A 2
T
The set of all possible outcomes of a random experiment is called
S
_
sample space of that experiment and is denoted by S. Each
3
individual outcome is called a sample point.
0 2
g 2
For example; ir n
S p
throwing a dice- S= {1, 2, 3, 4, 5, 6 }
R
Lifetime of a lightbulb-
_
S= {x|0≤x<∞} = [0,∞)
Z
M
Some related terms 6
If the outcome of the experiment is the gender of a child, then
0 1
2
S={G, B} ; Where outcome G means that the child is a girl and B that it is a boy.
A
T
Consider an experiment that consists of rolling two balanced dice, one black and
S
one red are thrown and number of dots on their upper faces are noted, also if b be
3 _
the outcomes of the black die and r be the outcomes of the red die. If we let
denote the outcome in which
r 2
black dice has value b and red dice has value r, then
0
the sample space of this experiment is:
g 2
b
r
ir n
S p
R _
Z
M
Some related terms 7
0 1
Event:
A 2
Any subset E of a sample space S is an event.
S T
3 _
For example; 0 2
2
g4, 5, 6 }
Dice throw experiment- S= {1, 2,n3,
r i
S p
Say number 2 turned up in a throw. Then we will say, event E= {2}
has occurred.
R _
Z
M
Some related terms 8
0 1
Mutually Exclusive events:
A 2
S T
Two events are called mutually exclusive if both the events cannot
occur simultaneously in a single trial. In other words, if one of those
3
events occurs, the other event will not occur. _
0 2
g 2
For example;
ir n
p
in a trial of coin toss experiment, event E1= {Head} and event
S
exclusive events. R _
E2={tail} will not occur simultaneously. So, E1 and E2 are mutually
Z
M & event E2={Sunny} may occur
On a day, Event E1={Rain}
simultaneously. These are not mutually exclusive events.
Some related terms 9
0 1
Collectively exhaustive events: A 2
Collectively exhaustive events are those, which S
T
includes all possible
outcomes. 3 _
0 2
g 2
For example;
ir n
p
In a coin tossing experiment events E1= {Head} and event E2={tail}
S together they comprise the all
are collectively exhaustive,_because
R
the outcomes that are possible in a coin tossing experiment. There
are no other possible Z
M outcomes of this experiment than these two.
Some related terms 10
0 1
Equally likely events: A 2
The events of a random experiment are called equallyS T likely if the
chance of occurring those events are all equal. 3 _
0 2
g 2
For example;
ir n
In a coin tossing experiment, thep events E1= {Head} and event
S the chance of occurring E1 is as
E2={tail} are equally likely,_because
same as occurring E2. R
Z
M & event E2={No rain} may not be equally
On a day, Event E1={Rain}
likely.
Some related terms 11
1
0 Disjoint events
Disjoint events: A 2
Two events are called disjoint, if they S T E2
have no common elements between 3 _ E1
them. 0 2
g 2
r i n
events. S p
Mutually exclusive events are disjoint
R _ E1 E2
Z
M
Joint events
0 1
A 2
S T
3 _
0 2
g 2
ir n
S p
R _
Z
M
Approaches of assigning probability 13
0 1
At first we identify the sample space S of the random A 2
experiment.
S T
We then define our favorable event and assign 3 _ probability to the
event using one of the following 3 basic 0 2approaches-
Classical approach g 2
Frequency approach r i n
S p
Subjective approach
R _
Z
M
Approaches of assigning probability 14
0 1
Classical approach: A 2
(when the outcomes are equally likely, mutuallyS
T
exclusive and
collectively exhaustive) 3 _
0
If the sample space of a random experiment
2 has a finite number
(n ) of outcomes g 2
s
r i n
E
S p
n of these outcomes are favorable to an event E
R _
Z occurring event
Then, the probability of E, denoted by P(E) is-
M 𝑃 𝐸 =
𝑛
𝐸
𝑛
𝑆
Approaches of assigning probability 15
0 1
Classical approach: A 2
For example; S T
3 _
Dice throwing experiment-
0 2
S= {1, 2, 3, 4, 5, 6}
g 2
ir n
Consider two events, E1= {2} and E2= {2, 4, 6}
S p
Here, nE1= 1 and nE2= 3. Also, nS= 6
_
Therefore, probability ofRoccurring event E1 is, 𝑃 𝐸 =
𝑛𝐸1
=
1
Z 1 𝑛𝑆 6
M event E2 is, 𝑃 𝐸 = =
probability of occurring 2
𝑛𝐸2
𝑛𝑆
3
6
=
1
2
Approaches of assigning probability 16
0 1
Frequency approach: A 2
If an experiment is repeated n times under the sameS T conditions and
event E occurs f times out of n times, then 3_
𝑓 2
𝑃 𝐸 = lim20
𝑛→∝
g 𝑛
ir n
That is, when n is very large,S
p
P(E) is very close to the relative
frequency of event E.
R _
Z
M
Approaches of assigning probability 17
0 1
Frequency approach: A 2
For example; S T
In a dice throwing experiment- S= {1, 2, 3, 4, 3
_
0 2 5, 6}
And our favorable event is E= {2}
g 2
ir n
S p
Let, 2 occurred a total of 998 times out of total 6000 trials.
Therefore 𝑃 𝐸 = lim
998
R
𝑛→∝ 6000
_≈
1
6
Z
M
Approaches of assigning probability 18
0 1
Subjective approach: A 2
Based on the judgement (personal experience, prior S T information
and belief etc.), one can assign probability to3an_ event E of a
random experiment. 0 2
g 2
i n
For example; on a day of summerr someone made a statement on
S
probability that rain will occur
p
on that day is .70, based on his
previous experience. R_
Z
M
Axioms of probability 19
0 1
Valid probabilities will follow 3 axioms- A 2
Axiom 1: (Axiom of positivizes) : 0≤ P(E) ≤1 S T
3 _
Axiom 2: (Axiom of certainty) : P(S) = 1
0 2
2
Axiom 3: (Axiom of additivity) : For a sequence of disjoint events E1,
g
E2, …, En-
𝑛 ir n 𝑛
p
𝑃 ራ 𝐸𝑖 = 𝑃 𝐸𝑖
S
R _ 𝑖=1 𝑖=1
Z
M
Example 1 20
0 1
A
In a community of 400 people, 20 people has a particular
2 disease. If
a person is selected randomly from that community,
S T what is the
_
probability that he/ she does not has the disease?
3
0 2
g 2
ir n
S p
R _
Z
M
Example 1 21
0 1
In a community of 400 people, 20 people has a particularA 2 disease. If
a person is selected randomly from that community,
S T what is the
probability that he/ she does not has the disease?
3 _
0 2
Solution: g 2
r i n
S p
Let, D= the randomly selected person
𝑓
has the disease
20
ℎ𝑒𝑟𝑒, 𝑃_𝐷 = = = .05
R 𝑛 400
∴ 𝑃Z 𝐷 = 1 − .05 = 0.95
𝑐
0 1
A bag contains 4 white and 6 black balls. If one ball is drawn at random from the
bag, what is the probability that it is
A 2
i. Black, ii. White, iii. White or black and iv. Red.
S T
Answer:
3 _
0 2
i) Let A be the event that the ball is black, then the number of outcomes favorable to
A is 6. Hence
m= g 2
P ( A) = = ;
m 6
n=
ir n
n 10
S p
ii. P (B)=
R _
iii. P (C)= Z
iv. P (D)= M
Exercise 23
Problem 1: 0 1
A 2
Two balanced dice, one black and one red are thrown and the number of dots on
T
their upper faces are noted, let b be the outcomes of the black die and r be the
S
outcomes of the red die. Now answer the following:
3 _
List a sample space of the experiment.
0 2
What is the probability of throwing a double?
g 2
i n
What is the probability that the sum is 5, that is b+r =5?
r
What is the probability that the sump is even?
S
What is the probability that r≤ 2_or b≤ 3?
Z
What is the probability that R
the number on the red die is at least 4 greater than
Mdice.
the number on the black
Exercise 24
0 1
Problem 2:
A 2
spade c) a queen d) not a spade e) a king or queen.
S T
A card is drawn from a pack of 52 cards. Find the probability that it is a) a red card b) a
Problem 3:
3 _
0 2
The following table gives a distribution of weekly wages of 4000 employees of a firm.
Wages in Below 500- 750-
g 2
1000- 1250- 1500- 1750
Tk. 500 750 1000
ir n1250 1500 1750 and
above
No. of 36 472
S
1912p 800 568 140 72
workers
R _
Z
M
An individual is selected random. What is the probability that his wage are
i) under Tk.750 ii) above Tk. 1250 iii) between Tk. 750 and 1250.
Exercise 25
0 1
A 2
T
A balanced coin is tossed until head appears, it is tossed maximum 4 times.
S
a) construct the sample space of the experiment
3 _
b) Is the sample space simple?
0 2
c)
g 2
Calculate the probability that head appears after first throw.
d)
ir n
What is the probability that head does not appear at all?
S p
R _
Z
M
Exercise 26
0 1
A 2
Problem:
S T
Let S={1,2,3,4,5,6}, A={1,3,5}, B={4,6} and C={1,4} find
3 _
A∩B
0 2
B∪C
g 2
A∪(B∩C)
ir n
(A∪B)𝐶
S p
R _
Z
M
Probability with Sampling & without 27
Sampling 0 1
A 2
Sampling with replacement:
S T
_
If the elements of a sample are drawn randomly one by one and after each
3
draw the element is returned to the population then the drawing is said to be
0 2
done with replacement and the process of having the sample is called random
sampling with replacement.
g 2
Sampling without replacement: ir n
p
If the elements of a sample are drawn randomly one by one and after each
S
R _
draw the element is not returned to the population then the drawing is said to
be done without replacement and the process of having the sample is called
Z
random sampling without replacement.
M
Exercise 28
Problem 5: 0 1
A 2
A box contains seven balls – two red, three blue and two yellow. Consider an
experiment that consists of drawing a ball from the box.
S T
_
What is the probability that the first ball drawn is yellow?
3
2
What is the probability that the same colored ball is drawn twice without
0
replacement?
g 2
ir n
What is the probability that the same colored ball is drawn twice with
replacement?
S p
R _
Z
M
Exercise 29
Problem 6: 0 1
A 2
A jar consists of 21 sweets. 12 are green and 9 are blue. William picked two sweets at
random.
S T
a) Draw a tree diagram to represent the experiment.
3 _
b) Find the probability that
0 2
i) both sweets are blue.
g 2
ir n
ii) One sweet is blue and one sweet is green.
S p
c) William randomly took a third sweet. Find the probability that:
i) All three sweets are green?
R _
Z
ii) At least one of the sweet is blue?
M
Probability Laws: 30
Addition Law
0 1
• For disjoint events A and B- A 2
S
The probability that, either event A or event B will
Toccur is,
𝑃 𝐴∪𝐵 = 𝑃 𝐴 +𝑃3 𝐵_
• For disjoint events A, B, C, … , and Z- 0
2
2
g event B or event C or … or
The probability that, either event Anor
r i
event Z will occur is,
𝑃 𝐴 ∪ 𝐵 ∪ 𝐶 ∪ ⋯∪ 𝑍 = S p
𝑃 𝐴 +𝑃 𝐵 +𝑃 𝐶 + …+𝑃 𝑍
R _
Z
M
Probability Laws: 31
Addition Law
0 1
• For joint events A and B- A 2
T
The probability that, either event A or event B orSboth will occur is,
𝑃 𝐴∪𝐵 =𝑃 𝐴 +𝑃 𝐵 −𝑃 3 _
𝐴∩𝐵
• For joint events A, B, and C 0 2
2
g event B or event C or any two
The probability that, either event Anor
r i
of them or all will occur is,
𝑃 𝐴∪𝐵∪𝐶 S p
= 𝑃 𝐴 + 𝑃 𝐵 + 𝑃R𝐶_− 𝑃 𝐴 ∩ 𝐵 − 𝑃 𝐵 ∩ 𝐶 − 𝑃 𝐴 ∩ 𝐶
+𝑃 𝐴∩𝐵∩𝐶 Z
M
Probability Laws: 32
Addition Law
0 1
Example 2: A 2
S
In a company, 60% of the employees have motorcycle,
T 40% has
private car and 20% has both. 3 _
If an employee is selected randomly from 0 2
that company, then
g 2
a. What is the probability that thenemployee has either motorcycle
r i
or private car?
p
S the employee has neither
b. What is the probability_that
Z R
motorcycle nor private car?
M
Probability Laws: 33
Addition Law
0 1
Solution: A 2
Let, S T
3 _
0 2
M= the randomly selected employee has motorcycle C M
C= the randomly selected employee has2car
g
ir n
Here, 𝑃 𝑀 =
60
= 0.6, 𝑃 𝐶S =
p40
= 0.4
100
R _20
100
𝑃 𝑀 ∩ 𝐶Z = = 0.2
100
M
Probability Laws: 34
Addition Law
0 1
Solution(contd.): A 2
a. probability that the person has either S T C M
0 1
Conditional Probability: A 2
The conditional probability of an event E, given S
T
that another event F
has already happened is, 3 _
𝑃 𝐸∩𝐹 0 2
𝑃 𝐸|𝐹 =
𝑃 𝐹 g 2 𝑓𝑜𝑟 𝑃 𝐹 > 0
ir n
S p
R _
Z
M
Probability Laws: 37
0 1
Example 3: A 2
S
In a company, 60% of the employees have motorcycle,
T 40% has
private car and 20% has both. 3 _
If an employee is selected randomly from 0 2
that company, then
g 2
a. What is the probability that thenemployee has a car?
r i
S p
b. If it is known that the employee has a motorcycle, then what is
the probability that the_employee also has a car?
Z R
M
Probability Laws: 38
0 1
Solution: A 2
Let, S T
3 _
M= the randomly selected employee has
motorcycle 0 2 C M
g 2
ir n
C= the randomly selected employee has car
S p
= 0.6, 𝑃_𝐶 =
60 40
Here, 𝑃 𝑀 = = 0.4
100
Z R 20
100
M = 100 = 0.2
𝑃 𝑀∩𝐶
Probability Laws: 39
0 1
Solution(contd.): A 2
a. probability that the employee has a car is- S T
𝑃 𝐶 = 0.4 3 _ C M
0 2
g 2
ir n
S p
R _
Z
M
Probability Laws: 40
0 1
Solution(contd.): A 2
a. probability that the employee has a car is- S T
𝑃 𝐶 = 0.4 3 _ C M
0 2
g 2
ir n
b.
S p
If it is known that the employee has a
R _
motorcycle, then what is the probability
that the employee also has a car is,
C M
𝑃 𝑀∩𝐶Z 0.2 1
𝑃 𝐶|𝑀 = M
𝑃 𝑀
= = = 0.33
0.6 3
Probability Laws: 41
Multiplication Law
0 1
• For two dependent events E and F- A 2
S
The probability that, both event E and event F will
Toccur
simultaneously is, 3 _
𝑃 𝐸 ∩ 𝐹 = 𝑃 𝐸|𝐹02 𝑃 𝐹
2
Here, occurrence of event E dependsgon occurrence of event F.
ir n
S p
R _
• For two independent events E and F-
simultaneously is, M
Z
The probability that, both event E and event F will occur
𝑃 𝐸∩𝐹 =𝑃 𝐸 𝑃 𝐹
Probability Laws: 42
Multiplication Law
0 1
Example 4: A 2
S T
In rainy season, it rains 70% of the days in Bangladesh. When it rains,
80% times it makes thunderstorms. What is the 3 _probability that, in a
particular day of rainy season, it will rain0 2 it will thunderstorm?
and
g 2
r i n
Solution:
S p
Let,
R _
Z
R= it will rain on that particular day
M on that particular day
T= it will thunderstorm
Probability Laws: 43
Multiplication Law
0 1
Solution(contd.): A 2
70
S T 80
Here, given that, 𝑃 𝑅 =
100
= 0.7 and
3 _
𝑃 𝑇|𝑅 =
100
= 0.8
0 2
g 2
Therefore, the probability that, on that particular day of rainy
ir n
season, it will rain and it will thunderstorm is-
S p
R _
𝑃 𝑅 ∩ 𝑇 = 𝑃 𝑇|𝑅 𝑃 𝑅
R
Z = 0.8 ∗ 0.7 = 0.56 T|R
M
Probability Laws: 44
Multiplication Law
0 1
Example 5: A 2
S T
Mr. Fahad and Mr. Khan has to tour abroad for their business frequently.
3 _
Mr. Fahad tours 65% of the times in a year at abroad and Mr. Khan tours
2
50% of the times in a year at abroad. What is the probability that, on
0
2
January 01, 2016, both Mr. Fahad and Mr. Khan will be at abroad?
g
ir n
Solution:
S p
Let,
R _
Z
F= Mr. Fahad will be at abroad
M
K= Mr. Khan will be at abroad
Probability Laws: 45
Multiplication Law
0 1
Solution(contd.): A 2
65
S T 50
Here, given that, 𝑃 𝐹 =
100
= 0.65 and
3 _
𝑃 𝐾 =
100
= 0.5
0 2
g 2
Therefore, the probability that, on January 01, 2016, both Mr.
ir n
Fahad and Mr. Khan will be at abroad is-
S p
𝑃 𝐾_
K F
∩𝐹 =𝑃 𝐾 𝑃 𝐹
= R
Z 0.5 ∗ 0.65 = 0.325 (K∩F)
M
Bayes’ Theorem 46
0 1
Let, events A1 and A2 form partition of S. Let B be an event with P(B)>0. Then,
A 2
𝑃 𝐴1 𝐵 =
𝑃 𝐴1 ∩ 𝐵
=
𝑃 𝐴1 𝑃 𝐵|𝐴1
S T
𝑃 𝐵 _
𝑃 𝐴1 𝑃 𝐵|𝐴1 + 𝑃 𝐴2 𝑃 𝐵|𝐴2
3
Note: 2
0𝑃 𝐵|𝐴
𝑃 𝐵 = 𝑃 𝐴1 ∩ 𝐵 + 𝑃 𝐴2 ∩ 𝐵 = 𝑃 𝐴1
g 2 1 + 𝑃 𝐴2 𝑃 𝐵|𝐴2
A1
ir n A2
S p
R _ B
Z
M
Bayes’ Theorem (more general): 47
0 1
A 2
for an event Aj (j= 1, 2,…, k), S T
Let, events A1, A2, …, Ak form partition of S. Let B be an event with P(B)>0. Then,
𝑃 𝐴𝑗 ∩ 𝐵 𝑃 𝐴𝑗 𝑃 𝐵|𝐴𝑗
3 _
𝑃 𝐴𝑗 𝐵 =
𝑃 𝐵
= 𝑘
0 2
σ𝑖=1 𝑃 𝐴𝑖 𝑃 𝐵|𝐴𝑖
A2
g 2… Ak
ir n
A1
S p
R _ B
Z
M
Bayes’ Theorem 1
2 0
AT
Suppose we have estimated prior probabilities
_ S for events
we are concerned with, and then obtain 2 3 new information.
2 0
We would like to a sound method
n g to computed revised or
r i
S p
posterior probabilities. Bayes’ theorem gives us a way to
do this.
R _
Z
M
Probability Revision using Bayes’
Theorem 1
2 0
T A
_ S
Prior New
2 3
Application
Bayes’
of
Posterior
Probabilities Information
2 0 Theorem
Probabilities
n g
r i
S p
R _
Z
M
Application of Bayes’ Theorem
0 1
A 2
S T
•Consider a manufacturing firm that receives
shipment of parts from two suppliers.
3 _
0 2
•Let A1 denote the event that a part is received
g 2
from supplier 1; A2 is the event the part is received
from supplier 2 ir n
S p
R _
Z
M
We get 65 percent of our parts
0
from supplier 1 and 35 percent 1
from supplier 2.
A 2
S T
3 _
0 2
Thus:
g 2
ir n
P(A1) = .65 and P(A2) = .35
S p
R _
Z
M
Quality levels differ between suppliers
Percentage Percentage
0 1
Good Parts
2
Bad Parts
A
Supplier 1 98
S T2
Supplier 2 95
3 _ 5
2
Let G denote that a part2is0good and B denote the
event that a part is bad.gThus we have the following
r i n
conditional probabilities:
p
S and P(B | A ) = .02
P(G | A ) = _
1 .98 2
Z R
P(GM| A ) = .95 and P(B | A ) = .05
2 2
Tree Diagram for Two-Supplier Example
Step 1
Step 2
Condition 0 1
Experimental
Supplier
A 2
(A1, G)
Outcome
G
S T
A1 3 _
B
0 2
g 2 (A1, B)
A2 ir Gn (A2, G)
S p
R _ B
Z (A2, B)
M
0 1
Each of the experimental outcomes is the intersection of 2
A
events. For example, the probability of selecting
2 a part
T
from supplier 1 that is good is given by: _S
2 3
2 0
n g
i
P( A , G) = rP( A G) = P( A ) P(G | A )
1
S p 1 1 1
R _
Z
M
Probability Tree for Two-Supplier Example
Step 1
Step 2
Condition 0 1
Probability of Outcome
Supplier
A 2
P( A1 G) = P( A1 ) P(G | A1 ) = .6370
P(G | A1)
.98 S T
P(A1)
P(B | A ) 3
_
.020
2 2
.65
g 2 P( A1 B) = P( A1 ) P( B | A1 ) = .0130
P(A2) r inP(B | A ) 2
P( A2 G) = P( A2 ) P(G | A2 ) = .3325
Sp .95
.35
R_ P(B | A2)
Z P( A2 B) = P( A2 ) P(G | A2 ) = .0175
M .05
A bad part broke one of
our machines—so we’re
through for the day.
What is the probability
0 1
the part came from
suppler 1? A 2
S T
3 _
0 2
We know from the law of conditional probability that:
2
g P( A B)
ir n
P( A1 | B) = 1
(4.14)
S p P( B)
_
Observe from the probability tree that:
R
ZP( A B) = P( A )P(B | A )
M 1 1 1
(4.15)
The probability of selecting a bad part is found by adding
0 1
together the probability of selecting a bad part from
A 2 supplier
1 and the probability of selecting bad part from
S T supplier 2.
3 _
0 2
g 2
That is:rin
p
P( B) = P( A1_SB) + P( A2 B)
= P( A1 ) PZ(R
B | A1 ) + P( A2 ) P( B / A2 ) (4.16)
M
Bayes’ Theorem for 2 events
By substituting equations (4.15) and (4.16) into (4.14),0and
1
writing a similar result for P(B | A ), we obtain Bayes’ A 2
theorem for
the 2 event case:
2
S T
3 _
A2
P( 0 ) P( B | A )
P( A | B) =
P( A ) P(gB2| A ) + P( A ) P( B | A )
1 1
1
1
ir n 1 2 2
S p P( A ) P( B | A )
P( A | B) =_ 2 2
P( A ) P( B | A ) + P( A ) P( B | A )
2
Z R 1 1 2 2
M
Do the Math
P( A1 | B) =
P( A1 ) P( B | A1 ) 0 1
2
P( A1 ) P( B | A1 ) + P( A2 ) P( B | A2 )
A
=
(.65)(.02)
=
.0130
= .4262 S T
(.65)(.02) + (.35)(.05) .0305
3 _
0 2
g 2
P ( A2 ) P ( B | A2 )
P ( A2 | B ) = ir n
P ( A1 ) P ( B | A1 ) + P ( A2 ) P ( B | A2 )
(.35S
p
)(.05) .0175
=
R
(.65)(.
_ =
02) + (.35)(.05) .0305
= .5738
Z
M
Bayes’ Theorem
0 1
A 2
P( Ai | B) =
P( Ai ) P( B | Ai )
S T
_
P( A1 ) P( B | A1 ) + P( A2 ) P( B | A2 ) + ... + P( An ) P( B | An )
3
0 2
g 2
ir n
S p
R _
Z
M
Tabular Approach to Bayes’ Theorem—
2-Supplier Problem
0 1
(1) (2)
Prior
(3) (4)
A 2 (5)
Events Probabilities
Conditional
Probabilities
T
Joint
S
Probabilities
Posterior
Probabilities
Ai P(Ai) P(B | A1 )
3 _
P(Ai ∩ B) P(Ai | B)
A1 .65 .02 0 2 .0130 .0130/.0305
g 2 =.4262
A2 .35
n
ir.05 .0175 .0175/.0305
S p =.5738
1.00 R
_ P(B)=.0305 1.0000
Z
M
Using Excel to Compute
Posterior Probabilities 1
Prior Conditional Joint Posterior
2 0
Events
A1 0.65 0.02 0.013 0.426229508A
Probabilities Probabilities Probabilities Probabilities
T
A2 0.35 0.05 0.0175
S
0.573770492
_
0.0305
2 3 1.0000
2 0
g
ir n
S p
R _
Z
M
Problem
0 1
A 2
Problem: A consulting firm submitted a bid for a large consulting contract. The
firm’s management felt id had a 50-50 change of landing the project. However,
S T
the agency to which the bid was submitted subsequently asked for additional
_
information. Past experience indicates that that for 75% of successful bids and
3
2
40% of unsuccessful bids the agency asked for additional information.
0
2
a. What is the prior probability of the bid being successful (that is, prior to
g
r i n
the request for additional information).
S p
b. What is the conditional probability
given that the bid will be ultimately
of a request for additional information
successful.
c. Compute the posterior R _
probability that the bid will be successful given a
Z information.
request for additional
M
Solution
Let S1 denote the event of successfully obtaining the project.
0 1
S2 is the event of not obtaining the project.
A 2
T
B is the event of being asked for additional information about a bid.
S
a. P(S1) = .5 3 _
b. P(B | S1) = .75 0 2
g 2
c. Use Bayes’ theorem to compute the posterior probability that a
ir n
request for information indicates a successful bid.
P(S
p
S B) (.5)(.75)
P( S _B) + P( S B) (.5)(.75) + (.5)(.4)
P( S | B) =
1
1
=
.375 Z R 1 2
= M.652
.575
Bayes’ Theorem 65
Example 6:
0 1
A 2
60% of the students in a class are male. 5% of the males and 10% of
T
the females are in the photography club. If a student is randomly
S
selected from the class.
3 _
a.
0 2
What is the probability that the student is in photography club?
b. g 2
If the randomly selected student is in the photography club,
ir n
what is the chance that the student is male?
S p
R _
Z
M
Bayes’ Theorem 66
Solution:
0 1
Let, M
A 2 F
0 1
Example 7:
A 2
T
Below given a contingency table for Smoking status and Cancer status.
S
Smoking Status/ cancer Status Cancer
3 _
Healthy Total
Smoker 7860
0 2 1530 9390
Non-smoker 5390
g 2 11580 16970
Total 13250
ir n 13110 26360
1.
S p
What is the probability that a randomly selected person is a smoker
2.
R _
What is the probability that a randomly selected person has cancer?
What is the probability that a randomly selected person is both
3.
smoker and has cancer? Z
4.
M
If a person is smoker, what is the probability that he also has cancer?
Probability using contingency table 68
0 1
Solution: A 2
Let, S T
3 _
S= The person is smoker, N= The person is non-smoker
0 2
2
C= The person has cancer, H= The person is healthy
g
r i n
1.
S p
The probability that a randomly selected person is a smoker
9390
𝑃 𝑆 _= = 0.356
Z R 26360
M
Probability using contingency table 69
0 1
Solution (contd.): A 2
2. S T
The probability that a randomly selected person has cancer
13250
3 _
𝑃 𝐶 =
26360 2
= 0.503
0
g 2
i n
The probability that a randomlyrselected person is both smoker and
3.
has cancer S p
𝑃 𝑆∩𝐶 =
7860 _ 7860 9390
R = 𝑃 𝐶 𝑆 𝑃 𝑆 = 9390 × 26360
= 0.298
26360 Z
M
Probability using contingency table 70
0 1
Solution (contd.): A 2
4. S T
If a person is smoker, what is the probability that he also has cancer
3 _
7860 𝑃(𝑆 ∩0 2 7860
𝐶) 26360
𝑃 𝐶𝑆 =
9390
= 0.837 =
g 2
𝑃(𝑆)
=
9390
ir n 26360
S p
R _
Z
M