Assigning Branch Probabilities

Introduction

Welcome back to Tree Diagrams and Decisions! You are now on lesson two of four in this course, so great progress so far. In the previous lesson, we built tree diagrams from scratch, carefully laying out nodes, branches, and paths for multi-stage experiments. Those structures showed us what could happen at each stage, but they said nothing about how likely each option was. In this lesson, we will complete the picture by assigning a probability to every single branch.

From Structure to Numbers

Consider a weather forecast. Knowing that tomorrow could be sunny or rainy is useful, but the real value comes from learning there is a 70% chance of sun and a 30% chance of rain. Tree diagrams work the same way. The skeleton we built last time tells us which outcomes are possible; the probability labels we add now tell us how likely each one is.

Once every branch carries a number, the tree becomes a full probability model. We can then calculate the likelihood of any specific outcome path, which will be the focus of our next lesson. For now, let us concentrate entirely on getting those branch labels right.

Illustration showing a bare tree diagram transforming into a fully labeled probability tree

The Branch-Sum-to-One Rule

Labeling Branches for Independent Stages

Labeling Branches When Stages Are Dependent

Verifying Your Labels

Conclusion and Next Steps

In this lesson, we turned bare tree diagrams into complete probability models by labeling every branch with the correct value. The core principle is simple: branches leaving each node must sum to one. For independent stages, the same probabilities appear at every node within a given level, while for dependent stages we recalculate at each node using updated counts that reflect earlier outcomes.

Now it is time to put these skills to work! In the upcoming practice section, you will fill in missing probabilities, spot labeling errors, adjust for dependence in new scenarios, and build fully labeled trees from the ground up. Roll up your sleeves and let us see those branches add up!

Sign up

Join the 1M+ learners on CodeSignal

Be a part of our community of 1M+ users who develop and demonstrate their skills on CodeSignal