Advanced Probability

Naive Bayes theorem

Bayes theorem is the big result of Bayesian inference. Let’s see how it even comes about. Recall that we previously defined the following:

  • P(A) = The probability that event A occurs
  • P(A|B) = The probability that A occurs, given that B occurred
  • P(A, B) = The probability that A and B occurs
  • P(A, B) = P(A) * P(B|A)

How Naive Bayes Theorem Works?

Let’s understand it using an example. Below I have a training data set of weather and corresponding target variable ‘Play’ (suggesting possibilities of playing). Now, we need to classify whether players will play or not based on weather conditions. Let’s follow the below steps to perform it.



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Desi Ratna Ningsih

Desi Ratna Ningsih

Data Science Enthusiast, Remote Worker, Course Trainer, Archery Coach, Psychology and Philosophy Student