Bayesian Binomial Test
Test a proportion against a chance or benchmark value with a Bayes factor, and get the posterior distribution of the true proportion with its 95% credible interval and highest density interval.
Updated · By Bibin XavierData 90 × 12
| IDtext · 90 levels | Grouptext · 3 levels | Gendertext · 2 levels | Agenumeric | Hours_Studynumeric | Anxietynumeric | Motivationnumeric | Pre_Scorenumeric | Post_Scorenumeric | Exam_Scorenumeric | Passednumeric · coded | Satisfactionnumeric · coded |
|---|---|---|---|---|---|---|---|---|---|---|---|
| S001 | Control | Male | 23 | 11.2 | 29 | 4.6 | 60 | 62 | 67 | 1 | 2 |
| S002 | Workshop | Female | 23 | 3.9 | 28 | 3.5 | 54 | 70 | 54 | 0 | 2 |
| S003 | Online | Female | 18 | 10.1 | 32 | 4 | 55 | 57 | 66 | 0 | 3 |
| S004 | Control | Male | 26 | 13.6 | 41 | 3.5 | 52 | 55 | 59 | 0 | 3 |
| S005 | Workshop | Female | 22 | 9.7 | 27 | 3.6 | 56 | 63 | 65 | 0 | 4 |
| S006 | Online | Female | 20 | 7.9 | 32 | 3.8 | 65 | 82 | 65 | 0 | 2 |
| S007 | Control | Female | 20 | 6.3 | 28 | 3 | 72 | 83 | 61 | 0 | 3 |
| S008 | Workshop | Male | 22 | 8 | 29 | 3.1 | 64 | 72 | 62 | 1 | 3 |
Variables and options
Results
Calculated in your browserBayesian binomial test
| Hypothesis | Observed proportion | BF10 | BF01 | Evidence |
|---|---|---|---|---|
| p ≠ 0.5 | 34 / 50 = 0.680 | 4.484 | 0.223 | moderate evidence for H₁ |
Note. Beta(1, 1) prior on p under H₁. Classical exact binomial test: p = .015.
Posterior of p
| Posterior | Mean | Median | Mode | 95% credible interval | 95% HDI | P(p > 0.5 | data) |
|---|---|---|---|---|---|---|
| Beta(35, 17) | 0.673 | 0.675 | 0.680 | [0.541, 0.792] | [0.546, 0.797] | 0.995 |
Note. The posterior uses the two-sided prior. The HDI is the narrowest interval containing 95% of the posterior.
Prior and posterior of p
Interpretation
With 34 successes in 50 trials, BF10 = 4.484, moderate evidence for H₁ against p = 0.5. The true proportion most likely lies between 0.541 and 0.792.
How to cite this tool
Using these results in a thesis, journal article, report or class assignment? Please cite this free tool so others can find it. It keeps the site free.
APA 7
Xavier, B. (2026). Bayesian Binomial Test [Web application]. FreeStatisticalTools.com. https://freestatisticaltools.com/bayesian-binomial-test/
BibTeX
@software{xavier_bayesianbinomialtest_2026,
author = {Xavier, Bibin},
title = {Bayesian Binomial Test},
publisher = {FreeStatisticalTools.com},
year = {2026},
url = {https://freestatisticaltools.com/bayesian-binomial-test/},
note = {Web application}
}Suggested sentence for your methods section: “The analysis was carried out with the free Bayesian Binomial Test tool on FreeStatisticalTools.com (Xavier, 2026).”
What is a Bayesian binomial test?
The Bayesian binomial test compares the hypothesis that a proportion equals a test value p₀ with the hypothesis that it differs, using a Beta prior on the proportion. It returns a Bayes factor and the posterior Beta distribution of the true proportion with a credible interval and highest density interval.
When to use a Bayesian binomial test
Use it to test whether a success rate, pass rate or preference share differs from a benchmark such as 50%, or to estimate a proportion with a credible interval.
Assumptions
- Independent trials with the same probability of success.
How to set up your data
The number of successes, the number of trials, and the test value.
How to use this calculator
- Enter the values. Fill in successes, trials, test value p₀ and alternative hypothesis.
- Read the results. Results update automatically. Read the plain-English interpretation, then use Copy table to paste APA-style tables into Word and Copy for the results sentence.
How to report a Bayesian binomial test in APA style
“34 of 50 participants preferred the new design; a Bayesian binomial test against p = .5 gave BF₁₀ = 7.9, posterior mean .67, 95% CrI [.54, .79].”
Frequently asked questions
What is a Beta-binomial model?
The number of successes follows a binomial distribution, and the unknown proportion has a Beta prior. The posterior is again a Beta distribution: Beta(α + successes, β + failures).
What is an HDI?
The highest density interval is the narrowest interval that contains 95% of the posterior, so every value inside it is more plausible than any value outside.
Which prior should I use?
Beta(1, 1), uniform on 0 to 1, is the default. Jeffreys’ prior Beta(0.5, 0.5) is another common reference prior.
Related tools
Browse all categories
Data cleaning and preparation · Describe and explore · Compare means · Nonparametric tests · Correlation and regression · Bayesian statistics · Categorical data · Reliability and agreement · Multivariate analysis · Structural equation modeling · Econometrics and time series · Panel data and causal inference · Marketing and decision research · Survival, clinical and meta-analysis · Study planning and calculators · PLS-SEM