Research ToolsBayesian Proportions

Bayesian Proportion Inference (one group / two groups)

⚗️ Frontier method: Bayesian methods are increasingly used in clinical trials (especially early-phase / adaptive designs). This tool uses the Beta-binomial conjugate to give posteriors and credible intervals; conclusions depend on the prior. Always report the prior used; for formal analysis, cross-check with R/Stan.

The frequentist approach gives a "confidence interval" and a p-value; the Bayesian approach gives a "credible interval" and "the probability a hypothesis is true", which is more intuitive. This tool uses the Beta-binomial conjugate: for one group it gives the posterior distribution of the proportion, the 95% credible interval, and P(p>threshold); for two groups it directly gives P(group 1>group 2) and the posteriors of the risk difference / risk ratio / OR. Computed locally in your browser; data are not uploaded.

① Input data

Prior
Events xSample size nComparison threshold p₀

How to use & methodology

Will Bayesian and frequentist results differ much?

With a large sample and a non-informative prior (Jeffreys/uniform), the Bayesian credible interval is usually very close to the frequentist confidence interval; with small samples or an informative prior the difference is noticeable. The Bayesian advantage is being able to state directly 'the probability a hypothesis is true'.

How do I choose a prior?

The defaults Jeffreys (Beta(0.5,0.5)) and uniform (Beta(1,1)) are non-informative priors that let the data dominate. If reliable prior information exists you may set an informative prior. Always report the prior used and its justification in the paper.

Does P(group 1>group 2) equal 1−p value?

No, although it is often compared. It is 'the posterior probability that group 1's true proportion exceeds group 2's' — a direct Bayesian statement about a hypothesis; the frequentist p-value is 'the probability of observing the current or more extreme data if there were no difference', which means something different.

What scenarios suit it?

Interval estimation and target-attainment probability for a single rate (e.g. response rate, positivity rate); comparison of two rates, especially small samples / early-phase trials / adaptive designs. For complex stratification, regression, or robust priors, use Stan/R.