Calculator Inputs
Enter priors and evidence likelihoods for two competing hypotheses. Leave Prior P(H0) blank if you want the calculator to use 1 − P(H1).
Example Data Table
| Scenario | Prior P(H1) | Prior P(H0) | P(E|H1) | P(E|H0) | Bayes Factor | Posterior Ratio | Posterior P(H1) |
|---|---|---|---|---|---|---|---|
| Positive diagnostic test | 0.15 | 0.85 | 0.92 | 0.08 | 11.500000 | 2.029412 | 0.669903 |
| Fraud detection alert | 0.05 | 0.95 | 0.80 | 0.10 | 8.000000 | 0.421053 | 0.296296 |
| Manufacturing defect signal | 0.20 | 0.80 | 0.70 | 0.25 | 2.800000 | 0.700000 | 0.411765 |
These examples show how the same evidence can move posterior support differently when prior beliefs and false-positive rates change.
Formula Used
Prior Odds = P(H1) / P(H0)
Bayes Factor = P(E | H1) / P(E | H0)
Posterior Ratio = Posterior Odds = Prior Odds × Bayes Factor
P(H1 | E) = [P(E | H1) × P(H1)] / {[P(E | H1) × P(H1)] + [P(E | H0) × P(H0)]}P(H0 | E) = 1 − P(H1 | E)
log10 Posterior Ratio = log10(P(H1 | E) / P(H0 | E))ln Posterior Ratio = ln(P(H1 | E) / P(H0 | E))
How to Use This Calculator
- Select whether your inputs are decimals or percentages.
- Name the competing hypotheses and the observed evidence.
- Enter the prior probability for H1, and optionally H0.
- Enter the evidence likelihood under both hypotheses.
- Choose your preferred decimal precision and submit the form.
- Review posterior odds, posterior probabilities, and interpretation.
- Download a CSV file for spreadsheet work or generate a PDF report.
Frequently Asked Questions
1. What does the posterior probability ratio measure?
It compares the updated support for one hypothesis against another after evidence is observed. A value above one favors H1, while a value below one favors H0.
2. How is this different from a posterior probability?
Posterior probability gives the updated probability of one hypothesis alone. Posterior ratio compares both hypotheses directly and is useful for odds-based interpretation and decision thresholds.
3. Why do prior probabilities matter so much?
Priors encode what was believed before the new evidence arrived. Strong evidence can shift beliefs sharply, but weak evidence may not overturn a highly skeptical starting position.
4. What is the Bayes factor in this calculator?
The Bayes factor is the likelihood ratio. It measures how much more compatible the evidence is with H1 than with H0 before the prior odds are applied.
5. Can I leave P(H0) empty?
Yes. If you leave it blank, the calculator automatically sets P(H0) equal to 1 minus P(H1). This is useful for two-hypothesis comparisons.
6. What happens if P(E|H0) is zero?
The likelihood ratio becomes infinite when P(E|H1) remains positive. That means the evidence perfectly excludes H0 under the supplied model assumptions.
7. When should I use log posterior ratios?
Log ratios are useful when odds span many orders of magnitude. They make extreme support easier to compare, plot, and communicate in modeling workflows.
8. Is this calculator suitable for diagnostics and classification?
Yes. It is useful for diagnostics, fraud screening, anomaly detection, A/B testing interpretation, and any setting where evidence updates beliefs between competing hypotheses.