topic badge
Standard Level

7.01 Conditional probability and independent events

Lesson

Conditional probability

We are often interested in probabilities under certain conditions. For example what is the probability of it snowing tomorrow given the temperature today, or if an even number is rolled on a die what is the probability that it is a six. Giving conditions will in effect reduce the sample space we are concerned with. 

For two events $A$A and $B$B the probability of event $A$A occurring given that event $B$B has occurred has the notation $P\left(A|B\right)$P(A|B) which is read as the "probability of $A$A given $B$B".

Remember!

When considering whether a question is referring to a conditional probability, remember to look out for the following phrases:

  • Given that ....
  • If ......., what is the probability that .....

 

Conditional probability

For two events $A$A and $B$B, the probability of $A$A occurring given that$B$B has occurred is given by:

$P\left(A|B\right)=\frac{P\left(A\cap B\right)}{P\left(B\right)}$P(A|B)=P(AB)P(B)

If we know the conditional probability we can calculate the probability of $A$A and $B$B using either:

$P\left(A\cap B\right)=P\left(A|B\right)P\left(B\right)$P(AB)=P(A|B)P(B) OR $P\left(A\cap B\right)=P\left(B|A\right)P\left(A\right)$P(AB)=P(B|A)P(A)

Note: A Venn diagram may be expressed in terms of the number of elements in each section or by dividing by the total number of outcomes we can create equivalent Venn diagrams displaying the probabilities of each section. For example, if we surveyed 40 people and asked if they own a pet dog and/or cat we could represent the information as either diagram below. 

Worked example

Example 1

Use the probability Venn diagram below to calculate the following probabilities.

a)  $P(A|B)$P(A|B)

$P\left(A|B\right)$P(A|B) $=$= $\frac{P\left(A\cap B\right)}{P\left(B\right)}$P(AB)P(B)
  $=$= $\frac{0.3}{0.1+0.3}$0.30.1+0.3
  $=$= $\frac{3}{4}$34

b)  $P(B|A')$P(B|A) 

$P\left(B|A'\right)$P(B|A) $=$= $\frac{P\left(B\cap A'\right)}{P\left(A'\right)}$P(BA)P(A)
  $=$= $\frac{0.1}{0.1+0.4}$0.10.1+0.4
  $=$= $\frac{1}{5}$15

 

Independent events

Recall that independent events are events where the occurrence of one event does not affect the probability of the other occurring. Such as rolling a dice and then tossing a coin, or tossing a coin repeatedly.  Now in the context of conditional probability this would mean that the probability of event $A$A occurring given event $B$B has occurred should simply be the probability of $A$A - that is, it shouldn't matter if event $B$B occurred or not. Mathematically we can write this property as:

$P\left(A|B\right)=P\left(A\right)$P(A|B)=P(A)

From our conditional formula we see that for independent events:

$P\left(A\cap B\right)$P(AB) $=$= $P\left(A|B\right)\times P\left(B\right)$P(A|B)×P(B)
  $=$= $P\left(A\right)\times P\left(B\right)$P(A)×P(B)

We used this fact last lesson to calculate the probability for $P\left(A\cap B\right)$P(AB). We can now also use this fact to test if two events are independent if we know the probability of $A$A$B$B and the probability of (A and B).

Independent events

The following statements are true for any two independent events, $A$A and $B$B:

  • $P\left(A\cap B\right)=P\left(A\right)\times P\left(B\right)$P(AB)=P(A)×P(B)
  • $P\left(A|B\right)=P\left(A\right)$P(A|B)=P(A)
  • $P\left(B|A\right)=P\left(B\right)$P(B|A)=P(B)

Dependent events

In contrast, dependent events are those are events where the occurrence of one event does affect the probability of the other occurring. For example, if you select marbles from a bag full of different coloured marbles without putting the marble back after each selection, then the probability of selecting a particular colour will change depending on the colour of the marble that was previously selected and removed. The probability of being involved in a serious traffic accident is dependent on the event of driving at speed.

Our rules for conditional probabilities apply, that is: $P\left(A|B\right)=\frac{P\left(A\cap B\right)}{P\left(B\right)}$P(A|B)=P(AB)P(B)

Careful for dependent events
  • $P\left(A\cap B\right)\ne P\left(A\right)\times P\left(B\right)$P(AB)P(A)×P(B) 
  • $P\left(A|B\right)\ne P\left(A\right)$P(A|B)P(A)
  • $P\left(B|A\right)\ne P\left(B\right)$P(B|A)P(B)

Common problems involve repeated selections from a set, such as repeated selections of cards from a deck or repeated selections of marbles from a bag or repeated selections of people from a population to form a sample. Look for the phrases with replacement or without replacement.

  • With replacement means repeated selections will retain the same probability and hence, the events remain independent
  • Without replacement means that the probabilities will change as a selection is made and removed as a possibility for future selections and hence, the events are dependent 
  • If a population is large enough, for example selecting ten people randomly from the Australian electoral role then this case can be treated as independent since the probabilities will change so little it will not significantly affect the calculation

 

Worked examples

Example 2

Three cards are chosen at random from a deck of $52$52 cards without replacement. What is the probability of choosing $3$3 kings?

On the first draw we have $52$52 cards, and there are $4$4 kings in the pack.

On the second draw, if we have already kept a king out - then we have $51$51 cards, and $3$3 kings still in the pack.

On the third draw, because we have already kept two kings out, then we have $50$50 cards and just $2$2 kings still in the pack.  

This results in the following probability of $3$3 kings being selected:

$P\left(\text{3 Kings}\right)$P(3 Kings) $=$= $\frac{4}{52}\times\frac{3}{51}\times\frac{2}{50}$452×351×250
  $=$= $\frac{1}{5525}$15525


When you solve problems like this, you may find it helpful to draw a few boxes marking the 3 cards you are interested in, then writing the probabilities in each box. It's then easier to see what you need to multiply to calculate the answer.

Example 3

What is the probability of drawing (without replacement) a Jack, Queen and King:

a) in that order?

b) in any order?

a)  A Jack first, well there are $4$4 possible Jacks out of $52$52 cards.

A queen next, there are $4$4 possible queens out of $51$51 cards (remember we kept out a card).

A king next, there are $4$4 possible kings out of $50$50 cards remaining.

$P\left(\text{J,Q,K}\right)=$P(J,Q,K)= $\frac{4}{52}\times\frac{4}{51}\times\frac{4}{50}=\frac{8}{16575}$452×451×450=816575

 

b) For the first card we want either a J, Q or K ($12$12 possible cards) from a total of $52$52.

For the second card, we want one of the other values ($8$8 possible cards) from a total of $51$51. For example, if the first card was a Jack, then we want any of the Kings or Queens.

For the third card we want the last card to complete the set, $4$4 possibilities from a total of $50$50 cards.

$P\left(\text{J,Q,K in any order}\right)=$P(J,Q,K in any order)= $\frac{12}{52}\times\frac{8}{51}\times\frac{4}{50}=\frac{16}{5525}$1252×851×450=165525


 

Tree Diagrams

Tree diagrams are often used to display conditional events and carry out probability calculations.

Let's contrast two examples one with replacement and one without replacement to compare the information displayed in a tree diagram.

Worked example

Example 4

a) Draw a tree diagram to represent drawing two marbles from a bag containing $4$4 blue marble and $2$2 red marbles with replacement and find the probabilities of each outcome.

b) Draw a tree diagram to represent drawing two marbles from a bag containing $4$4 blue marble and $2$2 red marbles without replacement and find the probabilities of each outcome.

Just as for tree diagrams for with replacement, we can find probabilities by multiplying across branches. The difference here is the probabilities for the second draw. The denominator has reduced to $5$5, reflecting there are now only $5$5 marbles left in the bag and the numerator changes depending on the first draw. Take care when creating this type of tree diagram and check that the probabilities across branches originating from the same point add to $1$1.

The probabilities on the branches for draw two are in fact conditional probabilities. For example The probability of a red on the second draw given a blue on the first is $\frac{2}{5}$25.

The probabilities on tree diagrams for dependent events like part b) above are:

The probabilities on tree diagrams for independent events like part a) above will simplify to:

 

Practice questions

Question 1

Two events $A$A and $B$B are such that:

$P\left(A\cap B\right)=0.02$P(AB)=0.02 and $P\left(A\right)=0.2$P(A)=0.2.

  1. If $P\left(B\right)=0.1$P(B)=0.1, are the events $A$A and $B$B independent?

    Yes

    A

    No

    B
  2. Are the events $A$A and $B$B mutually exclusive?

    Yes

    A

    No

    B

QUESTION 2

$531$531 people are asked whether they watch My Kitchen Rules ($MKR$MKR) or Masterchef ($MC$MC).

$177$177 people watch both and $65$65 watch neither. The number who watch $MKR$MKR is twice the number who watch both.

  1. How many people only watch $MKR$MKR?

  2. Of the people who watch $MC$MC, what proportion also watch $MKR$MKR?

  3. Of those who don’t watch $MC$MC, what proportion watch neither?

QUESTION 3

James owns four green jackets and three blue jackets. He selects one of the jackets at random for himself and then another jacket at random for his friend.

  1. Construct a tree diagram of this situation with the correct probability on each branch.

    GGBBGB

  2. What is the probability that James selects a blue jacket for himself?

  3. Calculate the probability that both jackets James selects are green.

QUESTION 4

At a university there are $816$816 students studying first year engineering, $497$497 of whom are female (set $F$F). $237$237 of these women are studying Civil Engineering, and there are $348$348 students studying Civil Engineering altogether (set $C$C).

  1. State the value of $w$w in the diagram.

  2. State the value of $x$x in the diagram.

  3. State the value of $y$y in the diagram.

  4. State the value of $z$z in the diagram.

  5. What is the probability that a randomly selected male student does not study Civil Engineering?

What is Mathspace

About Mathspace