Conditional Probability and Bayes Theorem
In this lesson, we will discuss Conditional Probability and Bayes Theorem
We'll cover the following
Conditional probability
The probability of an event B occurring when an event A has occurred is called conditional probability. It is denoted as P(B|A), and it is read as “The probability that B occurs given A has occurred”.
It is calculated using the formula below.
P(B | A) = P (A B) / P(A) given P(A) > 0
Here, P(A) is the probability of A and P(A B) is the joint probability of A and B.
Example
A math teacher gave her class two tests. 25% of the class passed both tests and 45% of the class passed the first test. What percent of those who passed the first test also passed the second test?
Solution
From the above question, we can deduce the following:
-
Let A be the event that each class passed the first test. Then P(A) = 0.45
-
Let B be the event that each class passed the second test.
-
The joint probability that each class passed both tests is P(A B) = 0.25.
-
P(B | A) = ?
P(B | A) = P (A B) / P(A) = 0.25 / 0.45 = 0.60 = 60% of the class who passed the first class also passed the second class.
Bayes’ theorem
On Wikipedia, Bayes Theorem is defined as:
“Bayes’ theorem (alternatively Bayes’ law or Bayes’ rule) describes the probability of an event, based on prior knowledge of conditions that might be related to the event.”
Bayes’ theorem is stated as seen below.
-
is the conditional probability of given has occurred. It is called the Posterior Probability.
-
is the conditional probability of given has occurred. It is called the Likelihood.
-
is the probability of . It is called the Prior Probability.
-
is the probability of . It is called the Evidence.
Get hands-on with 1400+ tech skills courses.