Table of contents

  1. Intervals for binomial proportions
  2. Agresti- Coull interval
  3. Bayesian analysis
  4. Summary

Intervals for binomial parameters


Some discussion


Simple fix


Example

Suppose that in a random sample of an at-risk population \( 13 \) of \( 20 \) subjects had hypertension. Estimate the prevalence of hypertension in this population.



Bayesian analysis


Beta priors



Posterior


Posterior mean

\[ \begin{eqnarray*} E[p ~|~ X] & = & \frac{\tilde \alpha}{\tilde \alpha + \tilde \beta}\\ \\ & = & \frac{x + \alpha}{x + \alpha + n - x + \beta}\\ \\ & = & \frac{x + \alpha}{n + \alpha + \beta} \\ \\ & = & \frac{x}{n} \times \frac{n}{n + \alpha + \beta} + \frac{\alpha}{\alpha + \beta} \times \frac{\alpha + \beta}{n + \alpha + \beta} \\ \\ & = & \mbox{MLE} \times \pi + \mbox{Prior Mean} \times (1 - \pi) \end{eqnarray*} \]



Posterior variance


Discussion


Example







Bayesian credible intervals



R code

Install the binom package, then the command

library(binom)
binom.bayes(13, 20, type = "highest")

gives the HPD interval. The default credible level is \( 95\% \) and the default prior is the Jeffrey's prior.


Interpretation of confidence intervals


Likelihood intervals


Credible intervals