Probability Tree Calculator

Work a two-stage probability tree through to all four outcomes, the total probability of the second event, and the reverse conditional.

%
%
%
P(B) — B happens either way 31 %
P(B) = P(A)P(B|A) + P(¬A)P(B|¬A) · P(A|B) = P(A)P(B|A) ÷ P(B)
P(A and B) 24 %
P(A and not B) 6 %
P(not A and B) 7 %
P(not A and not B) 63 %
P(A | B) — reverse, by Bayes 77.4194 %
Branches sum to 100 %

Everything you type here is processed on your own device. No input is sent to a server, logged, or stored.

What the Probability Tree Calculator does

This probability tree calculator will work a two-stage probability tree through to all four outcomes, the total probability of the second event, and the reverse conditional. Fill in all 3 fields and the result updates as you type — there is no Calculate button to press and no page reload. It is most often used for working a two-stage probability question with the intermediate values shown. If you need the other side of this job, there is also a exponent rules calculator.

How to use it

  1. Enter the probability of the first event.
  2. Enter the probability of the second event along each branch — given A, and given not A.
  3. Read the four joint outcomes, the total P(B), and the reversed conditional.

How it works

A two-stage tree has four leaves and each one is a product along its path. Multiply down a branch, add across branches: that is the whole method, and the two operations answer different questions. Multiplication gives a joint probability — the chance that this specific sequence occurs. Addition over the branches that end in B gives the total probability of B, which is the law of total probability and the row most people actually want.

The reverse conditional is where trees earn their keep. P(B|A) and P(A|B) are different numbers and confusing them is the base-rate fallacy in its purest form. With A at 30%, B at 80% given A and 10% otherwise, B happens 31% of the time overall — and when it does, A was the cause 77% of the time. Flip the base rate to 3% and the same branch probabilities give P(A|B) of just 20%, with nothing else changed. The branches describe the test; the base rate decides what a result means.

The check row exists because an arithmetic slip in a tree is silent. All four leaves must sum to exactly 100%, since between them they cover every possibility. If the figure above is not 100, a probability has been entered as a proportion rather than a percentage, or a branch has been read off the wrong node. Trees are forgiving of mistakes right up until the moment the answer is wrong, which is why the sum is worth a glance.

When to use it

  • Working a two-stage probability question with the intermediate values shown.
  • Seeing how a base rate changes what a positive result means.
  • Checking a tree you drew by hand against the arithmetic.
  • Working out the reverse conditional without rearranging Bayes by hand.

Common mistakes to avoid

  • Adding along a branch instead of multiplying. Down the branch is multiplication; across branches is addition.
  • Reading P(B|A) as P(A|B). They are different numbers and usually very different.
  • Entering a probability as 0.3 when the field wants a percentage.
  • Forgetting that the second-stage probabilities differ between branches. If they are the same, the events are independent and the tree is not telling you anything.

Frequently asked questions

What is the law of total probability?

P(B) = P(A)P(B|A) + P(¬A)P(B|¬A). It adds the probability of B along every route that reaches it, which is why the tree branches are summed.

Why is P(A|B) so different from P(B|A)?

Because the base rate P(A) weights them differently. A rare A makes P(A|B) small even when P(B|A) is high — which is exactly why a very accurate test for a rare condition still produces mostly false positives.

What if the two events are independent?

Then P(B|A) equals P(B|¬A), all the branch arithmetic collapses, and P(A and B) is simply P(A)P(B). The tree still works; it just has nothing extra to say.

Why does the check row matter?

The four leaves cover everything, so they must sum to 100%. Anything else means a value was mistyped or read from the wrong node.

Related tools

See all math & statistics calculators →