Help us improve
Share bugs, ideas, or general feedback.
From grimoire
Updates prior beliefs with new evidence via Bayes' theorem to produce calibrated probabilities for inference and decision-making under uncertainty.
npx claudepluginhub jeffreytse/grimoire --plugin grimoireHow this skill is triggered — by the user, by Claude, or both
Slash command
/grimoire:apply-bayesian-reasoningThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Update prior beliefs with new evidence using Bayes' theorem to produce calibrated posterior probabilities for inference and decision-making.
Applies Bayes' Theorem to update beliefs given a specific prior and new evidence. Use when interpreting test results, metrics, or diagnostic signals to avoid overreacting.
Applies Bayesian reasoning to update probability estimates with new evidence, helping make better forecasts, avoid overconfidence, and calibrate judgments under uncertainty.
Routes probabilistic thinking to the right skill: base-rate anchoring, confidence calibration, expected value, or scenario weighting. Activates on queries about probability, likelihood, and uncertainty.
Share bugs, ideas, or general feedback.
Update prior beliefs with new evidence using Bayes' theorem to produce calibrated posterior probabilities for inference and decision-making.
Adopted by: Clinical diagnostic reasoning (pre-test/post-test probability), spam filtering (naive Bayes), Google search ranking, NASA mission reliability analysis, FDA Bayesian adaptive clinical trial designs (2019 guidance).
Impact: Bayesian adaptive clinical trial designs reduce average sample size by 20–30% vs. fixed designs (FDA 2019); Bayesian diagnostic reasoning reduces unnecessary testing by 40% in low-prevalence conditions where base-rate neglect is common (Eddy 1982).
Why best: Bayesian reasoning is the mathematically optimal method for incorporating prior information with likelihood evidence; it produces probabilities directly interpretable as degrees of belief, unlike frequentist p-values which do not.
Sources: Bayes (1763) Philos Trans; Jaynes (2003) Cambridge UP; Gelman et al. "BDA3" (2013); Eddy "Probabilistic Reasoning in Clinical Medicine" (1982).
Define the hypothesis and its complement — state H (hypothesis of interest) and H̄ (alternative or complement). Be precise: "The patient has disease D" not "something is wrong."
Establish the prior probability P(H) — use base rate data: population prevalence for diagnostic questions, historical frequency for reliability questions, expert consensus for novel domains. Document the source. If truly uninformative, use a flat prior P(H) = 0.5 but justify it.
Determine the likelihood ratio (LR) — for each piece of evidence E, find: LR = P(E|H) / P(E|H̄). For diagnostic tests: LR+ = sensitivity / (1 − specificity); LR− = (1 − sensitivity) / specificity.
Apply Bayes' theorem — P(H|E) = [P(E|H) × P(H)] / P(E), where P(E) = P(E|H)×P(H) + P(E|H̄)×P(H̄). Equivalently using odds form: posterior odds = LR × prior odds, where odds = p / (1−p).
Use log-odds for sequential updating — when updating with multiple independent pieces of evidence: log-odds_posterior = log-odds_prior + Σ log(LRᵢ). Convert back: p = 1 / (1 + e^(−log-odds)).
Specify the likelihood function for parameter estimation — for estimating a parameter θ from data x, write the likelihood L(θ|x) = P(x|θ) and choose a prior π(θ); compute posterior π(θ|x) ∝ L(θ|x) × π(θ).
Compute or approximate the posterior — use conjugate priors for closed-form solutions (Beta-Binomial, Normal-Normal, Gamma-Poisson); use Markov Chain Monte Carlo (MCMC via Stan or PyMC) for complex models.
Summarize the posterior — report: posterior mean or median (point estimate), credible interval (e.g., 95% HDI — highest density interval), and posterior probability of hypotheses (e.g., P(θ > 0 | data)).
Perform sensitivity analysis — vary the prior across a plausible range; if the posterior is robust to prior choice, the data dominate; if sensitive, acknowledge the prior's influence explicitly.
Make decisions using expected utility — multiply posterior probabilities by outcome utilities and sum; choose the action that maximizes expected utility. Separate inference (posterior) from decision (action).