Probability Tree Diagram Maker
Generate a 2-stage tree first, then this tab shows the full Bayes' theorem calculation — prior probabilities, likelihoods, joint probabilities, marginal P(B), and posterior P(A|B) for every combination.
Probability Tree Examples
Click any example to load it into the builder above
What Is a Probability Tree Diagram?
A probability tree diagram is a visual tool that maps out all possible outcomes of a multi-stage experiment, showing each outcome as a branch with its associated probability. Starting from a single root, branches split at each stage to show every possible outcome. The probability of any complete sequence of outcomes (a path through the tree) is found by multiplying the branch probabilities along that path — this is the multiplication rule of probability.
Tree diagrams are especially powerful for conditional probability problems, where the probability of a second-stage outcome depends on what happened in the first stage. They provide a systematic way to enumerate all possibilities, ensuring no outcomes are missed and that probabilities are correctly applied at each decision point.
The Multiplication Rule (Along Branches)
Bayes' Theorem from a Tree Diagram
A two-stage probability tree naturally implements Bayes' theorem. After building the tree, you can "reverse" the conditioning: given that a second-stage outcome B occurred, what is the probability that it came from first-stage branch A? The answer is P(A|B) = P(A ∩ B) / P(B), where P(B) = Σ P(Aᵢ ∩ B) is found by summing all paths that end in B. This is the Law of Total Probability combined with Bayes' theorem.
Classic Applications
| Application | Stage 1 | Stage 2 | Key question |
|---|---|---|---|
| Medical diagnosis | Disease / No disease | Test positive / negative | P(disease | positive test) — Bayes' theorem |
| Quality control | Machine A / B / C | Defective / Non-defective | P(machine A | defective item) — source tracing |
| Coin/die experiments | First flip/roll | Second flip/roll | P(HH), P(at least one H) |
| Weather forecasting | Forecast: Rain / No rain | Actual: Rain / No rain | P(forecast correct | actual rain) |
| Genetics | Parent 1 allele | Parent 2 allele | P(offspring genotype) |
Related Topics
Sources & further reading:
- NIST Engineering Statistics Handbook — Probability and Bayes' Theorem
- Bayes, T. (1763). An Essay Towards Solving a Problem in the Doctrine of Chances. Philosophical Transactions of the Royal Society.
- Khan Academy — Probability Library
Frequently Asked Questions
Start at the root (left side). At each node, the outgoing branches show possible outcomes labeled with their probabilities — which must sum to 1. Follow any path from root to end node, multiplying all branch probabilities along the way, to get the joint probability of that sequence. The list of all end-node joint probabilities gives the complete probability distribution of the experiment.
At every level: (1) the branches leaving each node must sum to 1 — they represent all possible outcomes given that you reached that node; and (2) all the end-node joint probabilities must sum to 1 — they cover the entire sample space. If either check fails, at least one branch probability is wrong. This tool automatically validates both conditions and warns you if they're violated.
In a two-stage tree, the first stage gives prior probabilities P(A), and the second stage gives likelihoods P(B|A). Multiplying gives joint probabilities P(A ∩ B). Summing all paths to outcome B gives P(B) — the marginal probability. Dividing any joint probability by P(B) gives the posterior P(A|B) = P(A ∩ B)/P(B). This is Bayes' theorem applied visually. The Bayes' table in the results shows all these values automatically.
For independent events, the second-stage branch probabilities are the same regardless of which first-stage branch was taken — for example, two coin flips always have P(H) = P(T) = 0.5 at every node. For dependent (conditional) events, the second-stage probabilities differ depending on the first-stage outcome — for example, drawing two balls without replacement: the second draw probabilities depend on what was drawn first.
Find all paths whose outcome includes A or B (or both), then sum their joint probabilities. For example, to find P(at least one Head in two flips), sum the joint probabilities of HH, HT, and TH paths: 0.25 + 0.25 + 0.25 = 0.75. This works because the paths are mutually exclusive events — they can't happen simultaneously — so probabilities add directly.