Confidence interval for a binomial proportion when the number of trials is uncertain?

Hopefully a simple question; here's the setup:

• I'm trying to estimate the prevalence of a medical condition in a specific population.
• The size of the population(s) of interest is itself uncertain.
• I want to construct a confidence interval for the prevalence. I'd like also to be able to do some hypothesis testing to compare the prevalence of the condition between different populations of uncertain size, to ask questions like: is the prevalence of the condition higher or lower in population A than population B, and is the difference statistically significant?
• If N was fixed, I'd simply use a Clopper–Pearson interval or similar and be done. What I have instead is a best estimate and 95% credible interval for N from a paper that neglected to mention how they arrived at their results.
• The lower and upper bounds on N are not symmetric around N.

Is it acceptable to estimate the prevalence and the 95% confidence interval by:

• Use the best estimate of N to calculate the best estimate of the prevalence,
• Use the lower limit on N to calculate the lower limit of the prevalence,
• Use the upper limit on N to calculate the upper limit of the prevalence?

Does it make sense to use a similar procedure to construct a range of p-values for a hypothesis test and discriminate on the basis of whether the range of p-values contains values ≤ 5%?

If this procedure is not good (and why?), what procedure would you recommend instead? Is there any literature that backs up my procedure or any alternative suggested procedure?

• Is the population much larger than the number tested for the condition? – Henry Sep 21 at 19:01
• Typically, yes. By about a factor of a few thousand. There are two types of population I want to compare: 1. Populations that correspond to the US population segmented by race, ethnicity, gender. These numbers are the tens or hundreds of millions. 2. Subpopulations of the above. They are about 1% the size of those above. In populations of type 1, the condition affects hundreds or thousands a year. In populations of type 2, the condition affects about 20-30 a year. It is thought that the condition occurs at a higher rate than in population of type 1. I want to test this. – Andrew John Lowe Sep 21 at 21:07
• Perhaps you could take a Bayesian approach and represent the unknown number of trials with a distribution (e.g. a log normal with median equal to the census counts). Then you can find the posterior probability that one prevalence is greater than the other. – PedroSebe Sep 22 at 2:23
• Maybe. The percent margin of error in the census figures is about ±0.1%, and I ignore that because it's not the dominant source of uncertainty. I split the US census figures into two population categories: type 1 and type 2. The size of the subpopulations in category 2 are about 0.3 to 1% of those in category 1. That sets the lower and upper limits on the population estimates for category 2; for category 1, the estimates are the remainder. This is the dominant source of uncertainty. Those percentages are from a 95% credible interval, but I don't know the details of how it was obtained. – Andrew John Lowe Sep 22 at 11:33