Transcript Bayes` Rule

Presentation Presented by Djameel and
Sakir
Bayes’ Theorem
Thomas Bayes was a British mathematician
(1702-1761).
Introduction

Bayes theorem is essentially an expression of
conditional probabilities. More or less, conditional
probabilities represent the probability of an event
occurring given evidence. To better understand,
Bayes Theorem can be derived from the joint
probability of A and B (i.e. P(A,B)) as follows:
Bayes’ Rule: Derivation

Definition:
Let A and B be two events with P(B)  0. The
conditional probability of A given B is:
P( A / B) 
P( A & B)
P(B)
The idea: if we are given that the event B occurred, the relevant sample space
is reduced to B {P(B)=1 because we know B is true} and conditional
probability becomes a probability measure on B.
Bayes’ Rule: Derivation
P(A / B) 
P(A & B)
P(B)
can be re-arranged to:
P( A & B)  P( A / B)P(B)
and, since also:
The formula looks very complicated, but in fact it is easy to use
if you remember that the denominator is the total probability of
B.
Bayes’ Rule:



Why do we care??
Why is Bayes Rule useful??
It turns out that sometimes it is very useful
to be able to “flip” conditional
probabilities. That is, we may know the
probability of A given B, but the
probability of B given A may not be
obvious. An example will help…
Example 1:
Three girls, Aileen, Barbara and Cathy, pack biscuits
in a factory. From the batch allotted to them Aileen
packs 55%, Barbara 30% and Cathy 15%. The
probability that Aileen breaks some biscuits in a
packet is 0.7 and the respective probabilities for
Barbara and Cathy are 0.2 and 0.1. What is the
probability that a packet with broken biscuits found
by the checker was packed by Aileen?
Solution1:
Let A be the event ‘the packet was packed by Aileen’ ,B be the
event ‘the packet was packet was packed by Barbara’ ,C be the
event ‘the packet was packed by Cathy’ ,D be the event ‘the
packet contains broken biscuits’ .
We are given P(A) = 0.55, P(B)= 0.3, P(C)=0.15 and P(D/A)
=0.7, P(D/B) =0.2, P(D/C)= 0.1.
We need to find P(A/D), so we use Bayes` theorem to ‘reverse
the conditions’:
P( A / D) 
P ( D / A) P ( A)
P(D)

Now P(D) is the ‘total’ probability of D, that is the
probability that a packet contains broken biscuits.
This can be found very easily from the tree diagram.
The outcomes resulting in a packet with broken
biscuits are shown with an asterisk.
=
)
A
A
P(
)
.
=0
55
P (B )= 0.3
5
P(
packet
=0
.1
7
D
P ( P (D
A ) = 0 .3
P (D
P (D
C)
0.
*P (D A ) P (A ) = (0 .7 )
(0 .5 5 )
0 .2
=
)
B
* P (D B ) P (B ) = (0 .2 )
(0 .3 )
B)
= 0
.8
.1
)= 0
C
P (D
P(
D
C)
= 0
.9
S tate o f
bisc u its
* P (D C ) P (C ) = (0 .1 )
(0 .1 5 )


P(D)= P(D/A) P(A)+P(D/B) P(B)+P(D/C) P(C)
=(0.7)(0.55)+(0.2)(0.3)+(0.1)(0.15)
=0.46
As shown in the tree diagram
P(D/A) P(A)= (0.7)(0.55)

Therefore
P(A/D)= (0.7)(0.55)/0.46
=0.837

The probability that a packet with broken biscuits
was packed by Aileen is 0.837
Example 2:

Three children ,Catherine ,Michael and David, have
equal plots in a circular patch of garden. The
boundaries are marked out by pebbles. Catherine
has 80 red and 20 white flowers in her patch,
Michael has 30 red and 40 white flowers and David
has 10 red and 60 white flowers. Their young sister,
Mary, wants to pick a flower for her teacher.

Question (a): Find the probability that she picks a
red flower if she chooses a flower at random from
the garden ,ignoring the boundaries.
Solution: (a)

if the boundaries are ignored :
The possibility space S= (flowers in the garden) and
n(S)= 100+70+70+=240
Let R be the event ‘a red flower is chosen’ ,then
n(R)= 80+30+10=120
P(R)= n(R)/ n(S) = 120/240= ½
The probability that Mary picks a red flower if she ignores the
boundaries is 1/2
Question (b):
Find the probability that she picks a red
flower if she first chooses a plot at
random.
C
Solution (b):
A plot is chosen first: Each of the three
plots is equally likely to be chosen.
M
30 red
80 red
40 W hite
20 W hite
Let C be the event ‘Catherine's plot is
chosen’ , then P(C) =1/3
With similar notation P(M) =1/3 and P(D)
=1/3
10 red
60 W hite
D
The outcomes resulting in the event R are shown with
an asterisk on the tree diagram
P
(
=
)
C
1/
3
P(
R
=
C)
8
0
0 /1
0
*P (R C ) P ( C ) =
(80/100) (1/3)
*P (R M ) P ( M ) =
(30/70) (1/3)
P(M ) = 1/3
1 0 /7 0
=
)
D
P (R
PLOT
COLOUR
OF
FLOW ER
*P (R D ) P ( D ) =
(10/70) (1/3 )
Now P(R) =P(R/C) P(C)+P(R/M) P(M)+P(R/D) P(D)
=(80/100)(1/3)+(30/70)(1/3)+(10/70)(1/3)
=16/35
The probability that Mary picks a red flower if she
chooses a plot at random is 16/35
Note: the two different results for part (a) and part (b)
are slightly surprising. In the first case, there is one
group of flowers and each flower is equally likely to
be chosen. In the second case, even though each plot
is equally likely to be chosen,the proportions of red
and white flowers within these plots are different.
Question (c):
If she picks a red flower by the method
described in (b), find the probability that it
comes from Michael's plot.
Solution (c):
Using Bayes` theorem:
P (M / R ) 
P(R / M )P(M )
P(R)
Now P(R/M) P(M) = (30/70) (1/3) = 1/7 (from tree
diagram)
And P(R) = 16/35 (from part (b) )
Therefore P(M/R) = 1/7/16/35
=5/16
Given that Mary picks a red flower, the probability that it came
from Michael's plot is 5/16
Reference from :
Website:



http://www.mathcentre.ac.uk
http://hans-uom.c.la/
Book:
Fundamentals Methods of Mathematical
Economics 4th Edition (Page 103-107)
THE END