---
library: "bootstrap"
slug: "BayesUpdate"
name: "BayesUpdate"
ref: "BayesUpdate#8656"
hash: "sema:BayesUpdate#mh:SHA-256:865637baf030de8ee9babd2a2fdddbf68d99353516aa86eef07cf6bc1e8a5d38"
type: "Inference"
layer: "Mind"
version: "0.11.0"
root: "a6a3d1ff0f982ee30430c5b42f3784c8ec901fd68482cfc1bc30899c1e5e48c5"
license: null
url: "https://semahash.org/vocabularies/bootstrap/patterns/BayesUpdate"
---

# BayesUpdate

Mathematically rigorous belief revision

Mind · Inference

## Mechanism

Likelihood Weighting: Hold prior probability P(H). [Observe](https://semahash.org/vocabularies/bootstrap/patterns/Observe.md) evidence E. Compute likelihood ratio P(E|H)/P(E|¬H). Convert the prior to odds, multiply by the ratio, convert back to a probability. Large ratio = strong update. Ratio near 1 = weak evidence. Never update to 0 or 1. It explicitly incorporates [BaseRateInclude](https://semahash.org/vocabularies/bootstrap/patterns/BaseRateInclude.md) into the prior probability calculation to prevent base-rate neglect.

## Invariants

- The posterior odds are the prior odds scaled by the likelihood ratio P(E|H)/P(E|not H).
- Prior and posterior both stay at least `clamp` away from 0 and 1.

## Parameters

- clamp: type=Probability, range=(0.0, 0.5), description=Distance from 0 and 1 that no probability may cross, so evidence can always move it.

## Preconditions

- Prior probability defined in (0,1)
- New evidence observed.
- Likelihood computable.

## Postconditions

- Posterior probability in (0,1)
- [Belief](https://semahash.org/vocabularies/bootstrap/patterns/Belief.md) updated proportional to evidence strength.
- Prior recoverable from the posterior and the ratio, unless the posterior was clamped.

## Failure modes

- Prior Dogmatism: Setting a prior of 1.0 or 0.0 prevents any future updating, regardless of evidence.

## Where this came from

—

## Builds on

- [Observe](https://semahash.org/vocabularies/bootstrap/patterns/Observe.md) (references)
- [BaseRateInclude](https://semahash.org/vocabularies/bootstrap/patterns/BaseRateInclude.md) (references)
- [Belief](https://semahash.org/vocabularies/bootstrap/patterns/Belief.md) (references)

## Used by

- [ConfidenceCalibrate](https://semahash.org/vocabularies/bootstrap/patterns/ConfidenceCalibrate.md) (references)
- [HypothesisLadder](https://semahash.org/vocabularies/bootstrap/patterns/HypothesisLadder.md) (references)

## Identity

- Library: bootstrap 0.11.0 (root a6a3d1ff0f98)
- Ref: BayesUpdate#8656
- Hash: sema:BayesUpdate#mh:SHA-256:865637baf030de8ee9babd2a2fdddbf68d99353516aa86eef07cf6bc1e8a5d38

## Links

- Page: https://semahash.org/vocabularies/bootstrap/patterns/BayesUpdate
- JSON: https://semahash.org/vocabularies/bootstrap/patterns/BayesUpdate.json
- Library: https://semahash.org/vocabularies/bootstrap
- Library index: https://semahash.org/vocabularies/bootstrap/index.json
