Created by Kristoffer Magnusson, from an idea by Daniel Lakens and formulas from JP de Ruiter.

Many know that *p*-values follow an uniform distribution when the null hypothesis is true. But what about when the null isn't true? This visualization shows the distribution of *p*-values when comparing the means of two independent samples. Check out this blog post by Daniel Lakens for more information.

Log x-axis

This visualization is based on a **two-sample Z-test**, i.e. we assume that the true standard deviation is known. In real life this is often not the case, which is why t-tests are much more common. When the effect is nonzero p-values from t-tests follow a non-central

If you enjoy my work, or maybe even use it in your own teaching, please consider supporting me on Patreon. My visualizations will always be free to use, but you can show your support by donating a dollar or two for every new visualization I create.

Have any suggestion? Send them to me, my contact info can be found here.