The visualization shows a Bayesian two-sample t test, for simplicity the variance is assumed to be known. It illustrates both Bayesian estimation via the posterior distribution for the effect, and Bayesian hypothesis testing via Bayes factor. The frequentist p-value is also shown. The null hypothesis, H0 is that the effect δ = 0, and the alternative H1: δ ≠ 0, just like a two-tailed t test. You can use the sliders to vary the observed effect (Cohen's d), sample size (n per group) and the prior on δ.

Settings

Observed effect (d = 1)
1
-3
-2
-1
0
1
2
3
Sample size (n = 10)
10
1
10
20
30
40
50
75
100
1k
SD of prior (σδ = 0.3)
0.3
0.1
1
2
3
4
5
priorlikelihoodposterior-3.0-2.5-2.0-1.5-1.0-0.50.00.51.01.52.02.53.00.00.20.40.60.81.01.295 % CI [0.12, 1.88]95 % HDI [-0.13, 1.08]Effect (d)
0.298Support H₀ (BF₀₁)
3.35Support H₁ (BF₁₀)
0.0253p-value

About the visualization

The prior on the effect is a scaled unit-information prior. The black, and red circle on the curves represents the likelihood of 0 under the prior and posterior. Their likelihood ratio is the Savage-Dickey density ratio, which I use here to compute the Bayes factor. The p-value is the traditional p-value for a two-sample t test with known variance (i.e. a Z test). HDI is the posterior highest density interval, which in this case is analogous a credible interval. And CI is the traditional frequentist confidence interval.