Welcome back to Tree Diagrams and Decisions! This is the fourth and final lesson of the course, and you are about to complete your tree-diagram toolkit. In the first three lessons, we built tree diagrams, assigned probabilities to every branch, and multiplied along individual paths to find the probability of a specific outcome sequence. That single-path skill is powerful, but most real-world questions are broader than "What is the chance of this exact sequence?" They sound more like "What is the overall chance the projector works?" or "What is the probability of drawing exactly one red marble?" In this lesson, we will learn how to combine multiple paths to find the total probability of a result.
When a Result Has More Than One Path
In the previous lesson, we computed all four path probabilities for the outdoor movie night example. Suppose someone now asks, "What is the overall probability that the projector works?" Two paths end with that result — Clear → Works and Cloudy → Works — so the answer does not live on a single path. It is spread across every path that ends with "Works."
This pattern comes up constantly. Questions phrased as "exactly one red marble," "at least one delay," or "the customer's issue gets resolved" rarely map to a single path. Instead, several different sequences of outcomes can all produce the same final result. To answer these questions, we need a way to combine the contributions of every qualifying path.
The Identify-Multiply-Add Process
Two-Stage Independent Example: Movie Night Revisited
Two-Stage Dependent Example: Mixed Marble Draw
Extending to Three Stages
Why Addition Works
Conclusion and Next Steps
In this lesson, we learned the identify-multiply-add process for finding the total probability of a result that spans more than one path in a tree diagram. The three steps are always the same: find every path that leads to the target result, multiply along each path, and add those path probabilities together. This works for independent and dependent stages alike, and it scales to trees of any size.
You now have the complete tree-diagram toolkit — building diagrams, labeling branches, computing single-path probabilities, and combining paths for total probabilities. The practice exercises ahead will challenge you with coin flips, commute delays, customer-support workflows, and subscription-box selections, each one a chance to sharpen the identify-multiply-add process until it becomes second nature.
Be a part of our community of 1M+ users who develop and demonstrate their skills on CodeSignal
Here is the key insight: each path through a tree represents a unique outcome sequence, so no two paths can happen at the same time. The paths are mutually exclusive. As you may recall from an earlier course on combining events, the probability of one or another mutually exclusive outcome is simply the sum of their individual probabilities. Applied to a tree, this gives us the total probability rule:
P(result)=P(path1)+P(path2)+⋯
where each path listed is one that produces the result of interest. In practice, the process has three steps:
Identify every path through the tree that produces the target result.
Multiply along each of those paths to get its individual probability.
Add the path probabilities together.
We will call this the identify-multiply-add process. It works the same way whether stages are independent or dependent, and for trees of any size.
Let us put the process to work with the movie night scenario. Clear skies have probability 0.6 (cloudy 0.4), and the projector works with probability 0.9 regardless of the weather. Here are the four path probabilities from the previous lesson:
Path
Probability
Clear → Works
0.54
Clear → Fails
0.06
Cloudy → Works
0.36
Cloudy → Fails
0.04
Question: What is the total probability that the projector works?
Step 1 — Identify: Two paths end with "Works": Clear → Works and Cloudy → Works.
Step 2 — Multiply: We already have the products from the previous lesson: 0.54 and 0.36.
Step 3 — Add:
P(Works)=0.54+0.36=0.90
The total probability is 0.90. This matches the projector's own reliability of 0.9, which makes sense because the projector is independent of the weather. The tree confirms what intuition suggests, and the identify-multiply-add process is the formal tool that gets us there.
The process works just as smoothly when stages depend on each other. Recall the marble bag with 3 red and 2 blue marbles, where we draw two without replacement. Here are all four paths:
Path
Calculation
Probability
Red → Red
53×42
206
Red → Blue
53×42
206
Blue → Red
52×43
206
Blue → Blue
52×41
202
Question: What is the probability of drawing exactly one red marble?
Step 1 — Identify: "Exactly one red" means one red and one blue in either order. Two paths qualify: Red → Blue and Blue → Red.
Step 2 — Multiply: Both path probabilities are 206.
Step 3 — Add:
P(exactly one red)=206+206=2012=53
Even with dependent stages, the process is identical. A quick sanity check: all four path probabilities sum to 206+206+206+202=2020=1, confirming we have accounted for every possible outcome.
As trees grow, the number of paths increases, but the method stays the same. Consider a factory that inspects each product at three independent checkpoints. Each checkpoint passes the item with probability 0.8 or flags it with probability 0.2. The three-stage tree has 2×2×2=8 paths total.
Question: What is the probability that exactly one checkpoint flags the product?
Step 1 — Identify: We need paths with exactly one "Flag" and two "Pass" results. Three paths qualify:
Flag → Pass → Pass
Pass → Flag → Pass
Pass → Pass → Flag
Step 2 — Multiply: Because the checkpoints are independent, each path has the same product:
0.2×0.8×0.8=0.128
Step 3 — Add:
P(exactly one flag)=0.128+0.128+0.128=0.384
There is about a 38.4% chance that exactly one checkpoint catches something. With larger trees, the main challenge is making sure you find all qualifying paths. Working through the tree systematically from top to bottom helps ensure nothing is missed.
It is worth pausing to understand why we add path probabilities. Each path through a tree is a distinct outcome sequence — drawing Red then Blue is a fundamentally different sequence from drawing Blue then Red. Because no two paths can happen at the same time, they are mutually exclusive, and there is no overlap to worry about. We do not need to subtract anything, unlike the general addition rule for overlapping events from an earlier course. Simply summing the qualifying path probabilities gives the correct total.
This mutual exclusivity also means the sum of all path probabilities in a complete tree must equal 1, since the paths cover every possible outcome. If you ever compute a total and get a number greater than 1, that is a reliable signal to go back and check your arithmetic or verify that you have not accidentally counted the same path twice.