If you are not following the conversation series the previous post, please referred the below link.

Part-1 Link:

Part-2 Link:

#
**Bayes’ Theorem Part-3 – Explanation**

Image Credit: (https://luminousmen.com/post/data-science-bayes-theorem)

Above image **we’ve** two overlapped events A and B. It can be, **for instance** A — **i buy** wet today, B — **it’ll** be rainy today. In **a method** or another, many events are **associated with one another** , as in our example. Let’s calculate the probability of A **as long as** B has already happened.

Since B **went on** , the part which now matters for A **is that the** shaded part which is interestingly A ∩ B. So, the probability of A given B **seems** to be:

Therefore, we can write the formula for event B given A has already occurred by:

OR

Now, the second equation can be rewritten as:

Where:

- P(A|B) — the probability of event A occurring, given event B has occurred.
- P(B|A) — the probability of event B occurring, given event A has occurred.
- P(A) — the probability of event A.
- P(B) — the probability of event B.