MathMastery.Beta
Learning Resources

Tree Diagrams & Combined Events

Interactive lessons, worked examples, and problem-solving techniques to help Kenyan students master KJSEA, KPSEA, KCSE, and IGCSE mathematics.

N/A Pathway: N/A

First Principles

Objective: Master tree diagrams to calculate probabilities of combined independent and dependent events (with and without replacement).

The Big Idea: Probability problems with multiple stages can quickly become confusing. A tree diagram maps out every possible sequence of events step-by-step. Each "branch" represents a choice or outcome, and each "path" from root to leaf represents one complete combined outcome.

Core Rules of Tree Diagrams

  • Rule 1 (Along a Branch): Multiply probabilities along a path to find the probability of that specific combined outcome: \(P(A \text{ and } B) = P(A) \times P(B \mid A)\).
  • Rule 2 (Across Outcomes): Add the probabilities of all distinct paths that fulfill the required condition: \(P(\text{Event}) = \sum P(\text{Favourable Paths})\).
  • Rule 3 (Branch Totals): The sum of probabilities branching out from any single node must always equal 1.

With vs. Without Replacement:

  • With replacement (Independent): Items are returned. Probabilities stay constant on the 2nd draw (denominator does not change).
  • Without replacement (Dependent): Items are kept. Total items decrease by 1, and the count of the chosen colour decreases by 1 (denominator shrinks to \(n-1\)).

Interactive Tree Diagram Simulator

Simulate picking 2 beads from a pouch with 3 Red and 2 Blue beads. Toggle replacement mode to see how probabilities change!

🌳 Branch Builder — SIM-Card Drawer

Set the number of each colour, choose replacement mode, and watch the tree build itself. Probabilities multiply along each path and tally live.

Key Formulas

1. Independent Events (With Replacement) \[P(A \cap B) = P(A) \times P(B)\] The outcome of the first event has no effect on the probability of the second.
2. Dependent Events (Without Replacement) \[P(A \cap B) = P(A) \times P(B \mid A)\] Where \(P(B \mid A)\) is the conditional probability of event \(B\) occurring given that event \(A\) has already happened.
3. Product Rule (Along a Path) \[P(\text{Path}) = P(\text{Branch}_1) \times P(\text{Branch}_2) \times \dots \times P(\text{Branch}_n)\]
4. Addition Rule (Combining Mutually Exclusive Paths) \[P(\text{Event}) = \sum_{\text{matching paths}} P(\text{Path})\]
5. Complement Rule ("At Least One") \[P(\text{at least one } A) = 1 - P(\text{no } A)\] Crucial time-saver for multi-stage problems.

Worked Examples

Example 1 (Easy): Two draws without replacement — matching pair

A pouch contains 4 green and 2 yellow marbles. Two marbles are drawn one after another without replacement. Find the probability that both are green.


Step 1: Identify the probability of the first marble being green.

\[P(G_1) = \frac{4}{6} = \frac{2}{3}\]

Step 2: Calculate the conditional probability of the second marble being green (1 green removed, total decreases by 1).

\[P(G_2 \mid G_1) = \frac{3}{5}\]

Step 3: Multiply along the path:

\[P(G_1 \cap G_2) = \frac{4}{6} \times \frac{3}{5} = \frac{12}{30} = \frac{2}{5}\]

Example 2 (Medium): Mixed outcomes — "One of each colour"

A vendor in Kisumu has a crate with 7 sweet mangoes and 3 sour mangoes. A buyer picks two mangoes at random without replacement. What is the probability that the buyer gets one sweet and one sour mango?


Step 1: Identify all possible paths that satisfy the condition.

  • Path 1: Sweet then Sour \((S_1, R_2)\)
  • Path 2: Sour then Sweet \((R_1, S_2)\)

Step 2: Calculate the probability for each path.

\[P(S_1 \cap R_2) = \frac{7}{10} \times \frac{3}{9} = \frac{21}{90}\] \[P(R_1 \cap S_2) = \frac{3}{10} \times \frac{7}{9} = \frac{21}{90}\]

Step 3: Add the mutually exclusive paths together:

\[P(\text{One of each}) = \frac{21}{90} + \frac{21}{90} = \frac{42}{90} = \frac{7}{15}\]

Example 3 (Hard): Multi-stage with Complement ("At Least One")

A bag contains 5 functional USB drives and 3 corrupted USB drives. A technician selects 3 drives at random without replacement. Find the probability that at least one functional drive is selected.


Strategy: Using the direct method requires summing \(P(1), P(2),\) and \(P(3)\) functional drives (7 different paths!). Instead, use the complement rule: \(P(\text{at least 1 functional}) = 1 - P(\text{all 3 corrupted})\).

Step 1: Calculate \(P(\text{all corrupted}) = P(C_1 \cap C_2 \cap C_3)\):

\[P(C_1 \cap C_2 \cap C_3) = \frac{3}{8} \times \frac{2}{7} \times \frac{1}{6} = \frac{6}{336} = \frac{1}{56}\]

Step 2: Subtract from 1:

\[P(\text{at least one functional}) = 1 - \frac{1}{56} = \frac{55}{56}\]

Common Mistakes

Mistake 1: Keeping denominators unchanged in "without replacement" problems

Incorrect: Calculating \(P(R_1 \cap R_2) = \frac{3}{5} \times \frac{2}{5}\).

Correction The total number of items in the container decreases after each draw! Denominator drops from \(5\) to \(4\): \(P(R_1 \cap R_2) = \frac{3}{5} \times \frac{2}{4} = \frac{3}{10}\).

Why it feels right Your mental image of the bag remains static unless you explicitly visualize physically removing an item.

Mistake 2: Forgetting order in "one of each" questions

Incorrect: Answering \(P(\text{Red and Blue}) = \frac{3}{5} \times \frac{2}{4} = \frac{3}{10}\).

Correction "One red and one blue" means Red-then-Blue OR Blue-then-Red. You must compute and add both paths: \(\frac{6}{20} + \frac{6}{20} = \frac{12}{20} = \frac{3}{5}\).

Mistake 3: Adding probabilities along a path instead of multiplying

Incorrect: \(P(A \text{ then } B) = P(A) + P(B)\).

Correction Combined sequential events obey the Product Rule: Multiply along branches (\(\times\)). You only add (\(+\)) when combining separate parallel paths.

Real World

Matatu Commuter Reliability: In Nairobi, there is a \(0.35\) probability of heavy morning rain. If it rains, the probability of traffic delay is \(0.80\); if dry, delay probability is \(0.20\). A tree diagram models the daily commute: \[P(\text{Delay}) = (0.35 \times 0.80) + (0.65 \times 0.20) = 0.28 + 0.13 = 0.41 \text{ (41\%)}\]
Mobile Money Fraud Detection: An automated fraud detection filter flags \(95\%\) of fraudulent transactions and falsely flags \(2\%\) of legitimate transactions. If \(1\%\) of all transactions are fraudulent, tree diagrams calculate the exact probability that a flagged transaction is genuinely fraudulent.
Medical Testing & Diagnostics: Rapid antigen testing for malaria uses conditional tree branches to evaluate true positive and false positive rates across patient populations.

Practice

A fair coin is tossed and a fair six-sided die is rolled. What is the probability of obtaining a Head on the coin and an even number on the die? (Type only the fraction in simplest form, e.g., 10/16)
Review the concepts above.
A bag contains 3 red balls and 2 blue balls. Two balls are drawn successively **with replacement**. What is the probability that both balls drawn are red? (Type only the fraction in simplest form, e.g., 2/4)
Review the concepts above.
A bag contains 3 red, 2 blue, and 1 green ball (total 6 balls). Two balls are drawn successively **without replacement**. What is the probability that both balls drawn are red? (Type only the fraction in simplest form, e.g., 2/4)
Review the concepts above.
A factory produces items using two machines. 60% of the items come from Machine A and 40% from Machine B. The probability that an item from Machine A is defective is 0.02 (2%), and from Machine B is 0.05 (5%). What is the overall probability that a randomly selected item is defective? (Type your answer as a simplified fraction, e.g., 6/15)
Review the concepts above.
A basket holds 4 ripe mangoes and 3 unripe mangoes. A shopper picks 2 mangoes at random **without replacement**. What is the probability that **at least one** mango is ripe? (Type only the fraction in simplest form, e.g., 7/13)
Review the concepts above.
A quality control line inspects items. An item is Type A with probability 0.6 and Type B with probability 0.4. Type A items pass inspection with probability 0.9, while Type B items pass with probability 0.7. What is the probability that a randomly selected item is either Type B OR passes inspection? (Type only the decimal, e.g., 82.01)
Review the concepts above.