{"kind":"Skill","metadata":{"namespace":"community","name":"thinking-bayesian","version":"0.1.0"},"spec":{"description":"Update beliefs systematically based on new evidence using probabilistic reasoning. Use when estimating probabilities, learning from data, or making decisions under uncertainty.","files":{"SKILL.md":"---\nname: thinking-bayesian\ndescription: Update beliefs systematically based on new evidence using probabilistic reasoning. Use when estimating probabilities, learning from data, or making decisions under uncertainty.\n---\n\n# Bayesian Reasoning\n\n## Overview\nBayesian thinking provides a framework for updating beliefs based on new evidence. Rather than treating beliefs as binary (true/false), it recognizes degrees of confidence that should shift as evidence accumulates. This approach, rooted in Bayes' Theorem, helps avoid both overconfidence and underreaction to new information.\n\n**Core Principle:** Beliefs are probabilities that should update incrementally as evidence arrives. Strong priors require strong evidence to shift.\n\n## When to Use\n- Estimating probabilities or likelihoods\n- Interpreting test results or metrics\n- Making decisions with incomplete information\n- Evaluating competing hypotheses\n- Learning from experiments or A/B tests\n- Diagnosing problems with uncertain causes\n- Predicting outcomes based on historical data\n\nDecision flow:\n```\nUncertain about something? → yes → Have prior belief? → yes → New evidence? → APPLY BAYESIAN UPDATE\n                                                      ↘ no → Establish base rate first\n                         ↘ no → Standard analysis may suffice\n```\n\n## Key Concepts\n\n### Prior Probability\nYour belief BEFORE seeing new evidence:\n```\nP(H) = probability that hypothesis H is true\n\nExample: Before any symptoms, what's the probability someone has disease X?\n         Use base rate: If 1 in 1000 people have it, P(disease) = 0.001\n```\n\n### Likelihood\nHow probable is the evidence IF the hypothesis is true?\n```\nP(E|H) = probability of seeing evidence E, given H is true\n\nExample: If someone HAS the disease, what's the probability of a positive test?\n         If test is 99% sensitive: P(positive|disease) = 0.99\n```\n\n### Posterior Probability\nYour belief AFTER seeing the evidence:\n```\nP(H|E) = updated probability of H, given you observed E\n\nThis is what Bayes' Theorem calculates.\n```\n\n## Bayes' Theorem\n\n```\n                P(E|H) × P(H)\nP(H|E) = ─────────────────────────\n                   P(E)\n\nWhere:\n  P(H|E) = posterior (what we want)\n  P(E|H) = likelihood (how expected is evidence if H true)\n  P(H)   = prior (initial belief)\n  P(E)   = total probability of evidence\n```\n\n### Intuitive Form\n\n```\nPosterior odds = Prior odds × Likelihood ratio\n\nIf evidence is 10x more likely under H than under not-H,\nyour odds should shift by factor of 10.\n```\n\n## The Process\n\n### Step 1: Establish Your Prior\nWhat did you believe before this evidence?\n- Use base rates when available\n- Be explicit about uncertainty\n- Don't anchor on 50% just because you're unsure\n\n```\nQuestion: Will this feature increase conversion?\nPrior: Based on similar features, ~30% succeed significantly\n       P(success) = 0.30\n```\n\n### Step 2: Assess the Evidence\nHow strong is this evidence? Consider:\n- How likely is this evidence if hypothesis is TRUE?\n- How likely is this evidence if hypothesis is FALSE?\n- What's the ratio?\n\n```\nEvidence: Early A/B test shows 5% lift (p=0.08)\nP(this result | feature works) = 0.60 (moderately expected)\nP(this result | feature doesn't work) = 0.15 (possible but less likely)\nLikelihood ratio = 0.60 / 0.15 = 4x\n```\n\n### Step 3: Update Your Belief\nApply the likelihood ratio to your prior:\n\n```\nPrior odds: 0.30 / 0.70 = 0.43\nLikelihood ratio: 4x\nPosterior odds: 0.43 × 4 = 1.72\nPosterior probability: 1.72 / (1 + 1.72) = 0.63\n\nUpdated belief: 63% confidence feature will succeed\n(up from 30% prior)\n```\n\n### Step 4: Iterate as More Evidence Arrives\nYesterday's posterior becomes today's prior:\n\n```\nNew evidence: Week 2 shows lift holding at 4.5%\nPrior (from step 3): 0.63\n[Repeat update process]\nNew posterior: 0.78\n```\n\n## Common Applications\n\n### Interpreting Test Results\n```\nScenario: Test for rare disease (1 in 10,000 prevalence)\nTest: 99% sensitive, 99% specific\n\nPrior: P(disease) = 0.0001\nIf positive test:\n  P(positive|disease) = 0.99\n  P(positive|no disease) = 0.01\n  P(positive) = 0.99 × 0.0001 + 0.01 × 0.9999 ≈ 0.0101\n\nPosterior: P(disease|positive) = (0.99 × 0.0001) / 0.0101 ≈ 0.0098\n\nEven with 99% accurate test, positive result only means ~1% chance of disease!\nBase rate dominates when condition is rare.\n```\n\n### Debugging\n```\nBug report: Users see error X\nPrior beliefs:\n  P(database issue) = 0.20\n  P(network issue) = 0.30\n  P(code bug) = 0.40\n  P(user error) = 0.10\n\nEvidence: Error happens only on mobile\n  P(mobile-only | database) = 0.05\n  P(mobile-only | network) = 0.30\n  P(mobile-only | code bug) = 0.60\n  P(mobile-only | user error) = 0.40\n\nUpdate: Code bug becomes most likely (posterior ~0.55)\nNext step: Investigate mobile-specific code paths\n```\n\n### Project Estimation\n```\nPrior: Based on similar projects, P(on-time) = 0.40\n\nEvidence 1: Team is experienced with this stack\n  Likelihood ratio: 1.5x → Posterior: 0.50\n\nEvidence 2: Requirements are unclear\n  Likelihood ratio: 0.6x → Posterior: 0.38\n\nEvidence 3: Critical dependency has risk\n  Likelihood ratio: 0.7x → Posterior: 0.30\n\nFinal estimate: 30% chance of on-time delivery\n```\n\n## Mental Shortcuts\n\n### Strong vs Weak Evidence\n| Evidence Type | Typical Likelihood Ratio |\n|---------------|-------------------------|\n| Definitive proof | 100x+ |\n| Strong evidence | 10-100x |\n| Moderate evidence | 3-10x |\n| Weak evidence | 1.5-3x |\n| Noise | ~1x (no update) |\n\n### When to Update Significantly\nUpdate strongly when:\n- Evidence is surprising under your current belief\n- Evidence comes from reliable source\n- Evidence is specific to your hypothesis\n\nUpdate weakly when:\n- Evidence is expected regardless of hypothesis\n- Source has unknown reliability\n- Evidence is circumstantial\n\n### Base Rate Neglect (Avoid This)\nCommon error: Ignoring prior probability when evidence arrives\n```\nWrong: \"Positive test = probably have disease\"\nRight: \"Positive test shifts probability, but base rate matters\"\n```\n\n## Calibration Check\n\n### Are You Well-Calibrated?\nTrack predictions and outcomes:\n- Of things you said were \"70% likely,\" did ~70% happen?\n- If you're always overconfident, widen your uncertainty\n- If you're always underconfident, trust your assessments more\n\n### Confidence Levels\n| Stated Confidence | Should Mean |\n|-------------------|-------------|\n| 50% | Coin flip |\n| 70% | Would bet 2:1 |\n| 90% | Would bet 9:1 |\n| 99% | Would bet 99:1 |\n\n## Verification Checklist\n- [ ] Established explicit prior probability (not just \"I think...\")\n- [ ] Assessed likelihood ratio of evidence\n- [ ] Applied update mathematically (not just \"more/less likely\")\n- [ ] Considered base rates for rare events\n- [ ] Checked for base rate neglect\n- [ ] Documented reasoning for future calibration\n\n## Key Questions\n- \"What was my belief before this evidence?\"\n- \"How likely is this evidence if my belief is true? If false?\"\n- \"What's the likelihood ratio?\"\n- \"Am I anchoring on the evidence and ignoring base rates?\"\n- \"How would I bet on this? At what odds?\"\n\n## Kahneman's Warning\n\"People tend to assess the relative importance of issues by the ease with which they are retrieved from memory—and this is largely determined by the extent of coverage in the media.\"\n\nDon't let vivid evidence override base rates. A plane crash doesn't make flying more dangerous than driving, even though it feels that way.\n"},"import":{"commit_sha":"a31e22d4445ad8fef7cd771d32af537aebb68c49","imported_at":"2026-05-22T21:14:39Z","license_text":"MIT License\n\nCopyright (c) 2025 TJ Boudreaux\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","owner":"tjboudreaux","repo":"tjboudreaux/cc-thinking-skills","source_url":"https://github.com/tjboudreaux/cc-thinking-skills/tree/a31e22d4445ad8fef7cd771d32af537aebb68c49/skills/thinking-bayesian"}},"content_hash":[136,158,73,31,118,172,132,189,216,96,104,110,141,214,122,40,195,3,225,165,75,193,6,212,86,123,110,127,164,214,139,159],"trust_level":"unsigned","yanked":false}
