Bayes's theorem, named after Thomas Bayes, gives the probability of a cause given the occurrence of its effect.
Formally,
given events with ,
And more generally,
let be a set of mutually exclusive and collectively exhaustive events. Then
Proof
Let be events with .
By the definition of conditional probability,
Rearranging both equations,
setting both sides equal to each other,
dividing both sides by ,
Now let be a set of mutually exclusive and collectively exhaustive events.
By the law of total probability,
Therefore,
QED.