Goseeko blog

What Is Bayes Theorem?

by Team Goseeko

The Bayes theorem was developed by the British mathematician Thomas Bayes. The theorem deals with conditional probability. it has many applications in various fields such as medical sciences, mathematical sciences, computer science, machine learning, AI, etc.

Conditional probability

Let A and B are two events in a sample space S and P(B) ≠ 0. then the probability that an event A occurs once B has occurred or the conditional probability of A given B which is defined as-

Note- If two events A and B are independent then-

Bayes theorem

The theorem describes the probability of an event, which is based on prior knowledge conditions related to the events.

The formula of Bayes theorem is defined as-

This theorem can also be stated as below-

Let and E1 and E2 be mutually exclusive events forming a portion of the sample space S and let E be any event of the sample space such that P(E) ≠ 0.

Then-

Let’s understands the theorem by the following example[Based on false positive and false negative phenomena]-

Suppose if a person has COVID-19 like symptoms(fever, dry cough, difficulty breathing), there is a RT-PCR test to check whether the person is infected with the Virus or not, but this test is not always right

  1. For people who are covid-19 positive, the test says “yes” 80 percent of the time.
  2. For people who don’t have covid-19, the test says “yes” 10 percent of the time which is false positive.   

Now if 1 percent of the population has COVID-19, and the test says yes, then what is the chance that a person really has the disease?

Here we need to know the chances of having COVID-19, when the test says “yes”,

By using the formula-

Here 

P(COVID-19) = 1%

P(yes/COVID-19)= 80%

P(yes) = ?

Now- 1% have the disease and test says “yes” to 80% of them 

And 99% don’t have the disease and test says yes to 10%, so that-

Then-

P(yes) = 1%×80%+99%×10%) which gives – 10.7 %

This shows that 10.7% will get “yes”

Now by using the formula-

So that-

P(COVID-19/yes) is approximately 7%.

Example: An urn I contains 3 white and 4 red balls and an urn II contains 5 white and6 red balls. one ball is drawn at random from one of the urns and is found to be white. 

Find the probability that it was drawn from urn I.

Solution-

Let 

E1=  the ball is drawn from first urn

E2=  the ball is drawn from second urn

E=  the ball is white

Now we have to find-

P(E1/ E)

So that by using Bayes theorem, we get-

Here,

Two urns are equally likely to select,

P(E1 )=P(E2)=1/2

P(E/E1)=P(a white ball is drawn from urn I=3/7

P(E/E2)=P(a white ball is drawn from urn II=5/11

so that

Interested in learning about similar topics? Here are a few hand-picked blogs for you!

You may also like