### Bayes' Theorem

Bayes' Theorem evaluates the probability of an event conditional upon another event of known probability having taken place.

Suppose B1, ..., Bn are a set of mutually exclusive events coving the entire sample space and A is an event that has been observed.

The probability that the event Bj is the causal event giving rise to A, i.e. the probability of Bj conditional upon A, is given by Bayes' theorem, which states:

 Pr(Bj | A) = Pr(Bj) Pr(A | Bj) Pr(Bi) Pr(A | Bi)
• A set of mutually exclusive sets is randomly generated (the number of sets also varies). These sets are called Bi for i (0, ..., n}.
• A set A is randomly generated from the union of the Bi's.
• A table is displayed showing:
• The i for each set on line 1.
• Pr(Bi) for each i on line 2.
• Pr(A | Bi) for each i on line 3.
• The user is given the option to select which of the mutually exclusive sets they would like to use to calculate the probability that this set caused the event A.
• Once a set is chosen, the user clicks the "Calculate Conditional" button and Bayes' Theorem gives the result.
• If the "show work" checkbox was checked, then the steps used in this calculation are also shown.
• All work is done using fractions to give an idea of where the numbers come from.

Your browser does not support the canvas element.