Home / 🚀 Probability Theory & Odds/ Conditional Probability Calculator

Conditional Probability Calculator

Print Page
Intersection: must be ≤ P(A) and ≤ P(B)
Reset Form
Probability Outcomes
Conditional Probability: P(A|B)
-
Conditional P(B|A): -
Union P(A ∪ B): -
Independence Status: -
A B A ∩ B
Mathematical Formula Steps
Insert inputs.

A Conditional Probability Calculator (also known as a P(A|B) Calculator, Given Probability Calculator, Bayesian Conditional Odds Utility, or 2×2 Contingency Table Analyzer) calculates the probability of event A occurring given that event B has already occurred (P(A | B) = P(A ∩ B) ÷ P(B)). Whether you are evaluating medical diagnostic test accuracy (positive predictive value PPV), analyzing corporate hiring test filters, evaluating machine learning Naive Bayes classification algorithms, or testing for statistical independence between two events, a conditional probability calculator provides instant, exact mathematical results.

Conditional probability updates our prior expectations based on new evidence. When event B is known to have happened, the total sample space shrinks from all possible outcomes down strictly to the subset where B occurs.

Our free online Conditional Probability Calculator provides instant calculations across all standard conditional formats:

  • Standard Conditional Probability Formula: P(A | B) = P(A ∩ B) ÷ P(B) (where P(B) > 0).
  • Reverse Conditional Probability Formula: P(B | A) = P(A ∩ B) ÷ P(A) (where P(A) > 0).
  • Multiplication Rule for Joint Probability: P(A ∩ B) = P(A | B) · P(B) = P(B | A) · P(A).
  • Test for Statistical Independence: Events A and B are independent if and only if P(A | B) = P(A) or P(A ∩ B) = P(A) · P(B).

Master 2×2 Contingency Table Conditional Probability Matrix

The table below displays the general structure of a 2×2 contingency table, showing count intersections, marginal totals, and conditional probability calculations for events A and B:

Event Category Event B Occurs (B) Event B Does NOT Occur (Bc) Marginal Total for Event A Conditional Probability P(A | Category)
Event A Occurs (A) Joint Intersection (A ∩ B) Joint Intersection (A ∩ Bc) Total P(A) P(A | B) = P(A ∩ B) ÷ P(B)
Event A Does NOT Occur (Ac) Joint Intersection (Ac ∩ B) Joint Intersection (Ac ∩ Bc) Total P(Ac) P(Ac | B) = P(Ac ∩ B) ÷ P(B)
Marginal Total for Event B Total P(B) Total P(Bc) Grand Total = 1.0 (100%) P(A | B) + P(Ac | B) = 1.0

Step-by-Step Medical Screening & Corporate Testing Example

To calculate the conditional probability that a patient actually has a disease given a positive medical test result, for a population with 1.0% disease prevalence (P(D) = 0.01), 95.0% test sensitivity (P(T+ | D) = 0.95), and 5.0% false positive rate (P(T+ | Dc) = 0.05):

Step 1 (Calculate True Positive Intersection): P(D ∩ T+) = P(T+ | D) · P(D) = 0.95 × 0.01 = 0.0095 (0.95% of population)

Step 2 (Calculate False Positive Intersection): P(Dc ∩ T+) = P(T+ | Dc) · P(Dc) = 0.05 × 0.99 = 0.0495 (4.95% of population)

Step 3 (Calculate Total Positive Test Rate P(T+)): P(T+) = 0.0095 + 0.0495 = 0.0590 (5.90% total positive tests)

Step 4 (Calculate Conditional Probability P(D | T+)): P(D | T+) = P(D ∩ T+) ÷ P(T+) = 0.0095 ÷ 0.0590 = 0.161017 ≈ 16.10%

Thus, even with a 95% accurate test, because the disease is rare (1%), a patient with a positive test result has only a 16.10% conditional probability of actually having the disease.


Testing for Statistical Independence vs. Dependence

Below is a comparative reference chart detailing how to determine whether two events A and B are statistically independent or dependent:

Statistical Condition Independent Events (No Influence) Dependent Events (Influenced by B)
Conditional Probability P(A | B) P(A | B) = P(A) P(A | B) ≠ P(A)
Joint Intersection P(A ∩ B) P(A ∩ B) = P(A) · P(B) P(A ∩ B) = P(A | B) · P(B)
Reverse Conditional P(B | A) P(B | A) = P(B) P(B | A) ≠ P(B)

History & Mathematics: 1763 Thomas Bayes to 1933 Andrey Kolmogorov

1763 Thomas Bayes & Inverse Conditional Probability

Formulated by English statistician Reverend Thomas Bayes and published posthumously by Richard Price in 1763, Bayes’ Theorem introduced inverse conditional probability: calculating P(Cause | Effect) from known prior probabilities and likelihoods P(Effect | Cause).

1933 Andrey Kolmogorov Axiomatic Foundation

In 1933, Soviet mathematician Andrey Kolmogorov published Grundbegriffe der Wahrscheinlichkeitsrechnung, establishing modern axiomatic probability. Kolmogorov defined conditional probability strictly as a mathematical ratio of measure: P(A | B) = P(A ∩ B) ÷ P(B).


Popular direct tools:


Frequently Asked Questions (FAQ)

What does P(A|B) mean in probability?

P(A | B) reads “the probability of event A given event B”. It represents the probability that event A occurs under the condition that event B has already taken place.

How do you calculate P(A|B) from a 2×2 contingency table?

Divide the joint intersection count where both A and B occur (A ∩ B) by the total count for event B: P(A | B) = Count(A ∩ B) ÷ Count(B).

What is the difference between P(A ∩ B) and P(A|B)?

P(A ∩ B) is the joint probability that BOTH A and B occur simultaneously out of the ENTIRE sample space. P(A | B) is the conditional probability that A occurs given that B has already occurred (out of the reduced B sample space).