Bayes’ Theorem: Likelihood, Prior, Posterior and Evidence

Priyanka Dey
3 min readDec 23, 2020

Bayes’ Theorem is a mathematical formula based on conditional probability. In conditional probability, the occurrence of one event has a relationship with some other events.

For example, 2 coins are flipped. What is the probability that a Tail is flipped given that the 1st coin was a Head?

While flipping two coins 4 outcome will come : {HH,TT,TH,HT}. As 1st coin was a Head, 2 outcomes will be considered: {HH, HT}.

Outcome of P(2nd coin = Tail) = {HT} = 1. Outcome of P(1st coin = Head) = {HH, HT} = 2. So Probability is 1/2 = .5.

The formula of Bayes’ Theorem :

P(A|B) = Posterior. P(B|A) = Likelihood. P(A) = Prior. P(B) = Evidence.

Likelihood: The likelihood of any event can be calculated based on different parameters. For example in cricket after winning the toss probability to choose to bat is .5. But if you consider the likelihood to choose batting, pitch condition, weather, and other parameters are required to consider. If the pitch is dry and the weather is sunny, the likelihood to elect to bat is more than 90%. So probability can be calculated straightforwardly. But the likelihood is calculated based on different parameters.

Prior: Prior means information regarding observation about the object in prior which helps to calculate posterior. In further observation calculated posterior will act as prior.

Evidence: Evidence means the existence of the object used in the event is already present.

Posterior: Posterior means post or after observation gets to know about the object.

Example: Suppose we have 5 blue cups and 3 blue plates. We want to know if we pick any blue object between cup and plate, what the probability is if it is a cup?

So according to Bayes’ theorem probability to get a blue cup is:

P(cup|blue object) = P(blue object | cup) P(cup) / p(blue object)

Posterior: After the posterior, we come to know if the cup is picked.

Likelihood: Here it means when it’s a cup, what the chance will be if it is also a cup.

Prior: We have an observation in prior that we have 5 blue cups. So in the posterior, we need to observe if you pick a cup.

Evidence: It is already known we have 8 blue objects. So it is evidence.

--

--