Generator

bayes

A generator in the probability library, called 12 times across 2 essays. Below: what it draws at its defaults and at each mode an essay asks for, what it checks while drawing, and everywhere it is used.

bayes is one function. Everything below came out of it during this build, at parameters taken from the essays rather than invented for this page — so a figure here is the same figure a reader meets in an essay, and if the generator changes, this page changes with it.

At its defaults

Bayes' theorem as two rectanglesA unit square split by how common the condition is (1.0%) and then by how the test behaves. Of everyone who tests positive, the fraction who have it is 16.7%.has itdoes nottests positivetrue, and positive: 0.99%false, and positive: 4.95%so of the positives,16.7% really have it

show: "sweep"

The same test, at every base rateA test with 99% sensitivity and 95% specificity, applied to populations in which the condition is more or less common. The chance that a positive result is real is a property of the population as much as of the test.00.20.40.60.8100.20.40.60.81how common the condition ischance a positive is real0.1% → 2%1% → 17%10% → 69%50% → 95%

show: "monty"

Three doors, as areasStaying wins 33.3% of the time and switching wins 66.7%, because the host's choice is constrained by what the host can see, so opening a door rules a region out without moving any boundary.the first pick was right — staying winsthe prize is behind door 2 — switching winsthe prize is behind door 3 — switching winsthe host knowsstay: 33.3%switch: 66.7%3 equally likely worlds,3 of them surviveno boundary moved:a region was ruled out

show: "monty-scale"

The same game, with more doorsWith d doors the host opens all but two, and switching wins (d − 1)/d of the time. Three doors is the smallest game in which the effect exists at all, which is why it is the one that looks like a paradox.5101520253000.20.40.60.81doorschance of winning3 doors: 67%10 doors: 90%30 doors: 97%staying

What it checks while it draws

Collected by running the family and listening to lib/verify.js, not written here. The count is how many separate times this build put that claim to the test.

Where it is called

Changing this generator changes every figure on this list. That is what makes the list worth publishing rather than keeping in a check script.

The whole library · What the figures prove