Conditional Probability Calculator
Calculate P(A | B) — the probability of event A given that event B has occurred.
How it works
- 1Enter P(A ∩ B), the probability that both A and B occur together (a value between 0 and 1).
- 2Enter P(B), the probability that event B occurs. It must be greater than 0.
- 3The calculator applies the formula P(A | B) = P(A ∩ B) ÷ P(B) and displays the result to four decimal places.
Use cases
- Medical testing: find the probability a patient has a disease given a positive test result.
- Risk analysis: determine the likelihood of a failure given that a precursor event has been observed.
- Machine learning: compute posterior class probabilities in Naïve Bayes classifiers.
Frequently asked questions
What is conditional probability?
Conditional probability P(A | B) is the probability that event A occurs given that event B has already occurred. It equals the joint probability P(A ∩ B) divided by P(B), and is only defined when P(B) > 0.
Why does P(B) need to be greater than zero?
Dividing by zero is undefined. If P(B) = 0, event B can never happen, so conditioning on it has no mathematical meaning.
How is conditional probability related to Bayes’ theorem?
Bayes’ theorem rearranges the conditional probability formula: P(A | B) = P(B | A) × P(A) ÷ P(B). It is used to update a prior belief about A after observing evidence B.
Related tools
See all →Calculate the area and perimeter of a rectangle from its width and height, with a labeled diagram.
Calculate the area and circumference of a circle from its radius, with a labeled diagram.
Calculate the area (Heron’s formula) and perimeter of a triangle from its three sides.
Calculate the area and perimeter of a trapezoid from its two parallel sides, height, and legs.