Tree diagrams for multi-stage probability
A tree diagram is one of the clearest ways to organize a probability problem when an experiment happens in stages.
Each split in the tree represents the possible outcomes at a stage, and each branch is labeled with a probability.
The key idea is that branches after an outcome are usually conditional: they describe probabilities given what already happened.
If the first stage produces outcome \(A\), then the next-stage branch might be labeled \(P(B\mid A)\), not just \(P(B)\).
Multiply along a path
Every complete route from the root to an end node (a leaf) is called a path.
To compute the probability of that full sequence, you multiply the probabilities on its branches:
\[
\begin{aligned}
P(\text{path}) &= \prod_{\text{branches on the path}} P(\text{child}\mid\text{parent}).
\end{aligned}
\]
This rule is the same as repeatedly applying the multiplication rule
\(P(A\cap B)=P(A)\,P(B\mid A)\) to multiple stages.
For example, for “coin then die parity”, one path is “Head then Even”. If \(P(\text{Head})=0.5\) and
\(P(\text{Even}\mid\text{Head})=0.5\), then
\[
\begin{aligned}
P(\text{Head}\cap\text{Even}) &= P(\text{Head})\cdot P(\text{Even}\mid\text{Head}) \\
&= 0.5\cdot 0.5 = 0.25.
\end{aligned}
\]
Sum over end nodes to get totals
Once you know the probability of each leaf path, you can compute the probability of a broader event by summing the leaves that match it.
For instance, the event “Even” includes the two leaves “Head→Even” and “Tail→Even”, so
\[
\begin{aligned}
P(\text{Even}) &= P(\text{Head}\cap\text{Even}) + P(\text{Tail}\cap\text{Even}).
\end{aligned}
\]
This is the same logic behind the law of total probability: when branches form a partition of the sample space,
adding disjoint leaf paths gives the probability of the union.
Consistency checks and optional normalization
In a complete probability tree, the outgoing probabilities from any internal node should add up to 1:
\[
\sum_{\text{children}} P(\text{child}\mid\text{node}) = 1.
\]
If they do not, it usually means the tree is incomplete (missing outcomes) or the numbers were entered incorrectly.
This tool can either (1) strictly report the mismatch or (2) optionally normalize outgoing probabilities per node by scaling them so they sum to 1.
Normalization can be useful when you entered unscaled weights, but you should still interpret it carefully: it changes the model.
How to use this tool
Enter branches one per line using the form “Parent → Child = probability” (CSV format is also accepted).
Click Calculate to list every leaf path and its probability, plus the total sum of leaf probabilities.
If you want an event probability, use the selector to sum matching leaves in different ways — for example:
(1) leaf name contains a word like “Even”, (2) leaf name equals an exact label,
(3) path contains a text pattern like “Head>Even”, or (4) an exact leaf list (comma-separated).
The interactive canvas draws the tree and a leaf-probability bar view; you can pan/zoom for readability and press Play to animate how probability “flows” through the branches.
As an advanced note, infinite trees appear in university topics like Markov chains and branching processes, where paths can continue indefinitely; the same multiply-and-sum principles extend using limits and convergence ideas.