Lecture Notes - 5
Lecture Notes - 5
Lecture Notes - 5
(Subject Code: CSC 602, ITC 651)
Prepared by
Dr. Sourabh Jain
Indian Institute of Information Technology
Sonepat
Bayes Theorem
Bayes theorem is a theorem in probability and statistics, named after the
Reverend Thomas Bayes, that helps in determining the probability of an event
that is based on some event that has already occurred. Bayes theorem has many
applications such as bayesian interference, in the healthcare sector - to
determine the chances of developing health problems with an increase in age
and many others.
Now, let us state the theorem and its proof. Bayes theorem states that the
conditional probability of an event A, given the occurrence of another event B, is
equal to the product of the likelihood of B, given A and the probability of A. It is
given as:
Derivation:
According to the definition of conditional density or conditional probability of
continuous random variables, we know that:
Hence, the Bayes Theorem formula for random continuous variables is derived.
Difference Between Conditional Probability and
Bayes Theorem
Since there are 7 red balls out of a total of 11 balls in the bag I, therefore,
P(drawing a red ball from the bag I) = P(A|X) = 7/11
Answer: Hence, the probability that the ball is drawn is from bag I is 0.64
Example 2: Assume that the chances of a person having a skin disease are 40%.
Assuming that skin creams and drinking enough water reduces the risk of skin
disease by 30% and prescription of a certain drug reduces its chance by 20%. At
a time, a patient can choose any one of the two options with equal probabilities.
It is given that after picking one of the options, the patient selected at random
has the skin disease. Find the probability that the patient picked the option of
skin screams and drinking enough water using the Bayes theorem.
Solution: Assume E1: The patient uses skin creams and drinks enough water;
E2: The patient uses the drug; A: The selected patient has the skin disease
P(E1) = P(E2) = 1/2
Using the probabilities known to us, we have
P(A|E1) = 0.4 × (1-0.3) = 0.28
P(A|E2) = 0.4 × (1-0.2) = 0.32
Using Bayes Theorem, the probability that the selected patient uses skin creams
and drinks enough water is given by,
Answer: The probability that the patient picked the first option is 0.47
Example 3: A man is known to speak the truth 3/4 times. He draws a card and
reports it is king. Find the probability that it is actually a king.
Solution:
Let E be the event that the man reports that king is drawn from the pack of cards
A be the event that the king is drawn
B be the event that the king is not drawn.
Then we have P(A) = probability that king is drawn = 1/4
P(B) = probability that king is drawn = 3/4
P(E/A) = Probability that the man says the truth that king is drawn when
actually king is drawn = P(truth) = 3/4
P(E/B)= Probability that the man lies that king is drawn when actually king is
drawn = P(lie) = 1/4
Then according to Bayes theorem, the probability that it is
actually a king = P(A/E)
Answer: Thus the probability that the drawn card is actually a king = 0.5