# Success rate estimate and error from a sample of a Bernoulli distribution?

I have a sample of size $n$ of independent trials extracted from a Bernoulli distribution with unknown success rate $\theta$. Given this sample, how can I estimate the success rate $\theta$ along with confidence intervals?

## 1 Answer

If we have $n$ iid draws from $Bern(\theta)$ (which is a member of the exponential family) then $\bar X_n$ is complete and sufficient for $\theta$ and since $\mathbb E(\bar X_n) = \theta$ it is the UMVUE. You don't give any details on what your estimator should be like so this seems like a fine initial choice.

Confidence intervals: by the CLT $\sqrt n \frac{\bar X_n - \theta}{\sqrt {\theta(1-\theta)}} \rightarrow_d \mathcal N(0,1)$ so you can appeal to normal theory for a confidence interval if $n$ is sufficiently large and $\theta$ is not too close to 0 or 1. This often doesn't work well in practice so there are other modifications. For instance, you can make use of the fact that $n \bar X_n \sim \ Bin(n, \theta)$. See the Wikipedia article on binomial proportion CIs for more.