# Let’s begin today’s session again with a fun fact about probability and statistics:

“Flipping a coin repeatedly rarely comes out evenly.

In 100 flips, there’s less than 8% chance that you’ll have 50 Heads and 50 Tails.”

Amazing isn’t it?

**Let’s focus on what we will learn today. So, the objective for today is to continue what we have left yesterday:**

Where does the conditional probability formula come from?

Bayes Theorem

**Let’s begin now,**

**Where does the Conditional Probability formula come from?**

The formula for conditional probability is derived from the probability multiplication rule, P(A and B) = P(A)*P(B|A).

Step by step, here’s how to derive the conditional probability equation from the multiplication rule:

**Step 1:** Write down the multiplication rule:

P (A and B) = P(A)*P(B|A)

**Step 2:** Divide both sides of the equation by P(A):

P (A and B)/ P(A) = P(A)*P(B|A)// P(A)

**Step 3:** Cancel P(A)on the right side of the equation:

P (A and B)/P(A) = P(B|A)

**Step 4:** Rewrite the equation:

P(B|A) = P (A and B)/P(A)

** **

** ** 2.** Bayes theorem**

Bayes theorem is a formula that describes how to update the probabilities of hypothesis when given evidence.
It is based on the conditional probability but can be used to powerfully reason about a wide range of problems involving belief updates.
The formula for Bayes theorem is:
**P(A|B) = P(A)*P(B|A)/P(B)**

Where,

P(A|B) is how often A happens given that B happens.

P(B|A) is how often B happens given that A happens.

P(A) is how likely A is on its own

And P(B) is how likely B is on its own

Let’s discuss an Example to learn the mathematical purpose of Bayes Theorem:

There are 100 people at a party, and we are examining how many wear blacks or not, and if a man or not, and get these numbers:

The probability of being a man is P(Man) = 40/100

The probability of wearing black is P(Black) = 25/100

The probability that a man wears black is P(Black|Man) = 5/40

So, here we have to find the probability that a person wearing black is a man i.e. P(Man|Black)

P(Man|Black) = P(Man)*P(Black|Man)/P(Black)

=0.4*0.125/0.25

=0.2

**Please note** that it is a very basic example of Bayes theorem, it is used for many complicated tasks and given tremendous results with accuracy.

Let’s test what you’ve learned :-

Written by Vivek Mittal ( Graduate in B.com (hons) from University of Delhi and 2 Actuarial Papers passed from IFOA )