Tree representation of conditional probabilities

Consider a random experiment, and two events EE and FF. The tree representation of these events offers a natural way to work with the conditional probabilities:

Let's start the tree with EE. Whether we start with EE or FF is usually clear from the problem at hand. In addition, we now draw certain probabilities along the branches.

In the first generation of the tree, we add the probability that EE occurs (left branch) and that EE^\prime occurs (right branch).

Given that EE occurs, we set in the next generation below EE the probability that FF occurs (left branch), and also that FF^\prime occurs (right branch), which are the conditional probabilities p(FE)p(F\vert E) and p(FE)p(F^\prime \vert E).

Similarly, below EE^\prime we add the conditional probabilities p(FE)p(F\vert E^\prime), and p(FE)p(F^\prime \vert E^\prime).

In the context of a survey (see previous chapter), p(E)p(E) might be the percentage of Trump voters and of these, p(FE)p(F\vert E) are male. Also, p(E)p(E^\prime) is the percentage of people not voting for Trump, and of these, p(FE)p(F^\prime\vert E^\prime) percent are not male, and so on.

Arranging the tree in this way, it has some nice properties:

Theorem 1
  1. Adding the branch probabilities from the same parent equals 11:

    p(E)+p(E)=1p(FE)+p(FE)=1p(FE)+p(FE)=1\begin{array}{lll} p(E)+p(E^\prime)&=&1\\ p(F|E)+p(F^\prime|E)&=&1\\ p(F|E^\prime)+p(F^\prime|E^\prime)&=&1\\ \end{array}
  2. Multiplication rule: Multiplying the branch probabilities along a path from the top to the bottom results in the probability that both the first event and second event on this path occur:

    p(E)p(FE)=p(EF)p(E)p(FE)=p(EF)p(E)p(FE)=p(EF)p(E)p(FE)=p(EF)\begin{array}{lll} p(E)\cdot p(F|E)&=&p(E\cap F)\\ p(E)\cdot p(F^\prime|E)&=&p(E\cap F^\prime)\\ p(E^\prime)\cdot p(F|E^\prime)&=&p(E^\prime\cap F)\\ p(E^\prime)\cdot p(F^\prime|E^\prime)&=&p(E^\prime\cap F^\prime) \end{array}

    These are the path probabilities.

  3. Sum rule: Adding the path probabilities leading to the same end event (FF or FF^\prime) results in the probability of this event (as is evident from the Venn-Diagrams shown at the bottom of the tree above):

    p(EF)+p(EF)=p(F)p(EF)+p(EF)=p(F)\begin{array}{lll} p(E \cap F)+p(E^\prime \cap F)&=& p(F)\\ p(E \cap F^\prime)+p(E^\prime \cap F^\prime)&=&p(F^\prime) \end{array}

All these properties are not new, we have already discussed them. The tree collects them in a nice way.

Let's make an example.

Example 1

Experience shows that the probability for rain on any given day is 1/3. If it rains, the probability for heavy traffic is 1/2. If it does not rain, the probability for heavy traffic is only 1/4.

  1. Determine the probability that tomorrow there will be heavy traffic.

  2. If there is heavy traffic tomorrow, what is the probability that it will rain?

Solution

We define the events RR="it rains", and HH="heavy traffic". The experiment consists of choosing a day. We start by drawing the tree. We can either start with RR or with HH. Sometimes you have to try out which order works better. For this example we know the probability p(HR)p(H\vert R), we start therefore with RR, so that we have more branch probabilities which we can indicate in the tree.

The black numbers indicate are the probabilities given in the text. We can complete the remaining branch probabilities using property (1) in the list above. These numbers are indicated in red.

  1. To find p(H)p(H), we have to follow all paths from the top to HH (paths RHRH and RHR^\prime H), and add those path probabilities (property 2):

    p(H)=1312+2314=13p(H)=\frac{1}{3}\cdot \frac{1}{2}+\frac{2}{3}\cdot \frac{1}{4}=\underline{\frac{1}{3}}
  2. p(RH)=p(RH)p(H)=1/31/21/3=1/61/3=36=12p(R|H)=\frac{p(R\cap H)}{p(H)}=\frac{1/3\cdot 1/2}{1/3}= \frac{1/6}{1/3}=\frac{3}{6}=\underline{\frac{1}{2}} where p(H)=1/3p(H)=1/3 was calculated in (1).

Exercise 1
Q1

In a town, 30%30\% of the population read newspaper AA, and of these, 1/4 are females. Of all the people not reading newspaper A, 1/5 are females. A person is randomly selected. What is the probability that

  1. the person reads newspaper A and is male.
  2. the person is male.
  3. the person reads newspaper A if the person is female.
Q2

A hospital has 300 nurses. During the past year, 48 nurses earned a pay raise, At the beginning of the year, the hospital offered a special training seminar, which was attended by 138 of the nurses. 27 of the nurses who earned a pay raise attended the training seminar.

  1. What is the probability that a nurse who attended the seminar earned a pay raise?
  2. If a nurse is selected at random, what is the probability that the nurse attended the seminar and earned a pay raise?
Q3

A box contains 2 blue and 3 red balls. You select at random 2 balls, one after the other, without replacement.

  1. What is the probability to select balls of different colour?
  2. The second ball is red. What is the probability that the first ball was red as well?
Q4

You select at random 2 cards without replacement, one after the other, from a Swiss Jass deck of 36 cards. What is the probability to draw

  1. two kings?
  2. at least one king?
Q5

Suppose we send 30%30\% of our products to company A and 70%70\% of our products to company B. Company A reports that 5%5\% of our products are defective and company B reports that 4%4\% of our products are defective. Find the probability that a product is sent to

  1. company A and it is defective.
  2. company A and it is not defective.
  3. company B and it is defective.
  4. company B and it is not defective.
Q6

A small manufacturing company has rated 75%75\% of its employees as satisfactory (SS) and 25%25\% as unsatisfactory (SS^\prime). Personnel records show that 80%80\% of the satisfactory workers had previous work experience (EE) in the job they are now doing, while 15%15\% of the unsatisfactory workers had no work experience (EE^\prime) in the job they are now doing. If a person who has had previous work experience is hired, what is the probability that this person will be an unsatisfactory employee?

Q7

A basketball team is to play two games in a tournament. The probability of winning the first game is 0.100.10. If the first game is won, the probability of winning the second game is 0.150.15. If the first game is lost, the probability of winning the second game is 0.250.25. What is the probability the first game was won if the second game is lost?

Solution
A1

AA="reading a newspaper", FF="female". From the tree (shown below) follows

  1. p(AF)=0.30.75=0.225p(A\cap F^\prime)=0.3\cdot 0.75=\underline{0.225} (property 2)
  2. p(F)=0.30.75+0.70.8=0.785p(F^\prime)=0.3\cdot 0.75+0.7\cdot 0.8=\underline{0.785} (properties 2 and 3)
  3. p(AF)=p(AF)p(F)=0.30.250.215=0.348...p(A\vert F)=\frac{p(A\cap F)}{p(F)} = \frac{0.3\cdot 0.25}{0.215}=\underline{0.348...}
A2

RR="pay raise", AA="attending special training". Draw the tree (see figure below). Selecting at random is a Laplace experiment, so

p(A)=AS=138300p(A)=\frac{\vert A\vert}{\vert S\vert}=\frac{138}{300}p(RA)=RAA=27138p(R\vert A)=\frac{\vert R\cap A\vert }{\vert A\vert}=\frac{27}{138}

and so on.

  1. p(RA)=27138=0.195..p(R\vert A)=\frac{27}{138}=\underline{0.195..}
  2. p(RA)=13830027138=0.09p(R\cap A)=\frac{138}{300}\cdot \frac{27}{138}=\underline{0.09}
A3

R1R_1="red ball in first selection", R2R_2="red ball in second selection". Draw the tree (see figure below).

  1. Different color: Add the path probabilities of R1R2R_1 R_2^\prime and R1R2R_1^\prime R_2: p=3512+2534=0.6p=\frac{3}{5} \cdot \frac{1}{2} + \frac{2}{5} \cdot \frac{3}{4}=\underline{0.6}
  2. p(R1R2)=p(R1R2)p(R2)=35123512+2534=0.5p(R_1\vert R_2)=\frac{p(R_1\cap R_2)}{p(R_2)}=\frac{\frac{3}{5}\cdot \frac{1}{2}}{\frac{3}{5}\cdot \frac{1}{2}+\frac{2}{5}\cdot \frac{3}{4}}=\underline{0.5}
A4

K1K_1="king in first selection", K2K_2="king in second selection". Draw the tree (see figure below).

  1. p(K1K2)=436335=0.0095p(K_1\cap K_2)=\frac{4}{36}\cdot \frac{3}{35} = \underline{0.0095}

  2. Add the probabilities of the paths K1K2,K1K2K_1 K_2, K_1 K_2^\prime and K1K2K_1^\prime K_2: p=436335+4363235+3236435=0.2127p=\frac{4}{36}\cdot \frac{3}{35} +\frac{4}{36}\cdot \frac{32}{35} +\frac{32}{36}\cdot \frac{4}{35} = \underline{0.2127}.

    Alternatively, we can first calculate the event "no king was selected", which is p(K1K2)=32363135=0.7873p(K_1^\prime \cap K_2^\prime)=\frac{32}{36}\cdot \frac{31}{35}=0.7873, and then calculate the opposite event, which is "at least one king was selected": p=10.7873=0.2127p=1-0.7873=0.2127.

A5
  1. p(AD)=p(A)P(DA)=0.3(0.05)=0.015p(A\cap D)=p(A)P(D|A)= 0.3(0.05)=0.015
  2. p(AD)=p(A)P(DA)=0.3(0.95)=0.285p(A\cap D^\prime)=p(A)P(D^\prime|A)=0.3(0.95)=0.285
  3. p(BD)=p(B)P(DB)=0.7(0.04)=0.028p(B\cap D)=p(B)P(D|B)=0.7(0.04)=0.028
  4. p(BD)=p(B)P(DB)=0.7(0.96)=0.672p(B\cap D^\prime)=p(B)P(D^\prime|B)=0.7(0.96)=0.672
A6

p(SE)=0.250.850.250.85+0.750.8=0.26p(S^\prime|E)=\frac{0.25\cdot 0.85}{0.25\cdot 0.85+0.75\cdot 0.8}=0.26

A7

W1=W_1="win of first game", W2=W_2="win of second game".

p(W1W2)=0.10.850.10.85+0.90.75=0.112p(W_1|W_2^\prime)=\frac{0.1 \cdot 0.85}{0.1 \cdot 0.85 + 0.9 \cdot 0.75}=0.112