Skip to content
Advertisement
Hosinger Special Offer

Bayesian Calculator

Bayesian Calculator from Gizcalc helps you estimate results quickly within the Math & Statistics category.

  • Instant results
  • Charts & tables
  • Save & compare
  • Private – runs in your browser
Probability After a Positive Result —

Sample inputs are pre-filled so you can see a result quickly. Results are estimates only and may not be accurate because prices, interest rates, taxes, fees, fuel costs, tariffs, market returns, medical costs, and local rules can change. Please verify current values before making financial, tax, legal, medical, or business decisions.

Formula used

P(C | +) = P(+ | C) × P(C) ÷ P(+)

  • P(C) = the prior probability (base rate)
  • P(+ | C) = sensitivity, the true positive rate
  • P(+) = sensitivity × P(C) + (1 − specificity) × (1 − P(C))

About the Bayesian Calculator

What is the Bayesian Calculator?

Bayes' theorem updates a probability when new evidence arrives. Its classic use is interpreting a test: even an accurate test can give more false positives than true positives when the condition being tested for is rare. The starting probability (the base rate or prior) matters as much as the test's accuracy.

Enter how common the condition is, the test's sensitivity (how often it catches a real case) and specificity (how often it correctly clears a non-case). The calculator gives the probability of the condition after a positive result and after a negative one, and a table showing what happens to 10,000 people.

How to use the Bayesian Calculator

  1. Prior Probability / Base Rate (%) — the base rate before the test — for example, the prevalence of a disease. (sample: 10)
  2. Sensitivity – true positive rate (%) — the percentage of real cases the test correctly flags as positive. (sample: 92)
  3. Specificity – true negative rate (%) — the percentage of non-cases the test correctly reports as negative. (sample: 88)
  4. Press Apply Bayes' Theorem (results also refresh as you type). The result card shows the Probability After a Positive Result, along with P(condition | negative result), Negative predictive value, Chance of a positive result and Positive likelihood ratio.

Formula used

P(C | +) = P(+ | C) × P(C) ÷ P(+)

  • P(C) = the prior probability (base rate)
  • P(+ | C) = sensitivity, the true positive rate
  • P(+) = sensitivity × P(C) + (1 − specificity) × (1 − P(C))

Negative predictive value = specificity × (1 − P(C)) ÷ P(−). The positive likelihood ratio, sensitivity ÷ (1 − specificity), shows how much a positive result raises the odds.

Worked example

These are the sample values already filled in the calculator above, and the result it returns for them:

InputSample value
Prior Probability / Base Rate (%)10
Sensitivity – true positive rate (%)92
Specificity – true negative rate (%)88
ResultValue
P(condition | positive result)46%
P(condition | negative result)1%
Negative predictive value99%
Chance of a positive result20%
Positive likelihood ratio7.67

Tips for using the Bayesian Calculator

  • With a 1% base rate and a 95%-accurate test, a positive result means only about a 16% chance of having the condition.
  • Repeat testing helps: the posterior after one positive becomes the prior for the next test.
  • Beyond medicine, the same logic applies to spam filters, fraud alerts and quality inspection.

Frequently asked questions

The chance something is true after seeing evidence = how likely that evidence is if it is true × how likely it was beforehand ÷ how likely the evidence is overall.

Because the healthy group is so much larger, even a small false-positive rate produces many false positives. With a 10% base rate, 92% sensitivity and 88% specificity, only 46% of positives are real.

Sensitivity is the share of true cases that test positive; specificity is the share of non-cases that test negative.

The probability that someone with a negative result really does not have the condition. In the default example it is 99%.