Can you explain why the confidence interval of binomial distribution shrinks with the number of successes terms?
n <- 100
res <- vector(length = n)
for ( i in 1:n) {
p <- binom.test(i, 1000, conf.level = 0.95, alternative = "two.sided")
res[i] <- diff(p$conf.int)
}
plot(res, type = "l", ylim=c(0, 0.09))
grid()
For example single success has 5x less wide confidence interval than 50 successes. I would have thought large number of successes should have a narrower confidence interval than single success. I am aware of the variance formula of $p(1-p)/N$ but it sounds a bit counterintuitive when less number of success are having a narrower confidence band