Advanced Bayesian Inference Calculator

Turn uncertainty into clear probabilities with evidence instantly. Choose models, enter data, and interpret outcomes. Save tables, share reports, and improve decisions confidently now.

Calculator
All probabilities must be between 0 and 1.
Layout adapts: 3 columns large, 2 medium, 1 mobile.
0 to 12 decimals.
Use automatic evidence when you know P(E|¬H). Use direct evidence when P(E) is already known.

Example: 0.30
How likely the evidence is if H is true.
Needed for Bayes factor and auto evidence.
Used only when “Direct P(E)” is selected.
A strong Bayes factor (BF) moves odds fast. A strong prior dominates when evidence is weak.
Reset
Example data table
Scenario Inputs Expected outputs (approx.)
Single hypothesis P(H)=0.30, P(E|H)=0.80, P(E|¬H)=0.20 P(E)=0.38, P(H|E)=0.631579
Diagnostic test Prev=0.01, Sens=0.99, Spec=0.95 PPV≈0.166667, NPV≈0.999894
Multiple hypotheses H1:(0.5,0.2), H2:(0.3,0.6), H3:(0.2,0.1) Posteriors≈[0.333333, 0.600000, 0.066667]
Beta–Binomial α=2, β=2, n=10, k=8, θ₀=0.5 Mean≈0.714286, CI≈[0.461868,0.909080], P(θ>0.5)≈0.953857
Exact values depend on your chosen precision and inputs.
Formulas used
  • P(H|E) = P(E|H)·P(H) / P(E)
  • P(E) = P(E|H)·P(H) + P(E|¬H)·(1−P(H)) (two-hypothesis evidence)
  • Posterior odds = Prior odds × Bayes factor, where BF=P(E|H)/P(E|¬H)
  • Diagnostic test: PPV=P(D|T+) and NPV=P(¬D|T−) from total probability.
  • Discrete hypotheses: P(Hi|E)=P(Hi)·P(E|Hi)/Σ P(Hj)·P(E|Hj)
  • Beta–Binomial: Beta(α,β) + Binomial(k|n) ⇒ Beta(α+k, β+n−k)
How to use this calculator
  1. Select a model that matches your problem.
  2. Enter probabilities as decimals between 0 and 1.
  3. For “Single hypothesis”, choose direct or automatic evidence.
  4. Click Compute to see results above this form.
  5. Use the export buttons to download CSV or PDF.
FAQs

1) What does the posterior mean?

It is your updated probability after seeing evidence. It combines your prior belief with how strongly the evidence favors each hypothesis.

2) When should I use direct evidence P(E)?

Use it when you already know the overall chance of the evidence, independent of hypotheses. Otherwise, compute evidence from alternative likelihoods.

3) Why do priors get normalized in the multi-hypothesis model?

Posteriors require priors to sum to 1. Normalization keeps ratios intact while ensuring a valid probability distribution.

4) What is a Bayes factor?

It measures how much the evidence shifts odds. A Bayes factor greater than 1 favors the hypothesis; less than 1 favors the alternative.

5) How do PPV and NPV relate to base rates?

Even accurate tests can have low PPV when prevalence is low. Base rates strongly influence post-test probabilities.

6) What is the Beta–Binomial model used for?

It updates uncertainty about an unknown probability, like conversion or defect rate, using success/failure counts and a Beta prior.

7) Are credible intervals the same as confidence intervals?

No. A credible interval directly describes probability about the parameter given your prior and data. Confidence intervals describe repeated-sampling behavior.

8) Why do I sometimes see “Not defined” for MAP?

For Beta posteriors with α≤1 or β≤1, the mode can lie on the boundary. In that case, a single interior MAP value is not defined.

Related Calculators

posterior predictive checkbayesian logistic regressionprior probability calculatorrandom effects bayesianinverse gamma posteriorconjugate prior calculatorbayesian cross validationposterior odds ratiobayesian model evidenceposterior distribution plot

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.