Estimate prevalence: confidence interval for a simple random sample

Theory

To determine the confidence interval of a proportion estimated from a simple random sampling, the standard error (SE) of the proportion must be firstly calculated, based on the following equation:

Where:
p The prevalence estimated from simple random sampling.
n The number of individuals included in the sample from which the prevalence was estimated.
f The sampling fraction, is the ratio between sample size and population size (n/N). Its effect is important only when its value is ≥ 0.1.

The confidence interval is calculated as follows:

Where:
p The prevalence estimated from simple random sampling.
z The value obtained from the standard normal distribution. To each value of confidence there is a correspondent value of z. The levels of confidence more frequently used in biological studies are 90%, 95% and 99%. The values of z correspondent to them are 1.64, 1.96, and 2.58 respectively.
SE The standard error of the proportion.