Courses
Courses for Kids
Free study material
Offline Centres
More
Store Icon
Store

Bayes' Theorem Formula

ffImage
Last updated date: 07th Sep 2024
Total views: 77.4k
Views today: 0.77k
hightlight icon
highlight icon
highlight icon
share icon
copy icon

Introduction to Bayes’ Theorem

Bayes' theorem relates to the concept of probability in mathematics. It is one of the formulas that have their practical application in almost all the areas that derive their results from predictions and probability. One can think of weather predictions where the meteorologists use the Bayes' Theorem to predict the day-to-day weather forecast. The scientist can even forewarn the people about prevailing possibilities of bad weather so they can make the required arrangements. Similarly, there are many other fields where Bayes' Theorem is applied. Let’s see more details about Bayes’ theorem.


Components of Bayes’ Theorem 

Bayes' theorem is a tool to calculate the probability of an event taking place. This could be done using Conditional probability. There are two types of probabilities namely, dependent and independent ones.  This can be explained using the example of coins. If a person tosses a single coin the probability of getting heads depends upon the probability of getting tales. This is called a dependent event. On the other hand, if you toss two different coins the probability of getting heads or tales on two coins doesn't depend on each other. This is called an independent event. The concept of conditional probability under Bayes' theorem calculates dependent events.


Bayes’ Theorem of Probability 

We can revise probabilities when new or additional information is supplied by a random experiment or ds. The revision of old (given) probabilities in the light of additional information is of immense help to business and management executives in arriving at a valid decision in the face of uncertainties. The procedure for revising probabilities due to a specific cause is known as Bayes’ theorem and it was originally developed by Rev. Thomas Bayes. It gives a probability law relating a posteriori probability to a priori probability. Bayes’ theorem formula is actually of great help if we want to calculate conditional probability. 


What is a Conditional Probability? 

Sometimes an event or an outcome occurs based on previous occurrences of events or outcomes, this is known as conditional probability. We can calculate the conditional probability if we multiply the probability of the preceding event by the updated probability of the succeeding, or conditional, event.


Understanding Conditional Probability 

The concept of the conditional probability of Bayes' theorem could be better explained using the marble example. Following is the example:

Example: 

There is a bag of five marbles. Three marbles are red and two are black in colour. A student is asked to pick out the black marbles. Here the probability of picking out black marble is dependent upon the other marbles that give us equation ⅖.

 

Now a student is asked to pick out another black marble from the bag. The probability of picking out this black marble is ¼. The possibility of picking black marble now depends upon the event of taking out black marble that was taken out before. This is called conditional probability which is a dependent event. 


Bayes' Theorem Solved Examples 

Given below are a few Bayes' Theorem examples that will help you to solve problems easily.

Example 1) Three identical boxes contain red and white balls. The first box contains 3 red and 2 white balls, the second box has 4 red and 5 white balls, and the third box has 2 red and 4 white balls. A box is chosen very randomly and a ball is drawn from it. If the ball that is drawn out is red, what will be the probability that the second box is chosen?

Solution 1) Let A₁, A₂, and A₃ represent the events of choosing the first, second, and third box respectively, and let X be the event of drawing a red ball from the chosen box.

Then we are to find the value of P(A₂/X)

Since the boxes are identical, hence  

P(A₁) = P(A₂) = P(A₃) 1/3

Again, by the problem

P(X/A₁) = 3/3+2 = 3/5;          P(X/A₂) = 4/4+5 = 4/9; and           P(X/A₃) = 2/2+4 = ⅓

Now, event X occurs if one of the mutually exclusive and exhaustive events A1, A2, and A3 occurs. Therefore, using Bayes’ theorem formula we get, 

\[P(\frac{A₂}{X}) = \frac{P(A₂).P(\frac{X}{A₂})}{P(A₁).P(\frac{X}{A₁}) + P(A₂).P(\frac{X}{A₂}) + P(A₃).P(\frac{X}{A₃})} = \frac{\frac{1}{3}.\frac{4}{9}}{\frac{1}{3}.\frac{3}{5} + \frac{1}{3}. \frac{4}{9} + \frac{1}{3}.\frac{1}{3}} = \frac{\frac{4}{9}}{\frac{62}{45}} = \frac{4}{9} \times \frac{45}{62} = \frac{10}{31}\]


Example 2) Two urns contain respectively 2 red, 3 white, and 3 red, 5 white balls. One ball is drawn at random from the first urn and transferred into the second one. A ball is then drawn from the second urn and it turns out that the ball is red. What will be the probability that the transferred ball was white? 

Solution 2) Let A₁ and A₂ denote the events that the transferred ball from the first urn to the second is white and red respectively. Then, 

P(A₁) = 3/3+2 = 3/2 and P(A₂) = 2/3+2 = 2/5

Again, let X denote the event of drawing a red ball from the second urn after the occurrence of A₁ or A₂. then we are to find the value of P(A₁/X).== 3/9 = ⅓ and P(X/A₂) = 3+⅓+5+1 = 4/9 

Now the event X occurs if any of the mutually exclusive and exhaustive events A₁ and A₂ occur therefore, using the Bayes' theorem formula we get, 

\[P(\frac{A₁}{X}) = \frac{P(A₁).P(\frac{X}{A₁})}{P(A₁).P(\frac{X}{A₁}) + P(A₂).P(\frac{X}{A₂})} = \frac{\frac{3}{5}.\frac{1}{3}}{\frac{3}{5}.\frac{1}{3} + \frac{2}{5}.\frac{4}{9}} = \frac{\frac{1}{5}}{\frac{17}{45}} = \frac{9}{17}\]


Example 3) In a bolt factory, three machines M₁, M₂, and M₃ manufacture 2000, 2500, and 4000 bolts every day. Of their output 3%, 4%, and 2.5% are defective bolts. One of the bolts is drawn very randomly from a day’s production and is found to be defective. What is the probability that it was produced by machine M₂?

Solution 3) let A₁, A₂, and A₃ denote the events that the randomly drawn bolt from a day’s production was manufactured by machines M₁, M₂, and M₃ respectively. If X is the event that the drawn bolt is defective, then we are to find the value of P(A₂/X)

Now by the question we have,

\[P(A₁) = \frac{2000}{2000+2500+4000} = \frac{2000}{8500} = \frac{4}{17}\]

\[P(A₂) =  \frac{2500}{2000+2500+4000} = \frac{2500}{8500} = \frac{5}{17}\]

\[P(A₃) =  \frac{4000}{2000+2500+4000} = \frac{4000}{8500} = \frac{8}{17}\]

Again, P(X/A₁) = 3/100, P(X/A₂) = 4/100 and P(X/A₃) = 2.5/100

Now, event X occurs if one of the mutually exclusive and exhaustive events A₁, A₂ and A₃ occurs. Therefore, using Bayes` theorem formula we get,

\[P(\frac{A₂}{X}) = \frac{P(A₂).P(\frac{X}{A₂})}{P(A₁).P(\frac{X}{A₁}) + P(A₂).P(\frac{X}{A₂}) + P(A₃).P(\frac{X}{A₃})} = \frac{\frac{5}{17}.\frac{4}{100}}{\frac{4}{17}.\frac{3}{100} + \frac{5}{17}.\frac{4}{100} + \frac{8}{17}.\frac{25}{100}} = \frac{20}{12+20+20} = \frac{20}{52} = \frac{5}{13}\]

FAQs on Bayes' Theorem Formula

1. What is a Mutually Exclusive Event?

Two events A and B connected with a random experiment E, are said to be mutually exclusive if they cannot occur simultaneously. Symbolically, events A and B are mutually exclusive when A⋂B = Ø or P(A⋂B) = 0, Where Ø is the impossible event. Two simple events connected with a random experiment are always mutually exclusive but two compound events may be or may not be so. Let A, B, and C be the events ‘even face’, ‘odd face’, and ‘a multiple of three’ respectively in the random experiment of throwing an unbiased die. Clearly the events A and B cannot occur simultaneously and hence, they are mutually exclusive, but the events B and C occur simultaneously if the result of the experiment is three and hence, they are not mutually exclusive.   

2. What is an Exhaustive Event?

A set of events connected with a random experiment, is said to be exhaustive if at least one of the sets is sure to occur at every performance of the experiment. Simple events connected with a random experiment always constitute an exhaustive set of events. Consider the random experiment of throwing an unbiased die from the box. Let A1, A2,......A6 be the events ‘one’, ‘two’,..... ‘Six’, respectively. Clearly, at least one of these events will occur at every performance of the experiment and hence, they form an exhaustive set of events. In the same experiment, let A, B, and C be the events ‘even face’, ‘multiple of three’, and ‘five’ respectively.  Obviously, none of these events A, B, and C occur when the outcome of the experiment is ‘one’ and hence, the set of events A, B, and C are not an exhaustive set where D denotes that at least one of these four events must necessarily occur at every performance of the experiment. 

3. What are dependent events in Bayes' theorem?

Bayes' theorem is an instrument to calculate probability. The probability of one event happening based on another event is called a dependent event. Although there are many examples to explain this, the best one is tossing a coin. When one tosses a coin the probability of getting heads is 0.5 and tells it 0.5 as well. This is because both are the sides of the same coin.  Therefore, the probability of getting heads is dependent on getting tales and the probability of getting tales is dependent on getting heads. 

4. What are independent events?

Independent events are the ones that take place without getting influenced by the probability of other events. These are the events whose probability of happening totally depends upon themselves. Taking the example of tossing two coins, if a person tosses both the coins at the same time, the probability of getting heads or tails on one coin does not depend upon the other. This phenomenon under Bayes' Theorem is regarded as an independent event. 

5. How can Bayes' theorem be used in real life?

Bayes' Theorem has quite a wide sphere of application in real life. It could be used to make predictions about the weather. Most weather scientists do use this theorem to calculate rain, sun or winds. At the same time, the theorem has its application in the field of sports. Football, cricket or basketball, all sports use Bayes' theorem and predict the probability of a team winning the match. Science is another area where Bayes' theorem proves to be very useful.