Lect 2 Ondprob
Lect 2 Ondprob
Lect 2 Ondprob
2
AAOC C111: PROBABILITY &
STATISTICS
BITS-PILANI HYDERABAD CAMPUS
Presented by
Dr. M.S. Radhakrishnan
Email: msr@bits-hyderabad.ac.in
Lecture 2
Conditional Probability
Bayes Theorem
Text Book: J. SUSAN MILTON and
JESSE C. ARNOLD, Introduction to
Probability and Statistics, Tata McGraw-
Hill Edition, Fourth Reprint 2008.
5-Aug-19 Prepared by Dr. M.S. Radhakrishnan, BITS, Pilani (Rajasthan) 2
In this lecture we look at
• Conditional Probability
• Independent events
• Theorem on Total Probability
• Bayes theorem
• Some simple examples
{ TH, HT, HH }
P A B P B P A | B
Equivalently P A B P A P B | A
Theorem
If A, B, C are three events such that
P(A B) 0, then
P (A B C)
= P (A) P (B | A) P ( C | A B)
P (A B C)
= P (A) P (B | A) P ( C | A B)
4 3 2 1
52 51 50 5525
P A | B P A
or equivalently if
P A B P A PB
B fails alone
0.15 0.15
B fails alone
0.15 0.15
0.15
P(A fails| B has failed) = 0.5
0.30
P(A alone fails) = P(A fails) - P( A and B fail)
0.2 0.15 0.05
5-Aug-19 Prepared by Dr. M.S. Radhakrishnan, BITS, Pilani (Rajasthan) 23
Example 16
A binary number is a number having digits 0
and 1. Suppose a binary number is made up
of ‘n’ digits. Suppose the probability of
forming an incorrect binary digit is p. Assume
independence between errors. What is the
probability of forming an incorrect binary
number?
Ans: 1- P (forming a correct no.) = 1 – (1-p)n .
5-Aug-19 Prepared by Dr. M.S. Radhakrishnan, BITS, Pilani (Rajasthan) 24
Example 17
A question paper consists of 20 Multiple
choice questions each of which has 4 choices
(of which only one is correct). If a student
answers all the 20 questions randomly, find
the probability that he answers all questions
correctly.
20
13
1
Answer 9.0910
4
5-Aug-19 Prepared by Dr. M.S. Radhakrishnan, BITS, Pilani (Rajasthan) 25
Theorem on Total Probability
If B1, B2……, Bn are n mutually exclusive
and exhaustive events, then for any event A,
P A P B1 P A B1 P B2 P A B2 ...
P Bn P A Bn
B1 B2 Bn
A B1 A B2 A Bn
5-Aug-19 Prepared by Dr. M.S. Radhakrishnan, BITS, Pilani (Rajasthan) 27
Proof: A is the union of the m.e. events
A B1, A B2, …, A Bn.
Thus P(A)
= P(A B1) + P(A B2) + … + P(A Bn)
4R 5R P(R)?
6B 4B
5
B2 P(A | B2)= 10
6
10 A
By the theorem on total probability,
P(A) = P(B1) P(A | B1) + P(B2) P(A | B2)
4 6 6 5
= 0.54
10 10 10 10
0.2
E Bad tire
0.12
F
0.6 Bad tire
0.04
Ans. (0.2) (0.10) + (0.2) (0.12) + (0.6) (0.04)
= 0.025056
5-Aug-19 Prepared by Dr. M.S. Radhakrishnan, BITS, Pilani (Rajasthan) 36
Example 20
A and B play the following game. They throw
alternatively a pair of dice. Whosoever gets
sum of the two numbers on the top as seven
wins the game and the game stops. Suppose A
starts the game. Find the probability (a) A
wins the game (b) B wins the game.
Solution: Let Aj be the event that A gets a
sum 7 on the jth throw. Let Bk be the event
that B gets a sum 7 on the kth throw.
5-Aug-19 Prepared by Dr. M.S. Radhakrishnan, BITS, Pilani (Rajasthan) 37
If A is the event that A wins, then
A A1 ( A1 B2 A3 ) ( A1 B2 A3 B4 A5 ) .....
Note that all the ‘events’ in the RHS are m.e.
Hence P(A wins)
1 5 5 1 5 5 5 5 1
...
6 6 6 6 6 6 6 6 6
1/ 6 6 5
. P(B wins) .
1 (25/ 36) 11 11
5-Aug-19 Prepared by Dr. M.S. Radhakrishnan, BITS, Pilani (Rajasthan) 38
Bayes’ Theorem (Reasoning from effect
to cause)
If B1, B2, ……Bn are n m.e. and exhaustive
events and if A is any event, then
P Br P A Br
PBr A
P B P A B
n
i i
i 1
P A P B1 P A B1 P B2 P A B2 ...
P Bn P A Bn
Thus
P Br P A Br
PBr A
P B P A B
n
i i
i 1
B2 A
0.2
0.35
P( B1 ) P( A | B1 )
P( A)
0.8 0.86
0.8 0.86 0.2 0.35
= 0.91
A
B2
0.3 0.8
P( B1 ) P( A | B1 )
Hence P(B1|A)
P( A)
0.7 0.3
= 0.47
0.7 0.3 0.3 0.8
5-Aug-19 Prepared by Dr. M.S. Radhakrishnan, BITS, Pilani (Rajasthan) 48
End of Lecture 3
***