Bayesian Sample Size Methods
Determines the minimum sample size required for a normal-normal Bayesian analysis to achieve a specified posterior credible interval width for a population mean. The calculation incorporates the prior precision and the known sampling variance directly, so informative prior information can reduce the number of new observations required.
This calculator implements the normal-normal Bayesian credible-interval width criterion for estimating a single normal mean when the sampling variance is known. This is one of the normal-mean Bayesian sample-size settings described by Joseph and Bélisle, who developed Bayesian sample size criteria based on posterior credible-interval length and coverage. The official nQuery Bayes documentation likewise identifies Bayesian interval procedures as sample-size methods for obtaining a desired credible-interval width.
Let the observations have known standard deviation σ, and let the prior distribution for the population mean be μ ∼ N(μ0, τ02). After n observations, the posterior distribution is normal with variance:
For a central credible level γ, the equal-tailed credible interval has full width:
Setting this width equal to the target W and solving for n gives the required continuous sample-size threshold:
The calculator rounds this threshold upward to the smallest integer sample size that actually satisfies the width requirement. If the prior alone already produces a credible interval no wider than the target, the required additional sample size is zero.
In this known-variance formulation, the prior contributes precision equivalent to:
Thus a more concentrated prior contributes more effective prior information and can reduce the number of new observations required. The prior mean does not enter the width calculation because changing the prior location shifts the posterior but does not change posterior variance.
The CRAN documentation for the SampleSizeMeans implementation of Joseph and Bélisle's methods gives the example mu.varknown(len=0.2, lambda=1/4, n0=10), with the desired credible-interval length equal to 0.20, sampling precision λ = 1/4, and prior sample-size equivalent n0 = 10. Translating these inputs gives σ = 2 and τ0 = 2/√10 = 0.6324555.
At n = 1,527, the calculated posterior credible-interval width is approximately 0.199973, while at n = 1,526 it remains above 0.20. Therefore 1,527 is the first integer sample size satisfying the specified precision criterion.
This calculator is specifically the known-variance normal-normal credible-width formulation. Bayesian sample-size methods for unknown variance, binomial proportions, treatment differences, highest posterior density intervals, assurance, or other endpoints require different calculations and should not be substituted into this formula.
Joseph, L. & Bélisle, P. (1997). Bayesian sample size determination for normal means and differences between normal means. The Statistician, 46(2), 209–226.
SampleSizeMeans R package documentation, including
mu.varknown, which implements Bayesian sample-size
determination for a normal mean with known variance and a prior
sample-size equivalent.
nQuery / Statsols. Sample Size for Bayesian Statistics. The nQuery Bayes documentation identifies Bayesian interval procedures for determining sample size from a desired credible-interval width.