Bayesian Conditional Probability & Prior Solver

Bayes' Theorem Conditional Probability Solver

Compute posterior probability P(A|B) from prior probabilities, test sensitivity, and false positive base rates.

Posterior P(A|B)
16.10%

Probability condition A holds given test +

Total Positive P(B)
5.90%

Marginal probability of testing positive

Base Rate Fallacy Gap
78.9%

Difference between sensitivity & actual certainty

At a Glance

Category
Probability
Best For
Students, clinicians and analysts interpreting test results
Privacy
100% in your browser: nothing you enter is uploaded
Time Required
Under a minute
Cost
Free
Updated
November 2026

Quick Overview

What This Tool Does

Combines a prior probability with the likelihood of the evidence to give the updated (posterior) probability.

Who Should Use It

Students of probability, medical and diagnostic professionals, data scientists.

When to Use It

When interpreting a positive screening test, spam filter or any evidence-based update.

Why It Is Useful

Intuition often ignores how rare the condition is. Bayes' theorem corrects that base rate fallacy.

Key Features & Capabilities

Posterior probability

The updated probability after the evidence.

Marginal probability

The overall chance of a positive result.

Base rate effect

Shows how a rare event dilutes a positive result.

How to Use This Tool

1

Enter the prior

Type the base rate of the event as a percentage. Tip: Use real prevalence data.

2

Enter sensitivity

The chance of a positive result when the event is true. Tip: Also called the true positive rate.

3

Enter the false positive rate

The chance of a positive result when the event is false. Tip: One minus specificity.

4

Read the posterior

Compare it with the prior and with the sensitivity. Tip: A low prior keeps the posterior low.

Worked Real-World Example

A 95% accurate test for a 1% condition

A condition affects 1% of people. A test has 95% sensitivity and a 5% false positive rate.

Sample Inputs
Prior P(A)1 %
Sensitivity P(B|A)95 %
False positive P(B|¬A)5 %
P(A|B)16.1%
Calculation Breakdown
True positives: 0.95 × 0.01 = 0.0095
False positives: 0.05 × 0.99 = 0.0495
Probability of a positive result: 0.0095 + 0.0495 = 0.059 (5.9%)
Posterior: 0.0095 ÷ 0.059 = 16.1%
Out of every 1,000 people, about 59 test positive but only 9.5 truly have the condition. Most positives are false because the condition is rare.

How It Works (Math & Calculation Logic)

P(B) = P(B|A) × P(A) + P(B|¬A) × P(¬A). P(A|B) = P(B|A) × P(A) ÷ P(B). Inputs are percentages converted to probabilities.

Formula / AlgorithmP(A|B) = P(B|A) × P(A) ÷ P(B)
Variable & Logic Definitions
P(A)Prior - Base rate of the event
P(B|A)Sensitivity - Positive if event true
P(B|¬A)False positive rate - Positive if event false

How to Interpret Your Results

Typical Benchmarks

The posterior depends strongly on the prior.

Evaluating Your Output

A test with 95% sensitivity is not 95% reliable after a positive result when the base rate is low.

Recommended Next Action

Use real base rates, and confirm positives with a second independent test.

Frequently Asked Questions

What is Bayes' theorem?
A formula for updating a probability after new evidence.
What is the base rate fallacy?
Ignoring how rare an event is when interpreting evidence.
What is sensitivity?
The chance a test is positive when the condition is present.
Why is the posterior so low?
Because most people do not have the condition, false positives outnumber true ones.
What is positive predictive value?
The posterior probability after a positive result.

Complementary QuickForma Utilities

Mathematics & Statistics

Percentage Calculator

Calculate percentages, percentage values, percentage increases, decreases, and percentage differences easily.

Open Tool
Mathematics & Statistics

Fraction Calculator

Add, subtract, multiply, divide, simplify, convert, and compare fractions with step-by-step mathematical precision.

Open Tool
Mathematics & Statistics

Marks & Percentage Converter

Convert raw test/exam marks into percentage scores, US letter grades, and 4.0 GPA points.

Open Tool
Mathematics & Statistics

Ratio & Proportion Calculator

Solve for missing variable x in A:B = C:X or simplify complex multi-part ratios into lowest terms.

Open Tool
Mathematics & Statistics

Average Calculator

Calculate arithmetic mean, total sum, count, min, and max values from a numeric dataset.

Open Tool
Mathematics & Statistics

Exponent & Logarithm Calculator

Calculate base-10 log (log10), natural log (ln), custom base log (log_b(x)), and power exponentiation.

Open Tool
Mathematics & Statistics

Probability Calculator

Calculate single-event, joint intersection P(A and B), union P(A or B), and complement probabilities.

Open Tool
Mathematics & Statistics

Permutation & Combination Calculator

Calculate permutations nPr (order matters) and combinations nCr (order does not matter).

Open Tool
Mathematics & Statistics

Binomial Probability Calculator

Calculate exact probability P(X = k), at least P(X >= k), and at most P(X <= k) for Binomial distributions.

Open Tool
Mathematics & Statistics

Chi-Square Goodness-of-Fit & Independence Test

Calculates Chi-Square statistic (chi²), degrees of freedom, and p-value for contingency tables.

Open Tool
Mathematics & Statistics

Poisson Event Probability & Rate Solver

Online client-side Poisson Event Probability & Rate Solver tool.

Open Tool
Science & Engineering

Henderson-Hasselbalch Buffer pH Solver

Online client-side Henderson-Hasselbalch Buffer pH Solver tool.

Open Tool