Calculating confidence intervals for a proportion when there are no 'successes' in the sample I'm looking to analyse 400k replies to a Facebook-equivalent post to determine how many of them are written by bots, and how many of them are written by real people.
I don't have the resources to obtain all 400k replies, so I can only work with a sample (say, 4000 replies). I believe it's very likely that virtually all, but definitely not all of the replies are written by bots, but I need to prove it with some numbers.
From my reading, I understand that usually what you would do would be to:


*

*take, say, 40 chunks of 100 replies as your sample, 

*for each sample, determine what percentage is written by bots

*calculate the mean and standard deviation of the percentages of all 40 chunks

*calculate the standard error for the sample, based on the standard deviation / sqrt of 40 (chunks)

*calculate 95% significance of the mean percentage via mean of sample chunks +/- 1.96 x standard error


To what I understand, this can be done because we expect the data to be roughly normal. With skewed data, you need more samples (chunks, in this case). However, I'm expecting that the % of bots for each chunk will be 100% each time for my 40 samples (let's assume my expectation is right). So what I'm finding is that the sample results are uniform -->
Standard deviation = 0 --> SE = 0 --> 99.999% confidence interval = 100%, 100%, 100%. 
How do you infer on a population when all the sample means are uniform (i.e., all 100%), other than to conclude that the population's mean is also exactly the same (i.e., 100%). But I've only reviewed 400 / 400k replies. I can't really say that I am 99.999% confident that the % of bots for the population is 100% right?
 A: 
From my reading, I understand that usually what you would do would be to: - take, say, 40 chunks of 100 replies as your sample, - for each sample, determine what percentage is written by bots - calculate the mean and standard deviation of the percentages of all 40 chunks - calculate the standard error for the sample, based on the standard deviation / sqrt of 40 (chunks) - calculate 95% significance of the mean percentage via mean of sample chunks +/- 1.96 x standard error

It's almost certainly not necessary to break it up into chunks.

To what I understand, this can be done because we expect the data to be roughly normal.

Not when your proportion is very close to zero or 1. If the expected count of not-written-by-bots is no more than a handful, assuming normality isn't tenable.

I can't really say that I am 99.999% confident that the % of bots for the population is 100% right?

There's a commonly used approximate rule to get bounds on the proportion of "successes" when you observe only failures... sometimes called the "rule of 3".
This rule says that if no successes occur in $n$ observations, then $[0, 3/n]$ is an approximate 95% confidence interval for the proportion of successes in the population.
There are a number of ways of arriving at this rule, including using a Bayesian derivation of a credible interval.
If you get all of your sample of 4000 being bot-posts, you would have a 95% interval for the population proportion of non-bot posts of about $[0, 0.00075]$, or between 99.925% and 100% bot-posts in the population.
To do something more sophisticated, I'd suggest considering Nick Sabbe's comment relating to a Bayesian approach. If you have any prior information about the proportion you can incorporate it (not that it will make much difference with a large sample size); you can also incorporate homogeneity of proportion in this framework relatively easily.
