Home page for accesible maths 3 The axiomatic approach

Style control - access keys in brackets

Font (2 3) - + Letter spacing (4 5) - + Word spacing (6 7) - + Line spacing (8 9) - +

3.3 Conditional probability

As we saw in a previous example the probability of an event depends not just on the experiment itself but on other information. Conditional probability forms a framework in which this additional information can be incorporated.

Suppose we have two events, A and B, and we know that B has occurred. The question is, what does this tell us about whether A occurred?

We resort to extracting intuition from the ideas of empirical probability: suppose we carry out the experiment n times. B occurs on nB trials. A and B occur together on nAB of the trials. So A also occurs on a proportion nAB/nB of the trials in which B occurs.

We can rewrite this proportion as

nABnB=nAB/nnB/n``Prob(AB)Prob(B).

This motivates the following definition.

If A and B are two events then, as long as P(B)>0, the conditional probability of A given B is written as P(A|B) and calculated from P(A|B)=P(AB)P(B).

Note the following immediate consequence of this definition:

P(AB)=P(B|A)P(A)=P(A|B)P(B).
Exercise 3.12.

If a fair die is thrown and the face shows a number >2. Find the probability that the face shows a prime. Also find the probability of >2 given it is prime.

Solution.

Let A={2,3,5} and B={3,4,5,6} then

P(prime|>2) = P(A|B)
= P(AB)/P(B)
= P({3,5})/P({3,4,5,6})
= 2/64/6=1/2.
P(B|A) = P(AB)/P(A)
= 2/63/6=2/3.

Exercise 3.13.

A bag contains 3 black, 5 white and 2 red marbles. A marble is selected at random. It turns out to be black; find the probability that the next marble selected (without replacing the first) is also black.

Solution.

Let A and B denote black on second and first draw. Using the formula:

P(A|B) = P(AB)/P(B)
= 3×210×93/10
= 2/9.

Can also argue this directly: having taken the first black, there are just two left in the remaining 9 balls and these are equally probable.

Exercise 3.14.

Three indistinguishable purses each contain two coins. One purse contains two gold coins, another contains two silver coins and the third contains one gold coin and a silver coin.
GG GS SS
A purse is selected at random, then at random a coin is selected from it. The selected coin turns out to be gold. Find the probability that the other coin in the purse is also gold.

Solution.
P(G left|G selected) = P(G selected G left)/P(G selected)
= P( two G purse)/P(G selected)
= 1/31/2=2/3.

Exercise 3.15.

Does P(A|B) satisfy 0P(A|B)1?

Solution.

Yes. First: ABB hence P(AB)P(B). Then, if P(B)>0,

P(A|B)=P(AB)/P(B)P(B)/P(B)=1.

The partition law can be rephrased as the law of total probability, which is an extremely useful way to break down considerations about real life events.

Theorem 3.16 (the law of total probability).
P(A)=P(A|B)P(B)+P(A|Bc)P(Bc).
Proof.

By the partition law, then the definition of conditional probability,

P(A) = P(AB)+P(ABc)
= P(A|B)P(B)+P(A|Bc)P(Bc),

Exercise 3.17.

In a population of children 60% are vaccinated against whooping cough. The probabilities of contracting whooping cough are 1/1000 if the child is vaccinated and 1/100 if not. Find the probability that a child selected at random will contract whooping cough.

Solution.

Let W denote whooping cough and V denote vaccination. Then

P(W) = P(W|V)P(V)+P(W|Vc)P(Vc)
= 110000.6+11000.4=4.61000=0.0046.

Exercise 3.18.

Note that {B,Bc} is a partition of the sample space Ω. Conjecture and prove a generalisation of the law of total probability to find P(A) from P(A|B1), P(A|B2) and P(A|B3) when {B1,B2,B3} are a partition of the sample space.

Solution.
A = (AB1)(AB2)(AB3)
P(A) = P(AB1)+(AB2)+(AB3)
= P(A|B1)P(B1)+P(A|B2)P(B2)+P(A|B3)P(B3).

Exercise 3.19.

A test for a disease gives positive results 90% of the time when a disease is present, and 10% of the time when the disease is absent. It is known that 1% of the population have the disease. Of those that receive a positive test result, 80% of patients receive treatment. For a randomly selected member of the population, what is the probability of receiving treatment?

Solution.

Let C be the event “has disease”: P(C)=0.01, and P(Cc)=0.99.

Let B be the event “positive test result”. We are told P(B|C)=0.9 and P(B|Cc)=0.1.

Let A be the event “receives treatment”. We are told P(A|B)=0.8. Presumably also P(A|Bc)=0.

We can now calculate

P(A) = P(A|B)P(B)+P(A|Bc)P(Bc)
= 0.8*P(B)+0P(Bc)
= 0.8P(B).

Note that there’s no need to find P(Bc). On the other hand we need

P(B) = P(B|C)P(C)+P(B|Cc)P(Cc)
= 0.9*0.01+0.1*0.99=0.108.

It therefore follows that

P(A)=0.8*0.108=0.08064.