Bayes' Theorem Calculator

Bayes' Theorem

Bayes' Theorem tells you how to update the probability of a hypothesis (H) after observing some evidence (E). It is usually written as:

\[ P(H \mid E) = \frac{P(E \mid H) \, P(H)}{P(E)} \]

In practice, the overall probability of the evidence, P(E), is rarely known directly. The evidence can arise in two mutually exclusive ways: either the hypothesis is true or it is false. So the law of total probability lets us expand it as:

\[ P(E) = P(E \mid H) \, P(H) + P(E \mid \neg H) \, (1 - P(H)) \]

Substituting this into the denominator gives the form this calculator uses. Every term in it is one of the three inputs above:

\[ P(H \mid E) = \frac{P(E \mid H) \, P(H)}{P(E \mid H) \, P(H) + P(E \mid \neg H) \, (1 - P(H))} \]