Bayesian Three-Way Decision Rule Calculator

Turn uncertainty into accept, defer, or reject actions. View posterior risk, thresholds, and evidence instantly. Download results and inspect decision patterns with interactive plots.

Calculator Inputs

Add a clear name for this decision scenario.
Choose direct posterior input or compute it from Bayes terms.
Enter a value from 0 to 1.
Belief before using current evidence.
Probability of evidence under the positive state.
Probability of evidence under the negative state.

Loss Matrix

These six values define the cost of each action under each true state.

Formula Used

The calculator uses Bayesian decision theory with three actions: accept positive, defer, and accept negative.

Posterior from Bayes rule:
P(Positive|E) = [P(Positive) × P(E|Positive)] / [P(Positive) × P(E|Positive) + P(Negative) × P(E|Negative)]
Expected losses:
R(Positive) = λPPp + λPN(1 − p)
R(Boundary) = λBPp + λBN(1 − p)
R(Negative) = λNPp + λNN(1 − p)
Threshold form:
α = (λPN − λBN) / [(λPN − λBN) + (λBP − λPP)]
β = (λBN − λNN) / [(λBN − λNN) + (λNP − λBP)]

In the classic interpretation, accept positive when p ≥ α, accept negative when p ≤ β, and defer otherwise. The final recommendation is always based on the smallest expected loss.

How to Use This Calculator

  1. Enter a case label so your export files are easy to identify.
  2. Choose Direct Posterior Probability if you already know P(Positive|E).
  3. Choose Bayes Components if you want the calculator to derive the posterior from priors and likelihoods.
  4. Fill the six loss values for the three actions under the two true states.
  5. Click Calculate Decision to see the recommended action, threshold values, and expected-loss comparison.
  6. Review the Plotly chart to understand where each action becomes optimal.
  7. Use the CSV or PDF buttons to download a report of the current scenario.

Example Data Table

This sample table uses the default loss matrix: λPP=0, λPN=9, λBP=2, λBN=3, λNP=10, λNN=0.

Scenario Prior P(Positive) P(E|Positive) P(E|Negative) Posterior P(Positive|E) Decision
High evidence 0.60 0.90 0.20 0.870968 Accept Positive
Balanced evidence 0.50 0.60 0.60 0.500000 Defer / Boundary Region
Weak support 0.25 0.40 0.85 0.135593 Accept Negative

Frequently Asked Questions

1) What is a Bayesian three-way decision rule?

It is a decision method with three actions instead of two. You can accept a positive class, accept a negative class, or defer judgment when uncertainty makes immediate classification too costly.

2) Why is there a defer or boundary option?

The defer region is useful when evidence is inconclusive. It lets you postpone a hard classification, request more data, or trigger manual review instead of forcing a risky yes-or-no decision.

3) What do the six loss values represent?

They describe the cost of each action under each true state. For example, λPN is the loss of accepting positive when the true state is negative. Together they shape the optimal rule.

4) Should the losses always be positive numbers?

Usually yes, because losses often represent penalties or costs. The calculator can still process other values, but unusual numbers may produce thresholds outside the standard 0 to 1 range.

5) When should I use direct posterior input?

Use it when your model already outputs a posterior probability. This is common in scoring systems, probabilistic classifiers, or Bayesian workflows where P(Positive|E) is already known.

6) When should I use Bayes components instead?

Use Bayes components when you know the prior probability and the evidence likelihoods for both states. The calculator then derives the posterior before comparing decision risks.

7) What does the Plotly graph show?

It plots expected loss for each action across posterior values from 0 to 1. The lowest curve at any point indicates the best action under your current loss matrix.

8) Why can the threshold region differ from the final recommendation?

That usually happens when the loss setup is nonstandard. The calculator always trusts the exact minimum expected loss first, then reports any mismatch as an interpretation note.

Related Calculators

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.