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.4 Bayes theorem

Thomas Bayes (1702-1761), a clergyman and amateur statistician, was ignored by his contemporaries but has had a profound effect on modern statistical thinking.

Often interest is in the probability of A given B but information is given in terms of the probability of B given A.

Bayes theorem provides the basis for transforming this information.

Theorem 3.20 (Bayes theorem).

If A and B are events in the sample space with P(A),P(B)>0 then

P(B|A) = P(A|B)P(B)P(A).
Proof.
P(B|A)=P(AB)P(A)

end

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

Therefore

P(B|A)P(A)=P(AB)=P(A|B)P(B)

The result follows on rearrangement.

Another way to express this theorem is

P(B|A) = P(A|B)P(B)P(A|B)P(B)+P(A|Bc)P(Bc)

using the law of total probability. To evaluate the right hand side we require the probabilities P(A|B), P(B), P(A|Bc) and P(Bc).

When more than two possibilities are present, as when {B1,B2,,Bk} form a partition of the sample space Ω, Bayes’ formula extends to

P(Bi|A) = P(A|Bi)P(Bi)P(A)
= P(A|Bi)P(Bi)j=1kP(A|Bj)P(Bj).
Exercise 3.21.

For the whooping cough exercise above (Example 3.17 on p3.17), find the probability that a child is vaccinated given the occurrence of whooping cough.

Solution.
P(V|W) = P(W|V)P(V)P(W)
= 0.6/10004.6/10000.13.

Exercise 3.22.

Return to the disease example (Example 3.19 on p3.19). If you receive a positive test result, what is the probability that you have the disease?

Solution.

Recall that C is the event “have disease”, with P(C)=0.01 and P(Cc)=0.99. Also that B is the event “positive test result”, with P(B|C)=0.9 and P(B)|Cc)=0.1. Using Bayes’ theorem, we see that

P(C|B) = P(B|C)P(C)P(B|C)P(C)+P(B|Cc)P(Cc)
= 0.9×0.010.9×0.01+0.1×0.99
= 0.083.