Estimating total number of objects based on sample weights I have a collection of bugs which is unfeasible to count because they are too numerous, tiny, and fragile. I would like to estimate how many bugs are in the collection. So, I thought to do a simple plot based on weights of samples. I would weigh x bugs, several times, and then plot sample size against sample weight. Then I could look at the graph at the weight of the entire collection, to get the estimated count. Considering that I can weigh the entire collection as a whole, how do I determine what sample size I would need? And how do I consider the error in the weights, i.e. the amount of spread in the weights recorded for samples of a given size?
 A: If you consider $w_i$, $i=1,...$ as the weight of each bug, then the total weight of the population is $X=\sum_i w_i$. Now, trivially $n=\frac{X}{Y}$ where $Y=\frac{1}{n}\sum_i w_i$ is the average weight of an individual. 
You can estimate $n$ if you can estimate $X$ (by weighing the whole population) and $Y$. Estimating $Y$ can be accomplished by weighing several samples of known (e.g. the same) sample size. If you use the same sample size (say $k$) each time (say $m$ times) then $Y=\tfrac{1}{m}(\sum_j \frac{1}{k}(\sum_l w_{j,l}))=\tfrac{1}{mk}\sum_{j,l} w_{j,l}$ is just an empirical average of $mk$ draws from the distribution of weights. The distribution of $Y$ then, will be the sampling distribution of the mean, which according to the CLT approaches Gaussian.
Then, you can model $n=\frac{X}{Y}$ as a ratio distribution. If you assume both the numerator and denominator are independent Gaussian random variables, then there is a closed form expression for the ratio. In particular you could use the Geary–Hinkley transform $t\approx \frac{\mu_{Y} n+\mu_X}{\sqrt{\sigma_Y^2 n^2 + \sigma_X^2}}$ which will cause $t$ to be approximately a standard Gaussian. The variance of $X$ may be quite small depending on the precision of your scale. The variance of $Y$ will depend on how many samples you draw (and your scale). 
