What Is Conditional Probability?
Conditional probability measures the likelihood of an event occurring given that another event has already taken place. It is one of the most fundamental concepts in probability theory and is widely used in fields such as machine learning, medical diagnostics, risk assessment, and quality control. The notation P(A|B) is read as "the probability of A given B."
Understanding conditional probability allows us to update our beliefs when new information becomes available. For example, the probability that a patient has a disease changes once we know the result of a diagnostic test. This updating process is at the heart of Bayesian statistics.
The Formula
Where P(A ∩ B) is the joint probability of both A and B occurring, P(B) is the marginal probability of B, and P(A) is the marginal probability of A. The formula requires that P(B) > 0, since we cannot condition on an impossible event.
Bayes' Theorem
Bayes' theorem relates the conditional probability of A given B to the conditional probability of B given A. It is particularly useful when P(B|A) is easier to determine than P(A|B) directly.
| Term | Name | Description |
|---|---|---|
| P(A|B) | Posterior | Updated probability after observing B |
| P(B|A) | Likelihood | Probability of B given A is true |
| P(A) | Prior | Initial probability before evidence |
| P(B) | Evidence | Total probability of the evidence |
Practical Examples
In medical testing, if a disease affects 1% of the population and a test has 95% sensitivity and 5% false positive rate, the probability of actually having the disease given a positive test is much lower than most people expect, due to the base rate effect. In quality control, conditional probability helps assess defect rates when certain machine conditions are known.
Frequently Asked Questions
What is the difference between P(A|B) and P(A and B)?
P(A and B) is the probability that both events occur simultaneously, while P(A|B) is the probability of A occurring when we already know B has occurred. P(A|B) is always at least as large as P(A and B) since dividing by P(B) which is at most 1 increases or maintains the value.
When are events independent?
Two events A and B are independent if P(A|B) = P(A), which equivalently means P(A and B) = P(A) x P(B). Independence means knowing B occurred gives no information about whether A will occur.
Can conditional probability exceed 1?
No. Since P(A and B) can never exceed P(B), the ratio P(A and B)/P(B) is always between 0 and 1. If your calculation gives a value greater than 1, check that your joint probability does not exceed the marginal probabilities.