Hey there! We receieved your request
Stay Tuned as we are going to contact you within 1 Hour
One of our academic counsellors will contact you within 1 working day.
Click to Chat
1800-5470-145
+91 7353221155
Use Coupon: CART20 and get 20% off on all online Study Material
Complete Your Registration (Step 2 of 2 )
Sit and relax as our customer representative will contact you within 1 business day
OTP to be sent to Change
Definition of Bayes’ Theorem
Formula of Bayes’ Theorem
Examples of Bayes’ Theorem
Applications of Bayes’ Theorem
Some Other Examples of Bayes’ Theorem
Bayes’ Theorem (or Bayes’ Law or Bayes' Rule) in probability theory and statistics states that the probability of event when a prior evidence or knowledge of conditions is given and that might be related to that event. For example, if cancer is related to age, then, using Bayes’ theorem, a person’s age can be used to more precisely or accurately assess the probability that they have cancer, in contrast to the assessment of the probability of cancer made without knowledge of the person's age.
Bayes’ theorem is a direct application of conditional Probabilities. Bayes’ theorem is useful, to determine posterior probabilities.
Statement: Let E_{1}, E_{2}…E_{n} be the set of ‘n’ mutually exclusive and exhaustive events. Let A be any arbitrary event defined on the same sample space with P(A)≠0, then the probability of event E, when the event A has actually occurred is given by P(E_{i }/A)
P (E_{i}/A) = P (A ∩ E_{i}) / P (A)
= P (E_{i}) P (A / E_{i}) / ∑P (A ∩ E_{i})
Three types of probabilities occur in the above formula P (E_{i}), P(A/E_{i}), P(E_{i}/A)
The probabilities P(E_{i}) i=1,2…..n are such that P(E_{1})+P(E_{2})+….P(E_{n})=1 are called prior probabilities since they are known before conducting experiment.
The probabilities P (A/E_{i}) tell us, how likely the event A under consideration occurs, given each and every prior probability. They may be referred to as likelihood probabilities of the event A, given that event E_{i} has already occurred.
The conditional probabilities P(E_{i}/A) are called Posterior Probabilities, as they are obtained after conducting experiment.
Q1. Cancer Age Problem:
Let’s assume that an individual’s probability of being affected by cancer, as per general condition, is 2%. This is known as the “Base Rate” or prior (i.e. before being informed about the particular case at hand) probability of being infected by cancer. Let C denote the event of "having cancer" Suppose that the probability of a person of being 70 years old is 0.2%. We write P (70) = 0.2%. We write P(70 | C) = 0.002. Finally, let us assume that cancer and age are related in the following way as: the probability for someone diagnosed with cancer with age 70 is 0.6%. This is written P(70 | C) = 0.006.
Considering this, we can calculate the probability of having cancer to a 70-year-old individual is P(C | 70), by applying Bayes' rule:
P(C | 70) = P (70 | C) P(C) / P (70) =0.006 * 0.02 / 0.002 = 6%
Possibly more instinctively, in a group of 100,000 people, 1,000 people will have cancer and 200 people will be 70 years old. Out of those 1000 people with cancer, only 5 people will be 70 years old. Thus, of the 200 people who are 70 years old, only 5 are expected to have cancer.
Even though an individual aged 70 years increases the risk of having cancer, that person’s probability of being affected by cancer is still fairly low, since the base rate of cancer (irrespective of age) is low. This concludes that both the importance of base rate, as well as that it is commonly neglected. Base rate neglect leads to serious misinterpretation of statistics; therefore, special care and attention should be taken to avoid such mistakes. Becoming familiar with Bayes’ theorem is one way to combat the natural tendency to neglect base rates.
Q2. A bag contains 7 red, 6 blue balls and another bag contains 6 red and 9 blue balls. A ball is drawn from the first bag and without knowing the color is put in the second bag. A ball is drawn from the second bag. Find the probability that ball drawn is blue in color.
Sol. Let event E_{1}: Red ball is drawn from the first bag and event E_{2}: Blue ball is drawn from the first bag.
P(E_{1}) = 7/13 P(E_{2}) = 6/15
(Note that E_{1 }and E_{2} are exhaustive events and mutually exclusive)
Let event A: Blue ball is drawn from the second bag.
P(A /E_{1}) = P(Blue ball is drawn from the second bag under the condition that red ball is transferred from the first bag to the second bag) = 9/15
Similarly, P(A/E_{2}) = P(Blue ball is drawn from the second bag under the condition that blue ball is transferred from the first bag to the second bag) = 10/15
Therefore, required probability= P (blue ball is drawn from the second bag)
P (A) = P (A∩E_{1}) + P (A∩E_{2})
= P (E_{1}) P (A/E_{1})+P(E_{2})P(A/E_{2})
= 93/154
Q3. The chances of X, Y, Z becoming managers of a certain company are 4:2:3. If X, Y, Z become managers, the probabilities that the bonus scheme will bee introduced are 0.3, 0.5 and 0.8 respectively. If the bonus scheme has been introduced, what is the probability that X is appointed as the manager?
Let event E_{1}: Person X becomes manager
Event E_{2}: Person Y becomes manager
Event E_{3}: Person Z becomes manager
P (E_{1}) = 4/9 P(E_{2}) = 2/9 and P(E_{3}) = 3/9
(Note E_{1}, E_{2} and E_{3} are mutually exclusive and exhaustive events)
Let event A: Bonus introduced
P (A/E_{1}) = P(Bonus is introduced under the condition that person X becomes manager) = 0.3
P(A/E_{2}) = P(Bonus is introduced under the condition that person Y becomes manager) =0.5
P(A/E_{3}) = P(Bonus is introduced under the condition that person Z becomes manager) = 0.8
P(A) = P(A∩E_{1}) + P(A∩E_{2}) + P(A∩E_{3})
= P(E_{1})P(A/E_{1}) + P(E_{2})P(A/E_{2}) + P(E_{3})/P(A/E_{3})
=23/45
Therefore, required probability = P(Person X becomes manager under the condition that bonus scheme is introduced)
P(E_{1}/A) = P(A∩E_{1})/P(A) = P(E_{1})P(A/E_{1}) / P(A)
= (2/15) / (23/45)
= 6/23
Q4. Balls in URN problem
There are two urns containing colored balls. The first urn contains 60 red balls and 60 blue balls. The second urn contains 40 red balls and 80 blue balls. One of these two urns is randomly chosen but both urns have probability of being chosen and then a ball is drawn at random from one of those two urns. If a red ball is drawn, what is the probability that it comes from the first urn?
Sol. In probabilistic terms, what we know about this problem can be formalized as follows:
P(red | urn_{1}) = ½
P(red | urn_{2})= 1/3
P(urn_{1}) = ½
P(urn_{2}) = ½
The unconditional probability of drawing a red ball can be derived using the law of total probability:
P(red) = P(red | urn1) P(urn1) + P(red|urn_{2}) P(urn_{2})
= ½ . ½ + 1/3 .½
= ¼ + 1/6
= 6 + 4 / 24 = 5/12
By using Bayes' rule, we obtain
P(urn1 | red) = P(red | urn1) P(urn1) / P(red)
= (½ ) . (½) / (5/12)
=( ¼ ) . (5/12)
= 5/24
Spam Filtering: This is one of the most widely and practically proven application of Bayesian inference. This refers to a program, when given a piece of Email can guess whether that E-mail is spam or not, based on the inference or data of previously received spam and non-spam E-mails. It generally uses certain words or phrases in the message to predict.
In bio-chemistry, given the various blood sample tests, decision of occurrence of a particular disease is predicted, so it never be 100% true.
In manufacturing , Selecting best products among two manufacturers.
Another important approach to statistical inference is Bayesian inference. The probabilities may produce different interpretations or conclusions of probability when Bayesian inference is applied. This theorem describes how a subjective degree of belief should change logically when availability of prior related evidence is taken into consideration. It is fundamental to Bayesian statistics.
Illustration:
A die is rolled and it is found that number turned up is an even number. Find the probability that it is 2.
Solution:
All possible events when we roll a die are
A_{1} : 1 appears P(A_{1}) = 1/6
A_{2} : 2 appears P(A_{2}) = 1/6
A_{3} : 3 appears P(A_{3}) = 1/6
A_{4} : 4 appears P(A_{4}) = 1/6
A_{5} : 5 appears P(A_{5}) = 1/6
A_{6} : 6 appears P(A_{6}) = 1/6
An even number has turned up this is an information to us. You should revise the probability of priori events A_{i} in the light of information received. (It will be totally foolish if we don't revise the probabilities. Since the information of even numbers is available, it makes the probabilities of 1, 3, and 5 equal to zero).
Let A: Even number has turned up.
We have to calculate the probability of A_{2} when A is given. Since A_{1}, A_{2}, .........., A_{6} are exhaustive and mutually exclusive we can apply Bayes’ formula
P(A_{2}/A) == (P(A)P(A/A_{2}))/(P(A_{1} )P(A/A_{1})+P(A_{2} )P(A/A_{2})+.……+P(A_{6} )P(A/A_{6}))
where P(A/A_{1}) means probability of A when A_{1} is given i.e. probability of coming of an event number when 1 has appeared. Obviously it is zero.
Hence P(A/A_{1}) = 0
Similarly, P(A/A_{2}) = 1, P(A/A_{3}) = 0, P(A/A_{4}) = 1, P(A/A_{5}) = 0, P(A/A_{6}) = 1
Therefore, P(A_{2}/A) = (1/6×1)/(1/6×0+1/6 ×1+1/6×0+1/6×1+1/6×0+1/6×1)=1/3
Hence this is the required probability.
Note: This problem is very simple and illustrated only to make the application of Bayes’ formula clear.
In a factory, machines A, B and C manufacture 15%, 25% and 60% of the total production of bolts respectively. Of the bolts manufactured by the machine A, B and C 4%, 2% and 3% are defective A bolt is drawn at random and is found to be defective. What is the probability that it was produced by B?
In the formula P(A_{k}/A) = (P(A_{k} )P(A/A_{k}))/(∑^{n}_{(i=1)} P(A_{i} ).P(A/A_{i}))
A_{i} means all the possibilities, which can happen w.r.t. to the given event A, while A_{k} means the particular event whose probability w.r.t. the event B we are required to find
Let us take A = the event of bolt being defective.
A_{1} = the bolt is produced by B.
A_{2} = the bolt is produced by A.
A_{3} = the bolt is produced C.
Required probability = P(A_{1}/A)=(P(A_{1} )P(A/A_{1}))/(∑^{3}_{(i=1)} P(A_{i} ).P(A/A_{i}))
=>P(A_{1}/A) =(25/100×2/100)/((15/100×4/100)+(25/100×2/100)+(60/100×3/100))
= 50/(60+50+180)=5/29.
You may also refer the video for more examples on Bayes’ Theorem
A bag contains 5 balls of unknown colors two balls are drawn at random and are found to be red. Find the probability that the bag contains exactly 4 red balls.
First of all let's try to find out all the possibilities, which can occur w.r.t. to given events. Since two balls drawn are found to be red, so there are four possibilities. The bag contains only two red balls (say event A_{2}), bag contains 3 red balls (A_{3}), bag contains 4 red balls (A_{4}), or that all the balls are red balls (A_{5}).
Let B: two balls are drawn and found to be red. So, it is obvious that we have to find the probability of A_{4} given B i.e. required probability = P(A_{4}/B)
P(A_{4}/B)=(P(A_{4}).P(B/A_{4}))/(P(A_{2}).P(B/A_{2})+P(A_{3}).P(B/A_{3})+P(A_{4}).P(B/A_{4})+P(A_{5}).P(B/A_{5}))
Now as all these four possible cases are equally likely i.e. we cannot say that bag is more likely to contains 5 red balls, than 3 red balls, so priori probabilities of all these events will be equal i.e.
P(A_{2}) = P(A_{3}) = P(A_{4}) = P(A_{5})
Since A_{2}, A_{3}, A_{4} and A_{5} are exhaustive
.·. P (A_{2}) + P (A_{3}) + P (A_{4}) + P (A_{5}) = 1
.·. P (A_{4}) = ¼ (since A_{2}, A_{3}, A_{4} and A_{5} are equally likely also)
Now P (B/A_{4}) means that bag contains 4 red balls and we have to find the probability, that two balls drawn at random are red which is obviously ^{4}C_{2}/^{5}C_{2} .
So P(A_{4}/B)=(1/4×(4C_{2})/(5C_{2}))/(1/4×(2C_{2})/(5C_{2})+1/4×(3C_{2})/(5C_{2})+1/4×(4C_{2})/(5C_{2})+1/4×(5C_{2})/(5C_{2}))
= 12/39
Proof: This is so because
P(A_{i}/B)= P(A_{i} ∩ B)/P(B) = P(A_{i }∩ B)/P((B ∩ A_{i}) U P(B ∩ A_{2}) U...(B ∩ A_{n})) = P(A_{i }∩ B)/P((B ∩ A_{1}) U P(B ∩ A_{2}) U...(B ∩ A_{n}))
= P (Ai).P (B/Ai)/∑^{n}_{i=1 }P (A_{i}) P (B/A_{1})
Note: In conditional probability the sample space is reduced to the set of samples/outcomes in the event which is given to have happened.
A rare genetic disease is discovered. Although only one in a million people carry it, you consider getting screened. You are told that the genetic test is extremely good; it is 100% sensitive (it is always correct if you have the disease) and 99.99% specific (it gives a false positive result only 0.01% of the time). Having recently learned Bayes' theorem, you decide not to take the test. Why?
Bayes' Theorem states that for events X and Y:
P (X|Y) =P (Y|X)*P(X)/P(Y).
We want to know the probability of being healthy(X) given the positive test (PT) results(Y).
According to the Bayes' Theorem,
P (healthy|PT) =P (PT|healthy)*P (healthy)/P (PT).
From the problem we know that
P (healthy) =1-0.000001=0.999999
And getting a false positive
P (PT|healthy) = 0.0001.
The only unknown in the formula above is the probability of having a positive test P (PT). It can be calculated using the definition of marginal probability
P(Y)=P(Y|Z_{1})*P(Z_{1})+...+P(Y|Z_{n})*P(Z_{n}),
where Z_{i}, i=1...n are all possible events. In our case there are only two possible events: "being healthy" and "being sick". Therefore
P (PT) =P (PT|healthy)*P (healthy) +P (PT|sick)*P (sick).
P (PT|sick) =1.0 (Test is always correct in presence of the disease) and
P (sick) =0.000001.
Substituting the numbers into the formula we get
P(PT)=0.0001*0.999999+1.0*0.000001=0.000101.
Finally,
P (healthy|PT)=0.0001*0.999999/0.000101=0.990098, that is very close to 1. So, the probability of still being healthy given that the results of the test turned positive is above 99%. That is a good reason for not taking the test.
An urn B_{1} contains 2 white and 3 black balls and another urn B_{2} contains 3 white and 4 black balls. One urn is selected at random and a ball is drawn from it. If the ball drawn is found black, find the probability that the urn chosen was B_{1}.
Let E_{1}, E_{2} denote the events of selecting urns B_{1} and B_{2} respectively. Then P (E_{1}) = P (E_{2}) = 1/2
Let B denote the event that the ball chosen from the selected urn is black. Then we have to find P (E_{1}/B).
Also, probability of selecting a black ball from the urn 1 i.e. P (B/E_{1}) is 3/5.
Probability of selecting a black ball from the urn 2 i.e. P (B/E_{2}) is 4/7.
Hence the required probability i.e. P(E_{1}/B) = P(E_{1}) P(B/E_{1}) / [P(E_{1}) P(B/E_{1})+ P(E_{2}) P(B/E_{2})
= ( ½. 3/5 )/ ½.3/5 + ½. 4/7
= 21/41.
Each of three bags A, B, C contains white balls and black balls. A has a_{1} white & b_{1} black, B has a_{2} white & b_{2} black and C has a_{3} white & b_{3} black. A ball is drawn at random and is found to be white. Find the respective probability that it is from A, B & C.
Here A_{1}, A_{2}, A_{3} are the events that the bags picked are A, B, C respectively
E is the event that a white ball is drawn.
We are supposed to find P (A_{1}/E), P (A_{2}/E), and P (A_{3}/E).
P(A_{1}/E) = P(A_{1}UB)/P(E) = ((Prob. that bag A is chosen and white is drawn)/(Prob. that a bag is chosen at random and white is drawn))
= (P(A_{1} ).P(E/A_{1} ))/(P(A_{1} ).P(E/A_{1} )+P(A_{2} ).P(E/A_{2} )+P(A_{3} ).P(E/A_{3} ) )
= (1/3.a_{1}/(a_{1}+b_{1} ))/(1/3.[a_{2}/(a_{2}+b_{2} )+a_{2}/(a_{2}+b_{2} )+a_{3}/(a_{3}+b_{3} )] )=p_{1}/(p_{1}+p_{2}+p_{3} )
Similarly, P (A_{2}/E) = P_{2}/P_{1}+P_{2}+P_{3} , P(A_{3}/E) = P_{3}/P_{1}+P_{2}+P_{3}
where p_{1} = a_{1}/a_{1}+b_{1} , p_{2} = a_{2}/a_{2}+b_{3} , p_{3} = a_{3}/a_{3}+b_{3} .
Illustration: A bag contains 5 balls and of these it is equally likely that 0, 1, 2, 3, 4, 5 are white. A ball is drawn and is found to be white. What is the chance that is the only white ball? Solution: Here again, is a problem of conditional probability. The condition B that is given is that one ball is drawn and is white. Hence P(1w/B)=(P(1w/B).P(1w))/(P(0w)P(B/0w)+P(1w),p(B/1w)+..+P(5w).P(B/5w)) Where P(B/1w) - Probability that B occurs when exactly 1 w ball is there = ^{1}C_{1}/^{5}C_{1} and so on
P(1w) = P(2w) =………= P(5w) = P(0w) = 1/6 => the required probability = (1/6 (^{5} C_{1})/(^{5} C_{1}))/(1/6 [0+(^{1} C_{1})/(^{5} C_{1})+(^{2} C_{1})/( ^{5}C_{1} )+...( ^{5}C_{1})/( ^{5}C_{1} )] )=
1/(0+1+2+...+5)=1/15.
You may also consult the Previous Papers to get an idea about the types of questions asked.
Find P (M/N), given P (N/M') = 0.7, P (M) = 0.2, and P (N/M) =0 .8. Solution: P (M') = 1 - P (M) = 0.8. By Bayes' Theorem,
P(M'/N)/P(M/N) = (P(N/M')P(M')/P(N))/(P(N/M)P(M)/P(N)) = 0.7*0.8/(0.8*0.2) = 7/2. Hence 1 = P(M/N) + P(M'/N) = P(M/N)(1 + P(M'/N)/P(M/N)) = P(M/N)(1 + 7/2), and so P(M/N) = 1/(1 + 7/2) = 2/9.
Find P (M'/N), given P (N/M') = 0.4, P (M) = 0.6, and P (N/M) =0.2. Solution: P (M') = 1 - P (M) =0.4. By Bayes' Theorem, P(M'/N)/P(M/N) = (P(N/M')P(M')/P(N))/(P(N/M)P(M)/P(N)) = .4*.4/(.2*.6) = 4/3. Hence 1 = P(M/N) + P(M'/N) = P(M'/N)(P(M/N)/P(M'/N) + 1) = P(M'/N)(3/4 + 1), and so P(M'/N) = 1/(3/4 + 1) = 4/7.
Watch this Video for more reference
Bayes’ Theorem is an important section of Probability. It is a simple and an interesting topic and fetches 2-3 questions in the exam. With a bit of hard work the topic can be mastered easily and it is important to excel in this topic to remain competitive in the IIT JEE.
More Readings
Bayes Theorem
To read more, Buy study materials of Probability comprising study notes, revision notes, video lectures, previous year solved questions etc. Also browse for more study materials on Mathematics here.
Independent Events Table of Content What are...
Bernoulli Trials and Binomial Distribution Table...
Conditional Probability Table of Content...
Probability Table of Content Introduction to...
Binomial Distribution Binomial Distribution for...
Solved Examples on Probability Example 1: A pair...
Random Variables and its Probability Distributions...
Basics of Probability Table of Content Definition...