Let H be a [random_variable variable] in P for the true hypothesis, and let Hk be the possible values of H, such that Hk is Mutually exclusive and exhaustive. Then, Bayes' theorem states:
P(Hi∣e)=P(e∣Hi)⋅P(Hi)∑kP(e∣Hk)⋅P(Hk),
with a proof that runs as follows. By the definition of Conditional probability,
P(Hi∣e)=P(e∧Hi)P(e)=P(e∣Hi)⋅P(Hi)P(e)
By the law of [law_of_marginal_probability marginal probability]:
P(e)=∑kP(e∧Hk)
By the definition of conditional probability again:
P(e∧Hk)=P(e∣Hk)⋅P(Hk)
Done.
Note that this proof of Bayes' rule is less general than the proof of the odds form of Bayes' rule.
Example
Using the Diseasitis example problem, this proof runs as follows:
P(sick∣positive)=P(positive∧sick)P(positive)=P(positive∧sick)P(positive∧sick)+P(positive∧¬sick)=P(positive∣sick)⋅P(sick)(P(positive∣sick)⋅P(sick))+(P(positive∣¬sick)⋅P(¬sick))
Numerically:
3/7=0.180.42=0.180.18+0.24=90%∗20%(90%∗20%)+(30%∗80%)
Using red for sick, blue for healthy, and + signs for positive test results, the proof above can be visually depicted as follows:
%todo: if we replace the other Venn diagram for the proof of Bayes' rule, we should probably update this one too.%