Bayesian Sensitivity Analysis Calculator

Test posterior changes with Bayes sensitivity scenarios. Adjust priors, hit rates, and false alarms easily. See scenario tables, graphs, and exports for clearer decisions.

Calculator Inputs

Initial belief before observing evidence.
Probability of evidence given the hypothesis is true.
Probability of evidence when the hypothesis is false.
Choose the evidence state used for the primary posterior.
Select the input to sweep across a range.
Control output precision for results and tables.
Lower value in the analysis sweep.
Upper value in the analysis sweep.
Number of equally spaced scenarios in the sweep.

Example Data Table

Case Prior (%) Sensitivity (%) False Positive Rate (%) Evidence Posterior (%)
Medical Screen A 20.00 90.00 10.00 Positive 69.23
Audit Signal B 35.00 85.00 15.00 Positive 75.32
Quality Check C 50.00 70.00 5.00 Negative 24.00

Formula Used

Positive evidence posterior

P(H|E) = [P(E|H) × P(H)] / {[P(E|H) × P(H)] + [P(E|¬H) × P(¬H)]}

Negative evidence posterior

P(H|¬E) = [P(¬E|H) × P(H)] / {[P(¬E|H) × P(H)] + [P(¬E|¬H) × P(¬H)]}

Supporting definitions

P(¬H) = 1 − P(H)

P(¬E|H) = 1 − Sensitivity

Specificity = 1 − False Positive Rate

Bayes Factor (positive) = Sensitivity / False Positive Rate

The sensitivity analysis repeatedly recalculates the posterior while sweeping one chosen input through a fixed range. This reveals which assumption drives the strongest change in posterior belief.

How to Use This Calculator

  1. Enter the prior probability of the hypothesis before observing evidence.
  2. Provide sensitivity and false positive rate as percentages.
  3. Select whether the observed evidence is positive or negative.
  4. Choose which input you want to test in the sensitivity sweep.
  5. Set the start, end, and number of scenario steps.
  6. Press the calculate button to view the summary, table, and graph.
  7. Use the CSV or PDF buttons to export the current scenario analysis.

FAQs

1. What does prior probability mean?

It is your starting belief about the hypothesis before new evidence arrives. Bayesian updating adjusts this value using the reliability of the observed evidence.

2. Why is false positive rate important?

A high false positive rate weakens positive evidence. Even strong sensitivity can produce misleading posteriors if false alarms are common.

3. What is the difference between sensitivity and specificity?

Sensitivity measures how often true cases generate positive evidence. Specificity measures how often false cases correctly remain negative.

4. Why can a positive result still give a modest posterior?

When the prior is low or false positives are frequent, positive evidence may not raise belief as much as expected. Base rates matter greatly.

5. What does the scenario spread show?

It shows the distance between the smallest and largest posterior in the sensitivity sweep. Larger spread means stronger dependence on that input.

6. When should I analyze negative evidence?

Use negative evidence when you want to see how a failed signal, missed test, or absent observation changes belief about the hypothesis.

7. What does Bayes factor tell me?

It measures how strongly the evidence shifts odds. Values above one support the hypothesis more strongly than the alternative.

8. Can I use this for risk, diagnostics, or forecasting?

Yes. The same framework works for medical tests, fraud screening, equipment failure alerts, legal evidence, and many forecasting problems.

Related Calculators

posterior predictive checkbayes rule calculatorbayesian logistic regressiondeviance information criterionbayesian t testprior probability calculatorrandom effects bayesianinverse gamma posteriorconjugate prior calculatorbayesian hypothesis test

Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.