I've got a binary characteristic and a population $S$ with size $n$ and $P[X] = p$ such that $p$ may be small and $n$ is extremely large. Within this population are subpopulations of various sizes $S\_0, S\_1, \dots, S\_k \subset S$.

I'd like to be able to select each subpopulation in which $p\_i < p$ with some concept of statistical significance.

My first inclination is to observe that the standard error on each $p\_i$ is $SE\_i = \sqrt{\frac{\hat{p\_i}(1-\hat{p\_i})}{n}}$ and to compare upper bounds on confidence intervals. $\{S\_i \; | \; \hat{p\_i} + 3 \cdot SE\_i < p\}$, for example. But when $\hat{p\_i} = 0$, then $SE\_i = 0$, and this upper bound is 0 even for the smallest subpopulations (like those where $n\_i = 1$).

Is there any way to express uncertainty in $p\_i$ when $\hat{p\_i} = 0$? Maybe through use of $p$ as a prior?

**Edit:** It looks like the Jeffreys interval as described in [Brown et al.](http://dx.doi.org/10.1214/ss/1009213286) is about what I'm after, though I'm not as-of-yet sure how to apply it.