# Data Science concepts in 5 minutes: Probability, Statistics and Bayes’ theorem.

In this quick post I go through how Bayes’ theorem uses conditional probability and statistic to evaluate the probability of an event based on prior knowledge and conditions that might be relevant to that event. Many modern machine learning techniques rely on this formula so I have sprinkled links to other sources through out the post. Highly encourage you to check these links out as they’re great explanations of complex ideas — some are even interactive!

This quick 5 mins read will break down key concepts and show a quick example of how it works in practice!

# Statistics

..and as I write this, if there was any one sentence that explained machine learning modeling better, it was that haha.

# Probability & Statistics = the foundation of Data Science

From this point on we will be focusing on conditional probability, and how we can use it in a formula.

# Bayes’ theorem

Let’s first take a look at the equation for the Bayes’ Theorem:

With this equation we can then isolate the variable we want to solve for and get to work!

In the case of a spam filter, it would look something like this:

Chris I has a phenomenal article on this that you can check out here.

I will admit that the first time you try to solve this equation it’s a bit of a mind bender, but just like any problem in life, if you break it into smaller pieces and keep-at-it you’re bound to solve it — and it will get easier every time!