CalcDepo

Conditional Probability and Bayes Calculator

Apply Bayes' theorem to update a probability.

Inputs

Results

P(B)0.059
Posterior P(A given B)0.1610169

Chart

Not what you need? Search by intent

Describe what you want to find β€” β€œbayes theorem” β€” and jump to the right calculator.

How to use the conditional probability and bayes calculator

Apply Bayes' theorem to update a probability. Enter prior p(a), p(b given a) sensitivity, p(b given not a) false positive rate in the fields above; the p(b), posterior p(a given b) are computed instantly and plotted on the chart so you can see how the answer changes.

Formula

P(B) = pba Γ— pa+pbn Γ— (1-pa)
Posterior P(A given B) = pba Γ— pa / [P(B)]

Variables

  • pa β€” Prior P(A)
  • pba β€” P(B given A) sensitivity
  • pbn β€” P(B given not A) false positive rate

Worked example

With prior p(a) = 0.01, p(b given a) sensitivity = 0.95, p(b given not a) false positive rate = 0.05, the calculator gives p(b) β‰ˆ 0.059; posterior p(a given b) β‰ˆ 0.1610169.

Frequently asked questions

What is the formula for the conditional probability and bayes calculation?

P(B) = pba Γ— pa+pbn Γ— (1-pa). Posterior P(A given B) = pba Γ— pa / [P(B)]. Here pa is prior p(a), pba is p(b given a) sensitivity, pbn is p(b given not a) false positive rate.

What inputs do I need for the conditional probability and bayes calculator?

You need prior p(a), p(b given a) sensitivity, p(b given not a) false positive rate. Each field is pre-filled with a typical example so you can see how the result responds as you edit the numbers.

How do I use this calculator?

Type values into the input fields. Results and the chart update instantly. Use Reset to restore the example values, Copy results to paste them elsewhere, or Share to copy a link that preserves your inputs.

Is the result exact?

Calculations use standard formulas and double-precision arithmetic, then display about seven significant figures. Real-world measurements carry uncertainty, so treat results as estimates unless your inputs are exact.

Related calculators

More in Statistics & Probability: Mean, Median and Mode Β· Standard Deviation Β· Quartiles and IQR Β· Percentile Β· Z-Score Β· Normal Distribution Probability Β· Inverse Normal Β· Binomial Probability