Suppose you have three bags full of red and black balls. From these bags, you can calculate the chance of drawing red balls or black balls. Also, you can calculate the probability of choosing a particular bag. Won’t it be more interesting to calculate the probability of drawing a specific ball when you know the condition that it is selected from a particular bag? This can be done by using Bayes theorem. Baye’s theorem uses the concept of conditional probability.

### Suggested Videos

## Bayes Theorem

We are quite familiar with probability and its calculation. From one known probability we can go on calculating others. But can we use all the prior information to calculate or to measure the chance of some events happened in past? This is the posterior probability. Bayes theorem calculates the posterior probability of a new event using a prior probability of some events.

Bayes theorem, sometimes, also calculates the probability of some future events.

**Browse more Topics under Probability**

- Introduction to Probability
- Probability of an Event
- Events and its Types
- Events and Its Algebra
- Independent Events
- Conditional Probability
- Basic Theorems of Probability
- Multiplication Theorem on Probability
- Random Variable and Its Probability Distribution
- Mean and Variance of Random Distribution
- Bernoulli Trials and Binomial Distribution

### Theorem

If E_{1}, E_{2}, E_{3}, … , E_{n} are mutually disjoint events with P(E_{i}) ≠ 0, (i = 1, 2, …, n), then for any arbitrary event A which is a subset of the union of events E_{i} such that P(A) > 0, we have

P(E_{i }| A) = [P(E_{i}).P(A | E_{i})] ÷ [∑_{i} P(E_{i}).P(A | E_{i})] = [P(E_{i}).P(A | E_{i})] ÷ P(A), E_{1}, E_{2}, E_{3}, … , E_{n }represents the partition of the sample space S.

### Proof

A is a subset of the union of E_{i}, i.e., A ⊂ ∪E_{i}, we have, A = A ∩ (∪ E_{i}) = ∪ (A ∩ E_{i}). Also, (A ∩ E_{i}) subset E_{i}, (i = 1, 2, …, n) are mutually disjoint events as E_{i}’s are mutually disjoint. So,

P(A) = P[∪ (A ∩ E_{i})] = ∑_{i} P(A ∩ E_{i}) = ∑_{i} P(E_{i}). P(A | E_{i}).

Also, P(A ∩ E_{i}) = P(A). P(E_{i }| A)

or, P(E_{i }| A) = P(A ∩ E_{i}) ⁄ P(A) = [P(E_{i}). P(A | E_{i})] ÷ [∑_{i} P(E_{i}). P(A | E_{i})].

### Example 1

Let us consider the situation where a child has three bags of fruits in which Bag 1 has 5 apples and 3 oranges, Bag 2 has 3 apples and 6 oranges and Bag 3 has 2 apples and 3 oranges. One fruit is drawn at random from one of the bags. It was an apple. Let us calculate the probability that the chosen fruit was apple and was drawn from Bag 3.

Here, we can calculate the probability of selecting the bags, P(E_{1}) = P(E_{2}) = P(E_{3}) = 1⁄3. The probability of drawing out of apple from Bag 1, P(A | E_{1}) = 5⁄8 , from Bag 2, P(A|E_{2}) = 3⁄9 = 1⁄3, from Bag 3, P(A | E_{3}) = 2⁄5.

We have to calculate the probability of drawing a fruit given that we have chosen the Bag 3. The probability of drawing a fruit from Bag 3 given that the chosen fruit is an apple is P(E_{3}|A). The Bayes’ formula helps us to calculate the probability, which is

P(E_{3}| A) = [P(E_{3}). 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})]

⇒ P(E_{3}| A) 0= 1⁄3 × 2⁄5 ÷ [(1⁄3 × 5⁄8) + (1⁄3 × 3⁄9) + (1⁄3 × 2⁄5)] = (2⁄15) ÷ (163⁄360) = 48⁄163.

## More Solved Examples for You

Problem: Let there be three boxes. The content of them are as follows:

- Box I contains 1 black, 2 white, 3 red balls.
- The Box II contains 1 black, 1 white, 2 red balls, and
- Box III has 5 black, 4 white, 1 red balls.

One box is chosen at random and three balls are drawn from it. They all are of different colors. What is the probability that they come from boxes I, II or III?

Solution: Let A be the event of drawing three balls. E_{1}, E_{2}, E_{3} represent the events of selecting Box I, II and III respectively.

P(E_{1}) = P(E_{2}) = P(E_{3}) = 1⁄3.

The probability of drawing three balls given that the Box I is selected, P(A|E_{1}) = (^{1}C_{1} × ^{2}C_{1} × ^{3}C_{1}) ÷ ^{6}C_{3} = 3⁄10.

P(A|E_{2}) = (1 × 1 × 2) ÷ ^{4}C_{3} = ½.

P(A|E_{3}) = (5 × 4 × 1) ÷ ^{10} C_{3} = 1⁄6.

And P(E_{1})×P(A |E_{1}) + P(E_{2})×P(A | E_{2}) + P(E_{3})×P(A | E_{3}) = 29⁄90.

We can calculate the probabilities by using Bayes theorem. So, the required probability,

P(E_{1} | A) = [P(E_{1} | A). P(A | E_{1})] ÷ [P(E_{1})×P(A |E_{1}) + P(E_{2})×P(A | E_{2}) + P(E_{3})×P(A|E_{3})] = (1⁄10) ÷ (29⁄90) = 9⁄29.

P(E_{2} | A) = [P(E_{2} | A). P(A | E_{2})] ÷ [P(E_{1})×P(A |E_{1}) + P(E_{2})×P(A | E_{2}) + P(E_{3})×P(A |E_{3})] = (1⁄6) ÷ (29⁄90) = 15⁄29.

P(E_{3} | A) = 1 − [P(E_{1} | A) + P(E_{2} | A) ] = 1 − [(9⁄29) +(15⁄29)] = 1 − 24⁄29 = 5⁄29.

**Question.** Explain what is meant by Bayes Theorem?

**Answer.** Bayes’ theorem refers to a mathematical formula that helps you in the determination of conditional probability. Furthermore, this theorem describes the probability of any event.

**Question.** How to read Bayes Theorem?

**Answer.** To read the Bayes Theorem, consider an even A. If the event “A” takes place, then the probability of the event “B” is the probability of happening of event “A” when the event “B” takes place times the probability of the event “B” occurring with no prior events all whose division takes place by the probability of the occurring of event “A” that has no prior events.

**Question.** What is the importance of Bayes Theorem?

**Answer.** Consider a situation where a person has tested positive for cancer. Now, the individual wants to find the chances of having cancer after testing positive. So, Bayes Theorem allows the individual to reverse this probability to get his answer.

**Question.** What is the difference between Bayes rule and Conditional Probability?

**Answer.** The conditional probability helps in finding the probability of any particular event such that the event has already taken place. In contrast, Bayes theorem or rule finds just the opposite.

I am really appreciate your effort

Thank you all