# Chapter 12 notebook: Probability: Fast Reasoning Under Uncertainty

**Goal:** Choose among an exact complement, approximation, and guaranteed probability bound.

**Start with:** Rules 12.1.3, 12.1.8, 12.2.1. Use a calculator or the optional Python lab. Programming is optional for the workbook; the Jupyter version requires a Python 3 kernel. All lab numbers are constructed practice inputs, not observed data.

**Source:** [Finished Chapter 12](../skills/math-thumb-probability/references/chapter.md) from *Mathematical Rules of Thumb*. Numbered rules, classifications, and the decision path come from the book. The lab, exercises, answer key, and worksheet prompts are companion additions.

## 1. Frame your decision

Write a question in which an answer would change something you do. Gather: Event and threshold; distribution information; number of opportunities; dependence; moments; whether a guarantee or approximation is needed.

- My question and intended decision:
- Known inputs and units:
- Required accuracy or threshold:
- What I expect before calculating:
- What I still need to find out:

Use the lab as a worked starting point if you do not yet have your own problem. For notation or prerequisites, ask the chapter skill to explain only the concept blocking the next step.

## 2. Choose a route

- **Need a guaranteed bound with little distributional information?** Start with Markov, Chebyshev, Cantelli, or the union bound according to the available moments and tail direction.
- **Know event overlaps?** Add the Bonferroni pairwise correction and decide whether the resulting bracket is narrow enough.
- **Combining uncertainty?** Check covariance before using root-sum-of-squares, and condition explicitly before splitting total variance.
- **Facing repeated rare opportunities?** Use the exact complement first, then recognize Poisson, birthday, coupon, or exponential scales only in their regimes.
- **Updating evidence?** Convert the base rate to prior odds and multiply only conditionally independent likelihood ratios.
- **Replacing a distribution?** Check support, expected successes and failures, skew, moments, and tail location before selecting a normal, Poisson, or exponential approximation.
- **Transforming an estimate?** Use Jensen for bias direction, the lognormal formula for an exact normal-log model, or the delta method for local uncertainty propagation.
- **Need sharper tail control?** Ask what extra fact is defensible: direction, a hard bound, total variance, or sub-Gaussian decay.
- **Running a simulation?** Report root-$N$ Monte Carlo error, then audit correlation, bias, weight concentration, and proposal support.

**Chapter-specific stop check:** Do not silently multiply probabilities or likelihood ratios when the required independence is unverified. Distinguish bounds from approximate event rates.

## 3. Work the lab

For 100 independent opportunities, each with event probability 0.001, compute the chance of at least one event. The exact complement is 1-(1-0.001)^100≈0.0952079. The exponential approximation 1-exp(-0.1)≈0.0951626 is close. The union bound is 100 × 0.001=0.1 and remains valid without independence when the individual probabilities remain correct.

Predict the sign and scale before running the code. Then change one input and explain why the result moves. The code checks the constructed example; it does not prove the rule for every possible input. Code assertions may describe the example's chosen regime, so inspect them before changing that regime.

```python
import math
n, p = 100, 0.001
assert isinstance(n, int) and n >= 1 and 0 < p < 1
exact = -math.expm1(n*math.log1p(-p))
approximation = -math.expm1(-n*p)
union_bound = min(1.0, n*p)
print(f"Independent exact: {exact:.8f}; approximation: {approximation:.8f}")
print(f"Union bound: {union_bound:.8f}; approximation error: {abs(exact-approximation):.8f}")
assert 0 <= exact <= union_bound+1e-14
```

**My prediction, observed result, and explanation:**

_Record your work here._

## 4. Practise without the answers

### Exercise 1

Prior probability is 1%. One observation has likelihood ratio 10. Find posterior probability.

**My approach, assumptions, calculation, and check:**

_Write your attempt here._

### Exercise 2

With only finite mean and variance known, bound P(|X-mu|>=3 × sigma), sigma>0.

**My approach, assumptions, calculation, and check:**

_Write your attempt here._

### Exercise 3

All 100 opportunities in the lab are exact copies of one common event. What is the at-least-one probability?

**My approach, assumptions, calculation, and check:**

_Write your attempt here._

**Coaching prompt:** “Use the Chapter 12 skill to help me with Exercise 2. Ask for my attempt, give one useful hint if I need it, and help me check the assumptions before showing the answer.”

## 5. Answer key and reasoning

Read this after attempting the exercises, or use it immediately if you prefer a complete walkthrough. An answer is complete only when its assumptions and stopping point are clear.

### Answer 1

Prior odds are 0.01/0.99=1/99; posterior odds are 10/99. Probability is 10/(99+10)=10/109≈9.1743%, not 10%.

### Answer 2

Chebyshev gives at most 1/9≈11.11%. A normal-tail percentage requires a normal model; it is not distribution-free.

### Answer 3

It is 0.001, since either all occur or none do. The independence complement is invalid, while the 0.1 union bound is still valid but loose.

## 6. Build the complete chapter toolkit

The new lab samples the chapter; the following checklist covers all 30 rules. Study one thematic group at a time. A large group can take several sessions.

- **Bounds and Patterns That Travel:** work with rules 12.1.1, 12.1.2, 12.1.3, 12.1.4, 12.1.5, 12.1.6, 12.1.7, 12.1.8, 12.1.9, 12.1.10.
- **Updating and Distributional Approximations:** work with rules 12.2.1, 12.2.2, 12.2.3, 12.2.4, 12.2.5, 12.2.6, 12.2.7, 12.2.8, 12.2.9, 12.2.10, 12.2.11, 12.2.12.
- **Tail Control and Simulation Diagnostics:** work with rules 12.3.1, 12.3.2, 12.3.3, 12.3.4, 12.3.5, 12.3.6, 12.3.7, 12.3.8.

For each selected rule, read its equation, explanation, and worked use in the source. Reproduce that example; change one input; then change one assumption so the rule is no longer justified. Record the result and what check catches the failure. Historical examples remain labeled and qualified as in the source.

Read each complete numbered profile in the [chapter reference](../skills/math-thumb-probability/references/chapter.md) before applying it. The cues below abbreviate the graph metadata; they are not complete conditions. Change the status only after doing the practice described below.

| Rule | Book role | First assumptions to inspect | Practice status |
|---|---|---|---|
| 12.1.1: Markov's One-Moment Tail Bound | Independent | nonnegative random variable;  finite mean | new |
| 12.1.2: Chebyshev's Distribution-Free Sigma Rule | Independent | finite mean;  finite variance | new |
| 12.1.3: Union Bound for Many Failure Modes | Independent | well defined event probabilities | new |
| 12.1.4: Two-Term Bonferroni Correction for Overlap | Workflow | known pairwise intersections | new |
| 12.1.5: Root-Sum-of-Squares for Independent Noise | Independent | independent or uncorrelated terms;  finite variances | new |
| 12.1.6: Total Variance: Within Plus Between | Independent | finite second moment;  well defined conditioning variable | new |
| 12.1.7: Jensen's Curvature Check | Independent | integrable random variable;  convex or concave function | new |
| 12.1.8: At Least One Rare Event | Independent | independent equal probability trials;  small event probability | new |
| 12.1.9: Birthday Collision Threshold | Independent | independent uniform draws;  large state space | new |
| 12.1.10: Coupon Collector Scale | Independent | independent uniform categories;  large category count | new |
| 12.2.1: Bayes Updating in Odds Form | Independent | valid prior odds;  calibrated likelihood ratio | new |
| 12.2.2: Laplace Rule of Succession | Independent | exchangeable binary trials;  uniform beta prior | new |
| 12.2.3: Central-Limit Approximation for a Sample Mean | Independent | iid observations;  finite variance | new |
| 12.2.4: The 68-95-99.7 Normal Rule | Independent | approximately normal distribution | new |
| 12.2.5: Normal Approximation to a Binomial Count | Workflow | independent bernoulli trials;  constant success probability | new |
| 12.2.6: Normal Approximation to a Poisson Count | Workflow | poisson count model;  moderate or large rate | new |
| 12.2.7: Half-Unit Continuity Correction | Workflow | integer valued count;  normal approximation already appropriate | new |
| 12.2.8: Berry-Esseen Check on CLT Accuracy | Workflow | iid summands;  finite nonzero variance | new |
| 12.2.9: Poisson Approximation to a Binomial Count | Workflow | independent bernoulli trials;  small success probability | new |
| 12.2.10: Exponential Approximation to a Geometric Wait | Workflow | small step probability;  independent memoryless trials | new |
| 12.2.11: Lognormal Mean Correction | Independent | normal log values;  known log variance | new |
| 12.2.12: Delta Method for a Smooth Transformation | Workflow | asymptotically normal estimator;  differentiable transform | new |
| 12.3.1: Cantelli's One-Sided Variance Bound | Workflow | finite mean;  finite nonzero variance | new |
| 12.3.2: Hoeffding Bound for a Bounded Sample Mean | Independent | independent observations;  known finite bounds | new |
| 12.3.3: Multiplicative Chernoff Bound for Counts | Independent | independent bernoulli trials;  known expected count | new |
| 12.3.4: Bernstein's Variance-Aware Tail Bound | Workflow | independent bounded summands;  known or bounded variance | new |
| 12.3.5: Maximum of Many Sub-Gaussian Errors | Independent | centered subgaussian variables;  common scale | new |
| 12.3.6: Mills-Ratio Approximation for a Normal Tail | Independent | standard normal tail;  large positive z | new |
| 12.3.7: Monte Carlo Error Falls as One Over Root N | Independent | independent draws;  finite output variance | new |
| 12.3.8: Importance-Weight Effective Sample Size | Workflow | nonnegative normalized weights;  target support covered | new |

For a completed row, record: **rule number / my new input / mathematical claim type / verified assumptions / calculation / check / valid use / rejected use / next step**. “Practised” means you worked an example. “Demonstrated” means you can explain a valid use, transfer it, and reject a misuse without the answer key.

## 7. Apply it to your own problem

Return to your opening question. Choose the smallest rule set that can settle it. Use the book's independent/workflow/specialized classification separately from the claim type (exact, approximate, bound, diagnostic, or heuristic).

- Selected rule number(s) and reason:
- Assumptions that hold, fail, or remain uncertain:
- Substitution with units:
- Result and error, uncertainty, or bound:
- Independent check or limiting case:
- Decision this supports:
- Stop here, do a named next calculation, or gather missing information:

## 8. Transfer and continue

Useful nearby chapters: Chapter 13: statistics; Chapter 14: stochastic processes; Chapter 16: measurement. Bring the question, units, assumptions, result type, and uncertainty to the next chapter. Choose a bridge only when it supplies an operation you actually need.

**Completion check:** Explain this chapter's lab in your own words; solve one changed-input exercise; reject one invalid use; and produce a decision record for your own problem. If one check fails, revisit that part of the chapter rather than marking every rule complete.
