Dance of the p-values

Every experiment below has exactly the same true effect and the same sample size. Only chance differs. Each click draws a new experiment (two groups, SD = 1, true difference d), runs the two-sample t-test and adds its confidence interval and its p-value to the dance.

Presets
Presets
Speed
Experiments so far
0
 
Latest p-value
–
 
Share with p < 0.05
–
 
Range of p so far
–
 

Table view (last 10 experiments)

Where the idea comes from. Geoff Cumming's video “Dance of the p values” (2009) and his paper Replication and p intervals (Perspectives on Psychological Science, 2008). The point: a p-value is itself a random variable. Repeat the same study and you can get a very different p.

Try this. (1) d = 0.5, power 50 % (click the 50 % preset): press Play and watch p move between very small and fairly large values, although nothing in the world changes. (2) Raise the power to 95 %, or go back to the default of 80 %. The p-values get smaller on average, but they still dance. (3) Set d = 0 and draw 100 at once: the histogram becomes flat, every p between 0 and 1 is equally likely. (4) Compare the blue interval with the dotted true effect: the interval dances too.

What power means here. Power is the long-run share of experiments with p < 0.05 for a given true effect and sample size (two-sided test, α = 0.05). It describes the design, not a single p-value. The sample size per group is computed from the power and the effect size you set; the orange dots in the histogram show what theory predicts.