InfyCalculator
➗

Probability Tree Calculator (2 Stages)

Build a two-stage probability tree and get every path probability plus the marginal P(B) — great for with/without-replacement and test-reasoning problems.

Stage 1: P(A)
Stage 2: P(B | A)
Stage 2: P(B | not A)
Loading calculator…

How it works

P(B) = P(A)·P(B|A) + P(¬A)·P(B|¬A) · each leaf = product along its branch

A probability tree multiplies the probabilities along each branch to get the probability of that complete path, and the four leaf paths always add to one. Summing the leaves that end in B gives the marginal P(B) — this is the law of total probability. Trees make with-and-without-replacement and staged-experiment questions concrete because every route to an outcome is drawn out separately.

Worked example

With P(A) = 40%, P(B|A) = 70% and P(B|not A) = 20%: path A→B = 0.40 × 0.70 = 0.28 and path notA→B = 0.60 × 0.20 = 0.12, so P(B) = 0.28 + 0.12 = 0.40 (40%).

Sources: Law of total probability — Wikipedia

Frequently asked questions

Why do the four paths add up to 100%?

Because they are the only possible outcomes of the two stages and they never overlap. Multiplying along branches and summing the leaves always returns the whole probability, one.

How do I get P(A|B) from the tree?

Divide the A→B path by the marginal P(B). In the example, P(A|B) = 0.28 / 0.40 = 70% — which is exactly Bayes’ theorem read off the tree.

Does this handle drawing without replacement?

Yes. Set the stage-2 conditional probabilities to reflect the changed counts after the first draw, and the tree gives the correct joint probabilities.

Related calculators

This calculator is for educational purposes. Double-check important results before acting on them.