Mihsaba›Bayes’ Theorem Calculator

Bayes’ Theorem Calculator

Update an event probability after new evidence using the prior probability and the likelihood of the evidence when the event is true or false.

The result is mathematical and depends on test assumptions and sampling; it does not replace statistical interpretation of the real context.

How to use

Bayes’ theorem starts with a prior probability and updates it after observing evidence. Enter P(A), the likelihood of the evidence when A is true, and the likelihood when A is false. The calculator returns the posterior and the denominator components so the base-rate effect is visible.

  1. Enter prior P(A) as a percentage.
  2. Enter P(B|A).
  3. Enter P(B|not A).
  4. Read posterior P(A|B) and total evidence probability.

How it is calculated

P(A|B)=P(B|A)P(A)/[P(B|A)P(A)+P(B|¬A)P(¬A)]

Example

Educational example: type A makes up 10% of boxes. Evidence B appears in 80% of A boxes and 20% of non-A boxes. After seeing B, P(A|B)≈30.77%, not 80%.

Important notes

Bayes’ theorem does not validate the inputs. The result is only as sound as the prior and likelihood estimates. This is a general educational calculator, not a medical diagnostic or legal decision tool.

Frequently asked questions

P(B|A) versus P(A|B)?

The first is the chance of evidence given the event; the second is the event probability after observing the evidence.

What is the base rate?

It is prior P(A) before seeing the evidence.

What if P(B)=0?

The posterior is undefined because the denominator is zero.

Can I enter percentages?

Yes. The calculator converts them internally to probabilities from 0 to 1.