{'fraction_non_alphanumeric': 0.01544943820224719, 'fraction_numerical': 0.0, 'mean_word_length': 4.941666666666666, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Confidence interval estimation of a rate and the choice of sample size.

The problem of estimating a rate or proportion is considered. Four methods for constructing an approximate confidence interval are discussed and compared via a simulation study. The most accurate method is found. Also, for each method a sharp upper bound (dependent only on the sample size) is given for the length of the confidence interval. By choosing an appropriate sample size this bound enables the practitioner to achieve a prespecified maximum length for the confidence interval without knowing the population rate. The striking result is that the most accurate method has the smallest bound, thus requiring the least sample units.