Skip to content
All apps

Tree diagram & path rules

About this app

Tree diagram as a flow tree: product rule along paths, sum rule in the P(E) bar, reverse the tree for Bayes. Parts, urn, coin, plant, test; fractions, decimals or frequencies, two-way table.

The path rules

A multi-stage random experiment can be drawn as a tree. Each branch carries the conditional probability of the next step. By the multiplication rule, the probability of a path is the product of the branch probabilities along it. By the addition rule, the probability of an event is the sum of the probabilities of its paths. The branches at each node add up to 1, and so do all paths together.

What the app shows

There are five scenarios: urn, workpieces, coin, plant and a medical test, with two or three stages and with or without replacement. Each band in the tree is as wide as the probability of taking that route. A marked event appears on the right as a P(E) bar. Values can be shown as fractions, decimals or frequencies, along with a two-way table and a simulation of n runs.

Bayes and common mistakes

The “Reversed (Bayes)” view puts the stages in the opposite order, so the branches become P(A | B). In the preset test, P(+ | ill) = 90 %, yet P(ill | +) ≈ 48.6 %: fewer than half of those who test positive are ill. Typical errors are adding along a path instead of multiplying, and confusing P(B | A) with P(A | B).

Frequently asked questions

What are the rules for probability tree diagrams?
The multiplication rule: the probability of a path is the product of the probabilities along its branches. The addition rule: the probability of an event is the sum of the probabilities of all paths that belong to it.
What changes when drawing without replacement?
Without replacement, the contents change after each draw, so later probabilities depend on earlier results. With 10 workpieces of which 4 are faulty, the probability of two good ones is 6/10 · 5/9 = 1/3. With replacement it would be 6/10 · 6/10 = 0.36.
Why does a positive test often not mean you are likely ill?
If a disease is rare, many positive results come from false positives among healthy people. P(ill | +) therefore depends strongly on prevalence and can be below 50 % even with high sensitivity. Bayes’ theorem or a reversed tree diagram makes this visible.
What can I do in the app?
You choose a scenario, set probabilities or the contents of the urn, mark events and see the multiplication and addition rules on the tree. A two-way table, a reversed tree for Bayes and a simulation of many runs complete the picture.

Subject: School mathematics (Gymnasium)

More from School mathematics (Gymnasium)

A VisuApp by heyprof: interactive, free in your browser, no sign-up. What is a VisuApp? · All apps