Posterior Error Approach to Sample Size Determination

The posterior error approach to sample size determination is a Bayesian method to determine the sample size required for a clinical trial. The goal of this approach is to control the posterior error rate instead of the Type I and Type II error rates, as is done in the frequentist approach to sample size determination. In other words, using the posterior error approach to sample size determination, we seek to limit the posterior probability that the outcome of our trial is different from the true situation we are studying.

Suppose that we treat the outcome of our clinical trial as a binary random variable, $$C$$, whose value can be either $$+$$ or $$-$$, depending on whether the outcome of the trial is positive or negative respectively. Define the indicator variable $$T$$ to be the truth. The value of $$T$$ can also be either $$+$$ or $$-$$, depending on whether the hypothesis being investigated is true or not, respectively. We define the posterior error rate to be $$P = P_1 + P_2$$ where

\[ P_1 = P(T = -|C = +) \] \[ P_2 = P(T = +|C = -) \]

Also, define $$\\theta = P(T)$$ to be the prior probability that the hypothesis that we are studying is true. When there is no clear indication if the hypothesis is true or not, $$\\theta = 0.5$$. If we wish to be conservative, or have a low confidence in the hypothesis, we can set $$\\theta < 0.5$$. Similarly, setting $$\\theta > 0.5$$ indicates that we have a high confidence in the treatment.

Under the frequentist approach, we are interested in limiting $$\\alpha = P(C = +|T = -)$$ and $$\\beta = P(C = -|T = +)$$, the Type I and Type II error rates. This means that, thanks to Bayes' Theorem, we can express the posterior error rates in terms of the $$\\alpha$$ and $$\\beta$$ allowing us to use the frequentist methods for sample size determination. Fixing $$P_1$$, $$P_2$$, and $$\\theta$$, we have:

\[ \\alpha = \\frac{(1 - P_2)(\\theta + P_1 - 1)}{(1 - \\theta)(P_1 + P_2 - 1)} \] \[ \\beta = \\frac{(1 - P_1)(P_2 - \\theta)}{\\theta(P_1 + P_2 - 1)} \]

Therefore, to apply the posterior error approach to sample size determination, we first select values for $$P_1$$, $$P_2$$, and $$\\theta$$. Then we calculate the values of $$\\alpha$$ and $$\\beta$$ that correspond to our values of $$P_1$$, $$P_2$$, and $$\\theta$$. Then we apply the appropriate frequentist method for calculating sample size.

Each power calculator we provide will have the ability to toggle between the use of $$\\alpha$$ and $$\\beta$$ or the use of the posterior error approach, depending on your preference. This functionality will be added February.


  • Lee, S.J. and Zelen, M. (2000), "Clinical trials and sample size considerations: another prespective.," Statistical Science, 15, 95-110.
  • Chow, S., Shao, J., & Wang, H. (2003), Sample size calculations in clinical research, New York: Marcel Dekker.