Compound Probability Calculator (AND / OR)
Compute P(A and B), P(A or B), and P(A|B) for two events, whether they are independent or dependent.
Result
- P(A)0.5
- P(B)0.4
- P(A and B) — intersection0.200000
- P(A or B) — union0.700000
- P(A | B)0.500000
- P(B | A)0.400000
- Independent?yes (assumed)
Step-by-step
- Independent → P(A∩B) = P(A)·P(B) = 0.5 × 0.4 = 0.200000.
- P(A∪B) = P(A) + P(B) − P(A∩B) = 0.5 + 0.4 − 0.200000 = 0.700000.
- P(A|B) = P(A∩B) ÷ P(B) = 0.200000 ÷ 0.4 = 0.500000.
How to use this calculator
- Enter the individual probabilities P(A) and P(B), each between 0 and 1.
- Choose whether the events are independent or dependent.
- For dependent events, enter the joint probability P(A and B).
- Read P(A and B), P(A or B), and the conditional probabilities.
About this calculator
Compound probability deals with how two events combine. The "AND" probability, P(A and B), is the chance both happen; for independent events — where one has no effect on the other, like two separate coin flips — it is simply the product P(A)·P(B). The "OR" probability, P(A or B), is the chance at least one happens, found by adding the individual probabilities and subtracting the overlap so it is not double-counted: P(A) + P(B) − P(A and B). The conditional probability P(A|B) is the chance of A given that B has occurred, equal to the joint probability divided by P(B). This calculator handles both independent events (where it computes the joint probability for you) and dependent events (where you supply the joint probability), and reports all the combinations along with a check of whether the events are actually independent.
How it works — the formula
Independent: P(A∩B) = P(A)·P(B)
P(A∪B) = P(A) + P(B) − P(A∩B)
P(A|B) = P(A∩B) ÷ P(B)The union adds the two probabilities and removes the double-counted overlap; the conditional renormalizes the joint probability by the probability of the conditioning event.
Worked examples
- Inputs:
- pa=0.5, pb=0.4, mode=independent
- Output:
- AND 0.2, OR 0.7, P(A|B) 0.5
- Inputs:
- pa=0.5, pb=0.5, mode=independent
- Output:
- AND 0.25, OR 0.75
- Inputs:
- pa=0.5, pb=0.4, mode=dependent, pand=0.3
- Output:
- OR 0.6, P(A|B) 0.75
Limitations
- Dependent mode requires a valid joint probability you supply.
- Assumes well-defined probabilities in [0, 1].
- Does not handle more than two events at once.
Results follow from the probability axioms given consistent inputs.