Professional Documents
Culture Documents
Discrete Presentation 2
Discrete Presentation 2
THEOREM
MARIA IMRAN
IMAAN MUFTI
WHAT IS BAYES
THEOREM?
“In probability theory and
statistics, bayes theorem
describes the probability of an
event, based on conditions that
might be related to the event.”
2
• Bayes' Theorem was named after
18th-century mathematician
Thomas Bayes.
• Bayes' Theorem allows you to
update the predicted
probabilities of an event by
incorporating new information.
• The theorem has become a
useful element in the
implementation of machine
learning.
3
CONDITIONAL PROBABILITY
The conditional probability of A given B, is the probability that event A occurs,
provided that event B has already occurred.
FORMULAS:
• P(A|B)= P(A∩B)
P(B)
• P(B|A)= P(B∩A)
P(A)
1
The probability
Of “B” being true
given that “A” is true The probability
Of “A” being true
5
If A1, A2,…,An is a partition of the sample space,
6
EXAMPLE
7
SOLUTION:
Let A1 be the event of choosing bag 1
A2 the event of choosing bag 2
And B be the event of drawing a black ball.
We have to find P(A1|B):
As there are only two bags , so P(A1) = P(A2) = ½
P(B|A1) = P(Ball is black | ball is picked from bag1) = 6/10 = 3/5
P(B|A2) = P(Ball is black | ball is picked from bag2) = 3/7
By putting the values in the formula of Bayes’ Theorem, we get
= (1/2)x(3/5)
(1/2)x(3/5) + (1/2)x(3/7)
= 7/12
8
APPLICATIONS OF BAYES THEOREM:
One of the applications of Bayes’ theorem is
“Bayesian Spam Filters”
• Identify the particular words
• False negative
• False positive
• Identify the probability of the event that an
email is spam, given that it contains those
specific words
9
IDENTIFYING SPAM E-MAILS USING
BAYES THEOREM:
P(S|E) = P(E|S) P(S)
P(E|S) P(S) + P(E|S) P(S)
P(S) = P(S) = ½
Hence, the probability that a e-mail is
spam, given that it contains the
particular word is:
P(S|E) = P(E|S)
P(E|S) + P(E|S)
10
THANK YOU!