Formula & Calculator
Conditional Probability
Calculates the probability of event A occurring given that event B has already occurred.
Interpretation
P(A|B) = P(A∩B)/P(B). Probability of event A given that B has occurred. Used in Bayesian inference, medical diagnosis, and machine learning.
Variables
| Symbol | Quantity | Unit |
|---|---|---|
| P(A|B) | Probability of A given B | |
| P(A∩B) | Probability of both A and B occurring | |
| P(B) | Probability of B occurring |
What it means
Conditional probability quantifies the likelihood of an event A occurring given that another event B has already occurred. It is the ratio of the joint probability of both events to the probability of B. It is central to Bayesian statistics and to many areas of probability and statistics. It is used in diagnostic testing (probability of disease given a positive test), in machine learning (Naïve Bayes), and in decision analysis. Understanding conditional probability is essential for updating beliefs based on evidence and for interpreting dependence between events. It also forms the basis for independence (P(A|B) = P(A)).
Worked example
Conditional Probability – Two Examples
Real‑World| Parameter | Value |
|---|---|
| P(A∩B) | 0.12 |
| P(B) | 0.3 |
| Parameter | Value |
|---|---|
| P(A∩B) | 0.3 |
| P(B) | 0.6 |
Common mistakes
- Conditional probability: The probability of A given B has occurred.
- Denominator P(B): Must be > 0 – otherwise undefined.
- Joint probability: P(A∩B) is the probability of both A and B occurring.
- Independence: If A and B are independent, P(A|B)=P(A).
- Bayes’ theorem: This is the basis for Bayes’ theorem.
Applications
Conditional probability, P(A|B) = P(A∩B)/P(B), gives the probability of event A occurring given that event B has already occurred. This is the foundation of Bayesian inference and is used in many fields. Engineers use it in reliability (probability of system failure given component failure), in signal processing (detection given noise), and in medical diagnostics (disease given a positive test). By understanding conditional probability, professionals can update beliefs in light of new evidence, design better diagnostic tests, and improve decision‑making. This concept is also key to understanding independence and causal relationships. Mastering conditional probability is essential for any work involving uncertainty and data.
- Diagnostic testing – positive predictive value, sensitivity, specificity
- Reliability analysis – system failure given component failure
- Signal detection – probability of signal given observation
- Risk assessment – probability of event given a condition
- Machine learning – naive Bayes and probabilistic inference
Frequently Asked Questions
P(A|B) = P(A∩B) / P(B), provided P(B) > 0. It is the probability of event A given that event B has occurred.
They are different in general. P(A|B) is the probability of A given B; P(B|A) is the probability of B given A. Bayes' theorem relates them.
For multiple events, P(A∩B∩C) = P(A) · P(B|A) · P(C|A∩B). This is a fundamental rule for joint probabilities.
Two events A and B are independent if P(A|B) = P(A) (or equivalently P(A∩B) = P(A)P(B)). Independence means knowing B does not change the probability of A.
It is used to compute sensitivity (P(positive | disease)) and specificity (P(negative | no disease)). These are then used in Bayes' theorem to find predictive values.
If events B₁, B₂, … form a partition, then P(A) = Σ P(A|Bᵢ) · P(Bᵢ). This is often used to compute marginal probabilities.
Joint P(A∩B) is the probability both occur. Conditional P(A|B) is the probability of A given B already occurred. They are related: P(A∩B) = P(A|B)P(B).
From a table, P(A|B) = (cell count for A and B) / (row or column total for B), depending on which is conditioned.
In the Monty Hall problem, the host's action provides information that changes the conditional probabilities. Switching doors gives a 2/3 chance of winning, as shown by conditional probability updates.
Bayesian networks use conditional probability distributions to represent dependencies among variables. They allow efficient inference using the chain rule and conditional independence.