## Bayes' theorem

Following some discussion in last year's tutorials I found the following formula for Bayes' theorem.

The formula states that given that the event B has occurred, the probability that it was due to cause Ai, p( Ai | B ), is equal to the probability that Ai should produce event B, p( B | Ai ), times the probability that Ai should occur in the first place, p( Ai ), all divided by the sum of such terms over all i.

In other words, the posterior probability of event Ai given that B has occured, is the joint probability of event Ai (given event B) divided by the sum of the joint probabilities of all possible events (given event B).

In the case of this tutorial, the probability that the woman is a carrier p( A1), given that she is unaffected (event B), is the probability that she would be unaffected if she were a carrier (the joint probability that she is both a carrier and unaaffected) divided by the sum of all the joint probabilities (i.e. that possibility plus the possibility that she is not a carrier and is unaffected).

Which is what I said all along!