The detector that is right about faults and wrong about this fault
A maintenance team receives a red alert from a detector with 90 per cent sensitivity. The alert sounds compelling. Yet, in the population being monitored, fewer than one alert in ten points to a real fault.
Consider 1,000 newly installed pump bearings. Historical inspection shows that about 1 per cent, or 10 bearings, carry the defect of interest. The detector signals on 90 per cent of defective bearings, so it catches 9 of those 10. It also signals on 9 per cent of sound bearings. Among the remaining 990 bearings, that produces about 89 false alerts. The team therefore sees roughly 98 red alerts: 9 genuine and 89 false.
The detector's sensitivity has not changed. Its false-positive rate has not changed. The arithmetic has not accused the detector of poor engineering. The surprise comes from asking a different conditional question. Sensitivity is P(alert | fault). The team needs P(fault | alert). Those expressions reverse the condition, and reversal changes the answer because the population contains far more sound bearings than faulty ones.
Scroll within the figure on a small screen to inspect every label.
Bayes' rule keeps three accounts separate: what was plausible before the evidence, how much the evidence favours one hypothesis over another, and what becomes plausible after the update. The opening belief is the prior. The evidence's directional weight is a likelihood ratio. Their product, expressed in odds, is the posterior. Confusing any two of these accounts produces a conclusion that may sound numerate while answering the wrong question.
Thomas Bayes's posthumous 1763 essay addressed an inverse problem: how observed outcomes should change uncertainty about an underlying chance.[1] Modern Bayesian practice is much larger than one equation, but the equation's durable engineering value is modest and exact. It gives a conservation rule for belief change. A posterior may move far only when the starting position or the observed evidence earns that movement.
The natural-frequency rendering above is more than a teaching ornament. Gigerenzer and Hoffrage showed that frequency formats can make Bayesian computations simpler for human reasoners, and later work has continued to examine when frequencies or odds and likelihood ratios best support single and sequential inferences.[6][12] The two representations serve different jobs. Frequencies expose the denominator in one update. Odds and likelihood ratios make a long sequence of updates compact. A serious system should be able to translate between them.
The argument of this article is therefore narrower than a defence of Bayesian philosophy. A consequential posterior should be treated as the closing balance of an inspectable evidence ledger. That ledger must name the hypotheses, prior population, evidence-generating process, dependency structure, update calculation and decision threshold. Without those entries, the posterior is merely a number with missing provenance.
The three accounts in every update
Bayes' rule becomes intuitive once probability is converted into odds. The prior establishes a starting balance. The likelihood ratio records one evidence transaction. The posterior is the balance after that transaction.
The prior is a population claim
In the bearing example, the prior probability of a fault is 0.01. That number does not express an attitude such as optimism or pessimism. It refers to a defined class of bearings under defined installation, inspection and time conditions. Change the supplier, age, operating temperature or defect definition and the relevant prior can change. A prior without its reference population is an orphaned number.
Convert probability p into odds by comparing the probability that the hypothesis is true with the probability that it is false:
Odds are useful because evidence can multiply them directly. A probability scale is bounded between zero and one, so equal numerical additions do not have equal meaning near its centre and edges. Odds measure relative support. Log-odds, introduced shortly, turn multiplication into addition.
The prior can come from historical rates, a hierarchical model, an earlier posterior, expert elicitation or a policy-defined reference class. Each source creates different obligations. Historical rates need temporal and population fit. Elicited priors need an elicitation protocol and sensitivity range. An earlier posterior needs lineage showing that the old evidence remains applicable and has not re-entered the new update through another route.
The likelihood ratio is directional evidence
Let E denote a positive alert. The alert's positive likelihood ratio compares how often that alert would appear under two rival states:
For the detector, P(alert | fault) is 0.90 and P(alert | sound) is 0.09. The likelihood ratio is therefore 10. A red alert is ten times as likely when the bearing is faulty as when it is sound. That is substantial evidence. It still begins from odds of 1 to 99, so multiplying by ten produces odds of 10 to 99, which convert to about 9.2 per cent.
A likelihood ratio of one is neutral: the evidence is equally likely in both states. A value above one supports H relative to the stated alternative. A value below one supports the alternative. This direction matters. The same observation can favour a hypothesis against one rival and barely distinguish it from another. Evidence never carries weight in isolation from a comparison.
Even a correctly defined ratio is an estimated quantity with modelling choices and uncertainty. Iyer and Lund's NIST analysis cautions against treating an expert's likelihood ratio as a theory-free transfer of evidential weight to a separate decision maker; its fitness depends on an explicit lattice of assumptions and uncertainty characterisation.[18] The operational lesson is direct: record the model, denominator, uncertainty and intended decision context beside the multiplier.
Neyman and Pearson's 1933 work established the central role of likelihood ratios in testing simple hypotheses under controlled error constraints.[2] Bayesian posterior odds and frequentist likelihood-ratio tests use related mathematical objects for different inferential contracts. The posterior combines a prior with relative evidence. A Neyman-Pearson test can choose a rejection rule with a specified long-run error property without assigning a posterior probability to a hypothesis. The distinction prevents one framework's guarantees from being imported into the other.
The posterior is a conditional claim
Once the odds are updated, convert them back into probability:
The posterior is conditional on everything encoded in the model: the hypothesis definition, prior reference class, detector behaviour, observed result and assumptions about how the evidence was sampled. It does not certify that those conditions are true. A perfectly executed calculation over a misspecified model can be precisely wrong.
That boundary is easy to miss when a system emits only a final score. A score of 0.62 could arise from a weak prior plus strong independent evidence, a strong prior plus neutral evidence, or a duplicated signal counted several times. These routes have different fragility. The closing balance is interpretable only with the transaction history that produced it.
Natural frequencies and odds solve different cognitive problems
The 1,000-bearing table exposes the denominator that probability notation can hide. It shows 9 true alerts beside 89 false alerts in one population. This format prevents a reader from silently replacing the question “How many alerted bearings are faulty?” with “How many faulty bearings alert?” Research on diagnostic reasoning has repeatedly found that people struggle with this inversion, including trained professionals, when the relevant base rates and conditional probabilities are presented abstractly.[5]
Natural frequencies are therefore an excellent inspection view for a single update. They expose sample size, prevalence, hits, misses, false alerts and true negatives. They also reveal when rounded percentages imply impossible or unstable counts. A reviewer can ask whether ten faults were observed or merely expected, whether the false-positive estimate came from 990 sound cases or ninety, and whether the reference sample resembles the current population.
Odds and likelihood ratios serve the next problem: carrying evidence through a sequence without rebuilding a full frequency tree after every observation. A 2025 preregistered crossover trial found a nuanced format effect: natural frequencies better supported single-test positive predictive value in the tested participants, while odds and likelihood ratios better supported the sequential calculation used in that study.[12] The result does not establish one universally superior notation. It suggests a design rule.
Use natural frequencies to audit the ingredients of an update, then use odds to transport those ingredients through time. A well-designed interface should let a reviewer switch views. The frequency view answers “Where did this multiplier come from?” The odds ledger answers “What did this multiplier do after the evidence already recorded?” Keeping both views available reduces the chance that compact mathematics conceals a weak denominator or that a large frequency tree obscures a long sequential trajectory.
Evidence is a multiplier, not a verdict
A likelihood ratio records movement between rival explanations. On a log-odds scale, each item contributes a signed increment. This makes a sequence of updates readable as an evidential trajectory rather than a succession of opaque scores.
The likelihood-ratio balance
Take logarithms of the odds identity. Multiplication becomes addition:
This form reveals a useful geometry. Evidence does not drag belief directly to a fixed probability. It moves belief by a distance. The same evidence increment has the same weight wherever the process starts, while its visible effect on probability varies because the probability scale compresses near zero and one.
Scroll within the figure on a small screen to inspect every label.
The visual gain is operational. A reasoning trace can record an initial log-odds value, then one signed increment per admissible evidence item. Reviewers can see which item produced a large movement, which item contradicted the current hypothesis, and whether a threshold crossing depended on one fragile transaction.
Abraham Wald's work on sequential tests formalised decisions that continue sampling until accumulated likelihood evidence reaches a stopping boundary.[3] A Bayesian workflow may use different loss functions and posterior thresholds, but the same sequential discipline is valuable: observe, update, check whether another observation is worth its cost, then stop, defer or gather more evidence. The order is controlled by the decision problem, not by a ritual demand to collect every possible signal.
The same evidence can produce different posterior probabilities
The thought experiment's two factories can be plotted across a continuum of priors. With a fixed likelihood ratio of ten, the posterior is below 10 per cent when the prior is 1 per cent, equals 50 per cent when the prior odds are 1 to 10, and exceeds 90 per cent only when the prior is already above about 47 per cent. Strong evidence can still leave a rare hypothesis unlikely.
This is the mechanism behind base-rate neglect. People can focus on how representative an observation seems and underweight how often the underlying state occurs. Kahneman and Tversky documented prior-probability neglect in prediction tasks, while later sequential work has modelled how underweighting the base rate shapes entire belief trajectories.[4][11] The error is not cured by attaching more decimal places to a test score. The missing account must be restored.
A sequence is one joint update written in stages
For evidence items E1 through En, the exact sequential identity conditions each new likelihood ratio on the evidence already seen:
Taking logs gives one opening balance plus a sum of conditional evidence weights. If the likelihood model is coherent and the same complete evidence set is used, changing the presentation order does not change the final posterior. It changes only the intermediate path. Order effects in human judgement or software often signal approximation, forgotten conditioning, changing hypotheses or evidence that was selected in response to earlier results.
Simple likelihood ratios and Bayes factors
The bearing example compares two simple states with fixed test behaviour. Real hypotheses often contain unknown parameters or several mechanisms. A Bayes factor extends the same posterior-odds logic by averaging each model's likelihood over its parameter prior. Kass and Raftery give the standard account of Bayes factors as data-based multipliers between models.[7]
The distinction matters because a Bayes factor depends on the model and parameter priors inside each hypothesis, while a simple likelihood ratio may compare fixed distributions. Calling both “the evidence score” hides different sensitivities. The ledger should name the exact object: a measured diagnostic likelihood ratio, a model-based conditional likelihood ratio, a Bayes factor, or an estimated classifier score calibrated to posterior probability.
The arithmetic is compact because the model carries the complexity. That is a strength when the model is explicit and checked. It is a risk when assumptions disappear behind a single multiplier.
flowchart LR A["The detector that is right<br/>about faults and wrong about<br/>this fault"] --> B["The three accounts in every update"] B --> C["Evidence is a multiplier, not<br/>a verdict"] C --> D["The clean multiplication trap"] D -. "re-test" .-> A classDef first fill:#0a1424,stroke:#007D68,stroke-width:2px,color:#e6f3ff classDef step fill:#0a1424,stroke:#3f7da0,stroke-width:1px,color:#e6f3ff class A first class B,C,D step
The clean multiplication trap
Multiplying marginal likelihood ratios is exact only under the right dependence structure. Two messages can look like two observations while carrying one underlying piece of information.
Independence is a model claim, not a formatting fact
Suppose a vibration monitor raises an alert and a second dashboard raises “bearing instability”. If both messages were derived from the same accelerometer window, the second message may add little evidence beyond the first. Treating the labels as separate tests and multiplying their marginal likelihood ratios counts the shared telemetry twice.
The safe sequential identity already showed the repair: use the likelihood of the second item conditional on the first. If the second alert is almost guaranteed once the first has fired under both hypotheses, its conditional likelihood ratio will be close to one. Its visible drama does not create additional discrimination.
Scroll within the figure on a small screen to inspect every label.
This is not a merely theoretical concern. van Walraven and colleagues showed that combining correlated serial diagnostic tests under an independence assumption can overestimate disease probability, with the error increasing as correlation rises.[10] Work on likelihood ratios for multiple pieces of evidence likewise treats dependence as a joint modelling problem rather than a licence to multiply convenient marginal values.[17] The same mechanism appears in machine intelligence systems when several agents retrieve the same document, several classifiers consume the same embedding, or a model's explanation is later reintroduced as though it were fresh evidence.
A multi-agent system is especially vulnerable because organisational separation can masquerade as epistemic separation. Agent A and Agent B may have different names, prompts and roles while sharing the same model, context packet and retrieval result. Agreement then measures repeated processing of one evidence stream, not independent corroboration. The evidence ledger must carry source lineage far enough to reveal common ancestry.
Worked scenario: an account-takeover investigation
The example also shows why evidence and action should remain separate. A 62 per cent posterior does not, by itself, specify whether to hold a payment, request authentication, create a review task or continue monitoring. Those actions depend on loss, reversibility, customer harm, review capacity, legal constraints and the value of another observation.
Negative control: when a ledger adds no predictive advantage
A calibrated discriminative model can estimate P(H|x) directly from the full feature vector. It need not decompose the answer into hand-authored likelihood ratios. On a stable task with representative data, complete features and a reliable calibration set, such a model may match or outperform a naive generative decomposition. Ng and Jordan's comparison of logistic regression and naive Bayes illustrates that generative and discriminative classifiers can occupy different sample-size and asymptotic regimes.[16]
This is the article's serious negative control. Train a joint discriminative model and a decomposed evidence-ledger model on the same synthetic or public task. Match data, feature access and tuning budget. Compare calibration, log loss, decision cost and shift performance. If the direct model is equally accurate, equally stable and can provide sufficient provenance through other means, the ledger has not earned a predictive superiority claim.
The ledger can still earn its place through compositional updating, sensitivity analysis, intervention planning or auditability. Those are separate benefits and should be measured separately. Evidence accounting is an operating discipline, not a guarantee that a generative classifier will win.
Bayes' rule cannot check its own premises
The identity always returns an answer when its inputs are numeric. It does not know whether the likelihood model can reproduce relevant patterns in the observed data. Posterior predictive assessment provides one family of checks: simulate replicated data from the fitted model and compare decision-relevant discrepancies with what was observed.[8] Stan's official documentation turns this principle into an implementation workflow for prior and posterior predictive checks.[15]
Prior-data conflict requires another check. Evans and Moshonov describe methods for asking whether observed data are surprising under the prior predictive distribution.[9] A conflict does not automatically prove that the prior is wrong; the sampling model may also be inadequate. It does tell the reviewer that the opening balance and evidence model are pulling from poorly overlapping worlds.
Scroll within the figure on a small screen to inspect every label.
From posterior to governed decision
A posterior belongs to reasoning. An action belongs to a decision system with costs, authority, reversibility and recovery. The evidence ledger should connect the two without collapsing them.
A probability does not contain a decision
Suppose two maintenance actions face the same 62 per cent posterior fault probability. Replacing a bearing costs little and prevents a catastrophic failure in the first machine. Stopping the second machine would interrupt a critical process, while a non-invasive inspection is available within minutes. The appropriate actions differ even though the inference is identical.
Decision theory adds utilities or losses to uncertain states and candidate actions. A simple rule chooses the action with the lowest expected loss, provided the loss model is adequate and the decision right is clear. In an operational system, the rule also needs constraints: who may act, how long the evidence remains fresh, whether the action is reversible, what confirmation is required, and how the effect will be verified.
Bayes' rule updates belief; it does not grant authority. A model proposal may cross an evidential threshold while still requiring deterministic permission checks, human approval or another observation. The threshold should appear in the ledger as a decision policy, not be smuggled into the probability model.
The typed evidence-update receipt
A production system should preserve enough structure to reconstruct why the posterior moved. The smallest useful record is not a free-form explanation. It is a typed receipt whose fields have declared meanings, units and provenance.
| Field | Required content | Failure it blocks |
|---|---|---|
| Hypothesis setH and named alternatives | Operational definitions, scope and exclusions | Posterior over an incomplete or shifting question |
| Prior recordOpening probability or odds | Population, valid time, source, uncertainty and owner | Base rate imported from the wrong cohort or period |
| Evidence eventWhat was observed | Raw source, transformation lineage, timestamp and selection route | Repeated claims presented as fresh observations |
| Evidence modelRelative likelihood | P(E|H), P(E|alternative), LR or Bayes factor, with validation scope | Inverse-probability fallacy or unsupported multiplier |
| Dependence recordRelationship to prior evidence | Independent, conditionally modelled, joint, duplicated or unresolved | Naive multiplication of correlated signals |
| Posterior and sensitivityClosing balance | Point value plus plausible range under prior and likelihood stress | False precision and hidden prior dominance |
| Decision policyPermitted next step | Threshold, loss rationale, authority, expiry and recovery path | A probability silently becoming an action |
Scroll within the table on a small screen to inspect every column.
Diagnostic-accuracy reporting standards such as STARD emphasise transparent descriptions of participants, index tests, reference standards and analysis because test performance is inseparable from study design and population.[13] Cochrane's diagnostic-test-accuracy handbook similarly treats applicability, bias and between-study variation as central to interpreting evidence.[14] An AI or agentic evidence ledger should preserve equivalent scope information rather than copying a sensitivity or likelihood ratio from a paper into a new environment without a transport argument.
Scroll within the figure on a small screen to inspect every label.
A six-question decision instrument
Before accepting a posterior in research, architecture or governance, ask six questions in order. Each question can stop the release. The order matters because a precise calculation should not distract from an ill-posed hypothesis or inapplicable prior.
- What exactly are the competing worlds? Define H, the alternative and any material third state. If “not H” combines mechanisms with radically different evidence behaviour, split the alternative or use a richer model.
- Where did the opening odds come from? Name population, time, sampling route and uncertainty. Recalculate under a plausible prior range when the reference class is contested.
- What process generated this observation? Preserve raw evidence, transformations and selection. A model-generated summary is evidence about its source only through a validated extraction or inference process.
- How was evidential weight estimated? Record numerator, denominator, sample sizes, uncertainty, calibration and applicable operating region. Avoid transporting average test characteristics into a subgroup without evidence.
- What has already been counted? Trace common sources, shared models, derived features and feedback. Use joint or conditional likelihoods when independence does not hold.
- Which decision changes, and under whose authority? Overlay losses, thresholds, reversibility and evidence freshness. Verify the action's effect separately from the inference that proposed it.
This instrument changes architecture. The prior belongs in versioned world state or a governed parameter store, not inside an untraceable prompt. Evidence events need provenance identifiers. Conditional likelihood logic belongs in a testable deterministic or statistical component. The posterior and its sensitivity range belong in a decision receipt. Authority checks remain outside the probabilistic updater.
Sensitivity before certainty
When priors or likelihood ratios are uncertain, compute a range rather than selecting one convenient point. In the account-takeover scenario, suppose the prior could plausibly lie between 1 and 4 per cent and the joint device evidence LR between 6 and 10. Before the independent beneficiary event, the posterior spans roughly 5.7 to 29.4 per cent. That range may cross a review threshold even when the point estimate does not.
Sensitivity analysis also reveals where measurement effort has value. If the posterior is stable across the credible prior range but swings sharply with the dependency correction, invest in joint evidence validation. If uncertainty is dominated by the base rate after a population shift, collect current prevalence data. More precision on a weak, non-dominant term may not change the decision.
Open hypothesis: ledgers should improve repair, not merely explanation
A falsifiable prediction follows. When a compound AI system's posterior becomes miscalibrated after a source, population or dependency change, teams using typed evidence-update receipts should locate and repair the responsible assumption faster than teams retaining only final scores and free-form rationales. The hypothesis would be weakened if both groups diagnose faults equally quickly, or if receipt maintenance cost exceeds the avoided decision loss.
A useful experiment would inject four faults into matched pipelines: stale prior, shifted likelihood, duplicated evidence and missing alternative. Measure time to detection, localisation accuracy, posterior recovery and operator confidence calibration. The artefact below provides a small environment for the duplicated-evidence case.
Sequential diagnosis simulator
The simulator treats a machine fault as the hypothesis and applies synthetic likelihood ratios in sequence. It can respect declared source dependence or make the deliberately unsafe assumption that every visible alert is conditionally independent. The positive case uses genuinely separate observations. The negative case sends the same vibration stream through two classifiers.
Evidence-ledger laboratory
Change one causal feature at a time. All values are synthetic and intended for reasoning, testing and education.
| Step | Evidence | Provenance / dependency | LR used | Posterior |
|---|---|---|---|---|
| 0 | Opening prior | Selected reference population | 1.00 | 1.00% |
| 1 | Temperature spike: positive | Independent temperature probe | 5.00 | 4.81% |
| 2 | Oil-debris assay: positive | Independent laboratory channel | 12.00 | 37.74% |
Decision zones are illustrative: below 10% observe; 10% to below 60% inspect and verify; 60% or above temporarily isolate and verify. They are not maintenance guidance or a validated policy.
Assumptions and expected tests
The simulator compares a fault hypothesis with a single “no fault” alternative. Likelihood ratios are fixed synthetic inputs rather than estimates with uncertainty. Dependency handling is intentionally simple: the second selected item from the vibration source receives a conditional likelihood ratio close to one. If that conditional value is absent, the updater blocks with an unmodelled-dependence state rather than silently falling back to the marginal value. A real system would estimate a joint model, retain uncertainty and test transport to the current operating population.
The positive test starts from 1 per cent, observes a temperature spike and an independent oil assay, and reaches about 37.74 per cent. The negative test starts from 2 per cent and observes two vibration-derived alerts. Dependence-aware updating reaches about 16.95 per cent, while naive multiplication reaches about 49.48 per cent. The gap is the cost of treating one evidence source as two.
Runnable Python reference and test cases
Save the program as evidence_ledger.py and run it with Python 3. It uses only the standard library and asserts both the independent and duplicate-evidence cases.
#!/usr/bin/env python3
"""Synthetic sequential evidence ledger with dependency-aware updates."""
from __future__ import annotations
from dataclasses import dataclass
from math import isclose, isfinite
from typing import Iterable
@dataclass(frozen=True)
class Evidence:
name: str
result: str
lr_positive: float
lr_negative: float
source_group: str
conditional_positive: float | None = None
conditional_negative: float | None = None
def probability_to_odds(probability: float) -> float:
if not 0.0 < probability < 1.0:
raise ValueError("probability must be strictly between 0 and 1")
return probability / (1.0 - probability)
def odds_to_probability(odds: float) -> float:
if odds < 0.0:
raise ValueError("odds cannot be negative")
return odds / (1.0 + odds)
def update(
prior: float,
evidence: Iterable[Evidence],
respect_dependence: bool = True,
) -> tuple[float, list[tuple[str, float, float]]]:
odds = probability_to_odds(prior)
used_groups: set[str] = set()
ledger: list[tuple[str, float, float]] = []
for item in evidence:
if item.result not in {"positive", "negative"}:
raise ValueError(f"unsupported result for {item.name}: {item.result}")
if item.result == "positive":
marginal = item.lr_positive
conditional = item.conditional_positive
else:
marginal = item.lr_negative
conditional = item.conditional_negative
repeated_source = item.source_group in used_groups
if respect_dependence and repeated_source:
if conditional is None:
raise ValueError(
f"unmodelled dependence for repeated source {item.source_group}"
)
lr_used = conditional
else:
lr_used = marginal
if not isfinite(lr_used) or lr_used <= 0.0:
raise ValueError(f"likelihood ratio must be finite and positive: {item.name}")
odds *= lr_used
ledger.append((item.name, lr_used, odds_to_probability(odds)))
used_groups.add(item.source_group)
return odds_to_probability(odds), ledger
def main() -> None:
independent = [
Evidence("temperature positive", "positive", 5.0, 0.45, "temperature"),
Evidence("oil assay positive", "positive", 12.0, 0.20, "oil"),
]
posterior, _ = update(0.01, independent, respect_dependence=True)
assert isclose(posterior, 0.37735849056603776, rel_tol=1e-12)
duplicated = [
Evidence(
"vibration alert positive", "positive", 8.0, 0.35, "vibration",
conditional_positive=1.35, conditional_negative=0.85,
),
Evidence(
"instability classifier positive", "positive", 6.0, 0.40, "vibration",
conditional_positive=1.25, conditional_negative=0.90,
),
]
aware, _ = update(0.02, duplicated, respect_dependence=True)
naive, _ = update(0.02, duplicated, respect_dependence=False)
assert isclose(aware, 0.1694915254237288, rel_tol=1e-12)
assert isclose(naive, 0.49484536082474223, rel_tol=1e-12)
missing_conditional = [
Evidence("source one", "positive", 3.0, 0.5, "shared"),
Evidence("source two", "positive", 4.0, 0.4, "shared"),
]
try:
update(0.02, missing_conditional, respect_dependence=True)
except ValueError as exc:
assert "unmodelled dependence" in str(exc)
else:
raise AssertionError("repeated source without conditional LR was not blocked")
invalid_lr = [Evidence("invalid", "positive", float("nan"), 0.5, "invalid")]
try:
update(0.02, invalid_lr, respect_dependence=True)
except ValueError as exc:
assert "finite and positive" in str(exc)
else:
raise AssertionError("invalid likelihood ratio was not blocked")
print(f"independent posterior: {posterior:.2%}")
print(f"duplicate, dependency-aware: {aware:.2%}")
print(f"duplicate, naive independence: {naive:.2%}")
if __name__ == "__main__":
main()
Expected output: independent posterior 37.74%; duplicate, dependency-aware 16.95%; duplicate, naive independence 49.48%.
Typed evidence-update record
This compact schema is an operational starting point. A deployed version should add uncertainty intervals, access controls, signatures, model versioning and jurisdiction-specific retention rules.
{
"hypothesis": {
"id": "bearing_fault_v1",
"alternative": "no_bearing_fault_v1",
"scope": "newly_installed_pump_bearings"
},
"prior": {
"probability": 0.01,
"population": "comparable_installations",
"valid_at": "decision_time",
"source_id": "rate-study-v3"
},
"evidence": [{
"event_id": "evt-temperature-1842",
"source_group": "temperature_probe_A",
"result": "positive",
"likelihood_ratio": 5.0,
"dependency_status": "independent_of_prior_events",
"model_id": "temperature-lr-v2"
}],
"posterior": {
"probability": 0.0480769231,
"sensitivity_range": [0.030, 0.076]
},
"decision": {
"zone": "observe",
"authority": "maintenance_controller",
"expires_on_state_change": true,
"requires_effect_readback": true
}
}
stateDiagram-v2 [*] --> Claim state "The prior is a population claim" as Claim state "Thought experiment 1: the same<br/>detector enters two factories" as Test state "The likelihood ratio is<br/>directional evidence" as Revision Claim --> Test: expose mechanism Test --> Decision: evidence survives Test --> Revision: rival survives Revision --> Claim: narrow or rebuild Decision --> [*]
Compact glossary
- Prior
- A probability distribution or odds statement before the current evidence, indexed to a defined population, time and hypothesis.
- Likelihood
- The probability assigned to observed data under a hypothesis or parameter value. It is a function of the hypothesis for fixed observed data.
- Likelihood ratio
- The probability of the evidence under one hypothesis divided by its probability under a named alternative.
- Bayes factor
- A posterior-odds multiplier for model comparison, usually obtained by integrating each model's likelihood over its parameter prior.
- Posterior
- The probability distribution or odds after conditioning the prior model on observed evidence.
- Conditional independence
- A claim that two evidence items become independent once the relevant hypothesis or latent state is fixed.
- Prior predictive check
- A comparison between observed data and data that the prior model could generate, used to expose prior-data conflict or implausible implications.
- Posterior predictive check
- A comparison between observed patterns and replicated data generated from the fitted posterior model.
Make the update inspectable before making the action automatic
Bayes' rule earns its place in machine intelligence because it imposes a simple discipline on change under uncertainty. The prior names the starting world. The likelihood ratio names what the observation discriminates. The posterior records the result. In log-odds, the ledger becomes a sequence of signed evidence transactions.
The discipline has sharp boundaries. A posterior cannot compensate for an omitted hypothesis, stale reference class, misspecified likelihood or duplicated source. The neat product of several likelihood ratios is especially dangerous when a compound system mistakes repeated processing for independent evidence. Model checks and failure injection must attack those assumptions before the posterior is trusted.
The architecture decision is concrete. Store priors with population and time scope. Carry provenance through every evidence transformation. Compute joint or conditional evidence weights when sources overlap. Emit the posterior with a sensitivity range and transaction history. Keep policy, authority, action and effect verification outside the probabilistic update.
The changed decision is to reject unexplained posterior scores from consequential workflows. Accept an update only when its opening balance, evidence multiplier, dependency claim and release threshold can be reconstructed. That requirement does not make uncertainty disappear. It makes every movement of belief answerable to the evidence that caused it.
References
- Bayes, T., & Price, R. (1763). An Essay towards solving a Problem in the Doctrine of Chances. Philosophical Transactions of the Royal Society of London, 53, 370-418. Royal Society record.
- Neyman, J., & Pearson, E. S. (1933). On the Problem of the Most Efficient Tests of Statistical Hypotheses. Philosophical Transactions of the Royal Society A, 231, 289-337. Royal Society record.
- Wald, A. (1945). Sequential Tests of Statistical Hypotheses. Annals of Mathematical Statistics, 16(2), 117-186. Project Euclid record.
- Kahneman, D., & Tversky, A. (1973). On the Psychology of Prediction. Psychological Review, 80(4), 237-251. DOI record.
- Casscells, W., Schoenberger, A., & Graboys, T. B. (1978). Interpretation by physicians of clinical laboratory results. New England Journal of Medicine, 299(18), 999-1001. DOI record.
- Gigerenzer, G., & Hoffrage, U. (1995). How to Improve Bayesian Reasoning Without Instruction: Frequency Formats. Psychological Review, 102(4), 684-704. DOI record.
- Kass, R. E., & Raftery, A. E. (1995). Bayes Factors. Journal of the American Statistical Association, 90(430), 773-795. DOI record.
- Gelman, A., Meng, X.-L., & Stern, H. (1996). Posterior Predictive Assessment of Model Fitness via Realized Discrepancies. Statistica Sinica, 6, 733-807. Journal page.
- Evans, M., & Moshonov, H. (2006). Checking for prior-data conflict. Bayesian Analysis, 1(4), 893-914. Project Euclid record.
- van Walraven, C., Austin, P. C., Jennings, A., & Forster, A. J. (2009). Correlation between serial tests made disease probability estimates erroneous. Journal of Clinical Epidemiology, 62(12), 1301-1305. PubMed record.
- Ashinoff, B. K., Buck, J., Woodford, M., & Horga, G. (2022). The effects of base rate neglect on sequential belief updating and real-world beliefs. PLOS Computational Biology, 18(12), e1010796. Open article.
- Schulz, P., Wegwarth, O., & Giese, H. (2025). Risk expression using likelihood ratios and natural frequencies in Bayesian inference tasks: a preregistered randomized-controlled crossover trial. BMC Medical Education, 25, 505. Open article.
- Bossuyt, P. M., et al. (2015). STARD 2015: an updated list of essential items for reporting diagnostic accuracy studies. BMJ, 351, h5527. Open article.
- Cochrane Screening and Diagnostic Tests Methods Group. Cochrane Handbook for Systematic Reviews of Diagnostic Test Accuracy. Official handbook page.
- Stan Development Team. Posterior and Prior Predictive Checks. Stan User's Guide. Official documentation.
- Ng, A. Y., & Jordan, M. I. (2001). On Discriminative vs. Generative Classifiers: A comparison of logistic regression and naive Bayes. Advances in Neural Information Processing Systems 14. Proceedings page.
- Fenton, N., & Neil, M. (2021). Calculating the Likelihood Ratio for Multiple Pieces of Evidence. Author manuscript.
- Iyer, H., & Lund, S. P. (2017). Likelihood Ratio as Weight of Forensic Evidence: A Closer Look. Journal of Research of the National Institute of Standards and Technology, 122. NIST publication.