I think you need a polynomial distribution.
Here's a quick function - we take m balls in n bins and give x results, returning the vector of your metric for each of x trials:
myfunc <- function(m,n,x){
out <- rmultinom(x,m,rep(1,n))
-log(colSums(out == 0)/n)
}
myfunc(10,40,10)
[1] 0.1923719 0.2548922 0.2231436 0.2548922 0.2876821 0.2876821 0.2231436 0.2231436 0.2231436 0.2548922
Then you can get quantiles / confidence intervals:
out = myfunc(10,40,1000)
quantile(out, c(0.05,0.95))
5% 95%
0.1923719 0.2876821
source
share