Pulsars
0 %
Log inSign up

Conditional probability and tree

Building and reading a probability tree

The principle of the tree

A probability tree represents a succession of events by branches. Each level of the tree corresponds to a step (a draw, a test...), and each branch carries the probability of the corresponding event, given everything that has been chosen before it.

Rules for reading a tree

  1. At each node, the sum of the probabilities of the branches leaving it always equals 1 (we are sure to go somewhere).
  2. The probability of a complete path (from the root to a leaf) is obtained by multiplying the probabilities along the path.
  3. The probability of a final event is obtained by adding the probabilities of all the paths that lead to it.

Diagram: tree for drawing 2 balls without replacement

An urn contains 3 red balls (R) and 2 blue balls (B), i.e. 5 balls in total. We draw 2 balls without replacement, one after the other.

Probability tree (drawing without replacement, 2 balls):

                          3/5                 2/4
                    /----------- R1 -----|----------- R2   (path RR: prob 3/5 x 2/4)
                   /                     |
                  /                      \----------- 2/4  B2   (path RB: prob 3/5 x 2/4)
                 /
     START  -----
                 \
                  \                       /----------- 3/4  R2   (path BR: prob 2/5 x 3/4)
                   \                     |
                    \----------- B1 -----|----------- 1/4  B2   (path BB: prob 2/5 x 1/4)
                          2/5

(1st level: drawing the 1st ball, 3/5 red or 2/5 blue)
(2nd level: drawing the 2nd ball, probability updated because one ball has already come out)
(each complete path = product of the probabilities met)

Checking that everything sums to 1

Multiplying along each path: P(RR) = 3/5 x 2/4 = 6/20 = 3/10; P(RB) = 3/5 x 2/4 = 6/20 = 3/10; P(BR) = 2/5 x 3/4 = 6/20 = 3/10; P(BB) = 2/5 x 1/4 = 2/20 = 1/10. The sum is 3/10 + 3/10 + 3/10 + 1/10 = 10/10 = 1: this is an essential check, since the four paths cover all the possible cases.

Common pitfall

Without replacement, the second-level probabilities CHANGE depending on the branch taken at the first level (the same balls are no longer left in the urn). Forgetting to update these probabilities (for example keeping 3/5 and 2/5 everywhere as if the ball were put back) is the most common mistake when building a tree.