Calculating confidence intervals for a proportion

Sensitivity and specificity are based upon a sample of test results around which there is uncertainty. In epidemiology, uncertainty can  be expressed as a confidence interval (CI). Typically, they are expressed as a 95% confidence interval (95% CI). Briefly, confidence intervals indicate the precision of the estimate where a wide confidence interval indicates that the estimate is not very precise. In statistical terms, if we were to repeat the procedure using 100 different samples of the same size from the same population, the true proportion would be expected to lie within 95 of the 100 resulting confidence intervals. Implicit in presenting 95% CI is the assumption that the sample from which the CI is derived is representative of the population from which the sample was drawn. Representativeness is best achieved when the sample is randomly drawn from the population of interest. As long as the sample size is greater than 30, the 95% CI can be calculated using equation 1.1.2.c.

Equation 1.1.2.c

In cases where the sample size is smaller than 30, where np < 5, n(1-p) < 5  or the proportion estimate is close to 0 or 1.0, standard statistical software tools (e.g. SAS JMP) will use the binomial distribution to calculate the CI.  Estimates can also be determined by replacing Zα in equation 1.1.2.c above with the critical value from a published binomial statistical table.