Module 7 — Bayes Theorem

A.I HUB
2 min readAug 7, 2023

--

Image by Author

In this article, we will walk you through the core concept of Bayes theorem in stats and along with the theoretical knowledge, we also have a glance and build the pillar of Bayes theorem in our brain. Let’s Dive In !

Besides P(A|B) there is another conditional probability related to the event: the probability of occurrence of event B given A has already occurred P(B|A). Baye’s theorem
converts one conditional probability to the other conditional probability.

P(A⋂B) = P(A|B) P(B)

and P(A⋂B) = P(B|A) P(A).

Equating these two equations, we get P(B|A)= [ P(A|B) P(B) ] /(P(A).

For the events A and B, P(B|A) = (0.66)(0.3)/0.4
= 0.495 = 49.5%.

Recall that we have calculated P(A|B) = 0.66 = 66.6%. It is evident from this example that generally P(A|B) is not equal to P(B|A).

The Bayes’ theorem is usually used when we have access to the data and we want to find out some unknown parameters from the data. Suppose event A represents the data and event B represents some unknown parameter to be estimated from the data. We can interpret the probabilities used in the Bayes’ theorem.

  • P(B): the probability of event B sometimes referred to

    as an unknown parameter or a hypothesis, regardless

    of the data. This is known as the prior probability of B
    or the unconditional probability.
  • P(A): the probability of the data regardless of the event B. This is known as evidence.
  • P(A|B): the probability of data A given that the hypothesis or the assumed parameter B is true. This is known as the likelihood of data A conditional on

    hypothesis B.
  • P(B|A): the probability of event B given the data A. This

    is known as the posterior probability. Usually we are

    interested to find this probability.

It is important to realize that if one of the conditional probabilities is used as a likelihood function, the other conditional probability will be the posterior. Using P(B|A) as

the likelihood will make P(A|B) a posterior.

Conclusion

When we talk casually about data science, machine learning and artificial intelligence, than we always get in touch with statistics because its all end up in data and we know that data is everywhere in world in a very large volume so that we perform those useful and interesting data patterns that actually told us about the customer buying patterns and other important things. Whenever we discuss stats, Bayes Theorem is a very important concept in that for understanding the data from three angles or corners and in different domains valuable data is value adding stuff for your business. In this step by step guide, we will explore the Bayes theorem in statistics and have better taste of learning as well.

--

--

A.I HUB

A.I HUB is a learning platform, where you can learn from all sorts of courses for free we help individuals and youngster by providing quality content.