Chapter 2: Conditional Probability

Conditional Probability

Definition, Formula and Solved Examples

Definition of Conditional Probability

Let A and B be two events in a sample space S, where

P(B) > 0.

The conditional probability of A given that B has already occurred is denoted by

P(A | B)

and is defined as

P(A | B) = P(A ∩ B) / P(B)

The occurrence of event B reduces the original sample space to B. We then determine what proportion of B also belongs to A.

Sample Space S A B A ∩ B
Figure 1: Conditional probability considers the part of A lying inside B.

The multiplication rule follows directly:

P(A ∩ B) = P(A | B) P(B)

Similarly,

P(A ∩ B) = P(B | A) P(A)
Example 1: Drawing a Card

A card is drawn randomly from a standard deck of 52 cards. Given that the selected card is a face card, find the probability that it is a king.

K Q J 12 Face Cards
Figure 2: Kings, Queens and Jacks form the 12 face cards.
Show Solution

Let

A = {the card is a king}

and

B = {the card is a face card}.

There are 12 face cards:

4 Kings + 4 Queens + 4 Jacks = 12.

Therefore,

P(B) = 12/52.

All four kings are face cards, so

P(A ∩ B) = 4/52.

Using conditional probability,

P(A | B) = P(A ∩ B)/P(B)
= (4/52)/(12/52)
= 4/12 = 1/3.
Answer: P(A | B) = 1/3
Example 2: Rolling Two Dice

Two fair dice are rolled. Given that the sum of the two numbers is 8, find the probability that at least one die shows 5.

Outcomes having sum 8: (2,6) (3,5) (4,4) (5,3) (6,2) Contains 5 Contains 5
Figure 3: Five possible ordered outcomes have sum 8.
Show Solution

Let

B = {sum of the two dice is 8}.

The possible outcomes are

(2,6), (3,5), (4,4), (5,3), (6,2).

Hence,

n(B)=5.

Let

A = {at least one die shows 5}.

The outcomes satisfying both conditions are

(3,5), (5,3).

Therefore,

n(A ∩ B)=2.

Thus,

P(A | B)=2/5.
Answer: 2/5
Example 3: Mathematics and Physics Students

In a class of 100 students, 60 study Mathematics, 45 study Physics and 30 study both subjects. If a randomly selected student studies Mathematics, find the probability that the student also studies Physics.

Mathematics Physics 30 30 15
Figure 4: Venn representation of Mathematics and Physics students.
Show Solution

Let

M = {student studies Mathematics}

and

P = {student studies Physics}.

We have

P(M)=60/100

and

P(M ∩ P)=30/100.

Therefore,

P(P | M) = P(P ∩ M)/P(M)
= (30/100)/(60/100)
= 30/60 = 1/2.
Answer: 1/2 = 0.5 = 50%
Example 4: Defective Components

A factory produces electronic components. It is known that 8% of the components are defective and 3% are both defective and produced during the night shift. If a component is known to be defective, find the probability that it was produced during the night shift.

Night + Defective Defective = 8% 3%
Figure 5: The 3% night-shift defective group lies inside the 8% defective group.
Show Solution

Let

D = {component is defective}

and

N = {component was produced during night shift}.

Given

P(D)=0.08

and

P(D ∩ N)=0.03.

We require

P(N | D).

Using the definition,

P(N | D) = P(N ∩ D)/P(D)
= 0.03/0.08
= 0.375.
Answer: 0.375 = 37.5%
Example 5: Selection Without Replacement

A box contains 5 red balls and 3 blue balls. Two balls are drawn successively without replacement. Find the probability that the second ball is red, given that the first ball is red.

Initially: 5 Red 3 Blue After one red is removed: 4 red + 3 blue
Figure 6: After the first red ball is removed, 7 balls remain.
Show Solution

Originally there are

5+3=8

balls.

Since the first ball is already known to be red, one red ball has been removed.

The remaining balls are

4 red + 3 blue = 7 balls.

Therefore,

P(second red | first red) = 4/7.
Answer: 4/7
Example 6: Random Integer

An integer is selected randomly from {1,2,3,...,30}. Given that the integer is divisible by 3, find the probability that it is also divisible by 6.

Multiples of 3:

3, 6, 9, 12, 15, 18, 21, 24, 27, 30
Figure 7: The bold numbers are divisible by both 3 and 6.
Show Solution

Let

A = {integer is divisible by 6}

and

B = {integer is divisible by 3}.

The multiples of 3 are

3,6,9,12,15,18,21,24,27,30.

Hence

n(B)=10.

The numbers divisible by 6 are

6,12,18,24,30.

Therefore

n(A ∩ B)=5.

Thus,

P(A | B) = 5/10 = 1/2.
Answer: 1/2
Example 7: Conditional Probability from a Table

A survey of 200 university students gives the following information. If a randomly selected student has passed, find the probability that the student is female.

Passed Failed Total
Male 80 20 100
Female 70 30 100
Total 150 50 200
Figure 8: Contingency table for gender and examination result.
Show Solution

Let

F = {student is female}

and

P = {student passed}.

From the table,

n(P)=150

and

n(F ∩ P)=70.

Therefore,

P(F | P) = 70/150
= 7/15.

In decimal form,

7/15 ≈ 0.4667.
Answer: 7/15 ≈ 46.67%
Example 8: Three Coin Tosses

A fair coin is tossed three times. Given that at least one head occurs, find the probability that exactly two heads occur.

Start H T H T H T HHH, HHT HTH, HTT THH, THT TTH, TTT
Figure 9: Tree representation for three tosses of a coin.
Show Solution

The sample space is

S = {HHH,HHT,HTH,HTT,THH,THT,TTH,TTT}.

Let

B = {at least one head occurs}.

The only outcome with no head is TTT. Therefore,

B= {HHH,HHT,HTH,HTT,THH,THT,TTH}.

Hence,

n(B)=7.

Exactly two heads occur in

HHT, HTH, THH.

Thus,

n(A ∩ B)=3.

Therefore,

P(A | B)=3/7.
Answer: 3/7
Example 9: Medical Diagnostic Test and Bayes' Theorem

Suppose

P(D)=0.02,

where D denotes that a person has a disease.

The diagnostic test satisfies

P(+ | D)=0.95

and

P(+ | Dᶜ)=0.05.

Find the probability that a person actually has the disease given that the test result is positive.

Person Disease 0.02 No Disease 0.98 Positive 0.95 Negative 0.05 Positive 0.05 Negative 0.95
Figure 10: Probability tree for the medical test.
Show Solution

We require

P(D | +).

By Bayes' theorem,

P(D | +) = [P(+ | D)P(D)] / P(+).

First calculate the probability of obtaining a positive test:

P(+) = P(+ | D)P(D) + P(+ | Dᶜ)P(Dᶜ).

Since

P(Dᶜ)=1-0.02=0.98,

we have

P(+) = (0.95)(0.02) + (0.05)(0.98).
= 0.019+0.049 = 0.068.

Therefore,

P(D | +) = (0.95)(0.02)/0.068.
= 0.019/0.068.
≈0.2794.
Answer: P(D | +) ≈ 0.2794 = 27.94%
A positive test does not automatically imply a very high probability of disease. The low prevalence of the disease affects the posterior probability.
Example 10: Three Events and the Multiplication Rule

Suppose events A, B and C satisfy

P(A)=0.6,
P(B | A)=0.5,
P(C | A ∩ B)=0.4.

Find

P(A ∩ B ∩ C).
A B | A C | A ∩ B 0.6 0.5 0.4
Figure 11: Successive conditional probabilities in the multiplication rule.
Show Solution

For three events, the multiplication rule is

P(A ∩ B ∩ C) = P(A) P(B | A) P(C | A ∩ B).

Substituting the given values,

P(A ∩ B ∩ C) = (0.6)(0.5)(0.4).
= 0.12.
Answer: P(A ∩ B ∩ C)=0.12

Important Formulas

1. Conditional Probability

P(A | B) = P(A ∩ B) / P(B),    P(B) > 0

2. Reverse Conditional Probability

P(B | A) = P(A ∩ B) / P(A),    P(A) > 0

3. Multiplication Rule

P(A ∩ B) = P(A)P(B | A)

4. Equivalent Multiplication Rule

P(A ∩ B) = P(B)P(A | B)

5. Three-Event Multiplication Rule

P(A ∩ B ∩ C) = P(A) P(B | A) P(C | A ∩ B)

6. Independent Events

If A and B are independent,

P(A | B)=P(A)

and therefore

P(A ∩ B) = P(A)P(B)

7. Bayes' Theorem

P(A | B) = [P(B | A)P(A)] / P(B)
Conditional Probability — University Level Mathematics
Practice the examples first and then click Show Solution to check your answer.

Comments

Popular posts from this blog

Table of content

Chapter 1 : Set Theory: An Introduction

Types of Matrix