Science Journaling Club Founded 2024

INTERACTIVE COMPANION · EXPLAINER · STATISTICS

The Inference Bench

A live model accompanying “What a P Value Actually Means”

← Read the full article

Two benches. The first runs simulated experiments in front of you, one every few milliseconds, dropping each resulting p value into a histogram so you can watch the distribution build. With the true effect set to zero the bars come out flat, which is the property that defines the p value and is much more convincing when you see it happen than when somebody tells you. Push the effect up and the whole pile slides into the leftmost bin.

The second bench asks the harder question. Given a field where some fraction of tested hypotheses are true, and studies of a given power, what share of the significant results are real? It draws the tree of outcomes to scale, so the two boxes you are comparing are the actual sizes of the two groups.

Bench 1. Watch the distribution build

Every tick, the model draws two groups of \(n\) observations from normal populations separated by \(d\) standard deviations, runs a two-sided t test, and files the p value. Nothing is precomputed. The bars you see are the experiments that have actually run since you last changed a slider.

Start with the defaults, which are the article's \(d = 0\) case, and let it run to a few thousand experiments. The bars settle at 0.05 each because the p value under a true null is uniform. The dark leftmost bar is everything that would be published as a discovery, and there is nothing to discover.

experiments run: 0 below α: 0 observed rate: predicted power:

Bench 2. What fraction of significant findings are real?

Out of 1,000 studies in a field, \(R\) of them per unit test a true hypothesis. True hypotheses are caught with probability equal to the power. False ones are called significant with probability \(\alpha\). So:

$$\mathrm{PPV} \;=\; \frac{R \times \text{power}}{R \times \text{power} \;+\; (1-R)\,\alpha}$$

The tree below is drawn to scale. The width of each branch is the number of studies flowing down it, and the two filled boxes at the bottom are the true and false positives whose ratio you are being asked to judge. The defaults are the article's headline case.

true positives: false positives: significant findings that are real: that are false:
Club headline
prior 10%, power 50%, α 0.05
Per 1,000 studies
50 true positives, 45 false positives
PPV
52.6% real, 47.4% false
Simulated check
0.5279 over 400,000 studies, against 0.5263 analytic
Break-even prior
9.1% at power 0.50: below that, most significant findings are false

Three things worth trying

Set Bench 1 to \(d = 0\) and α to 0.01. Let it run. The observed rate walks toward 0.010, not 0.05, because the flat distribution hands you whatever tail fraction you ask for. Nothing about the data changed; you moved a line.

Set Bench 1 to \(d = 0.5\) and \(n = 32\), the article's case, and watch the observed rate settle near 0.50. Now imagine two labs both drawing from that histogram. The chance they land on opposite sides of the threshold is \(2 \times 0.5 \times 0.5\), which is one half. That is the dance of the p values, and Bench 1 is drawing the distribution both labs are sampling from.

On Bench 2, put the prior at 1% and the power at 20%, then switch multiplicity to 20 undeclared outcomes. The share of significant findings that are real falls below one percent. Every study in that scenario is honest in the sense that nobody lied. The arithmetic still eats the literature.