I have count data from survey transects at several sites (typical n ~10). I am interested in whether the sample mean exceeds a threshold at [1-alpha]% confidence level (...knowing I have low power), and have used the typical formula for standard error of the mean: SD(x) / sqrt(n-1), which takes advantage of the property that the sampling distribution of the sample mean is approximately normal regardless of data's distribution.

Most the confidence intervals seem reasonable, but in some sites with odd distribution of data (e.g., lots of zeros, or many low values and a few very high), the CI will include negative values. I want to show the analysis to lay persons and would rather not have to explain why implausible population means of negative or zero values are in the confidence interval.

Can I ask for some input on whether there are other methods I might want to use for calculating SE of the mean and how I might implement and interpret/describe them?

Here are some of my data that produce negative lower 95% CI (R syntax):

A<- c(0, 0, 0, 9, 0, 0, 0, 0, 0, 4)
B<- c(0, 0, 0, 1, 0, 0, 0, 0, 0)
C<- c(10, 5, 8, 10, 4, 3, 4, 60, 1, 2)

Sorry I wasn't able to find an analogous example in the archives with a solution that seemed meaningful for my case (although this seemed relevant)

  • $\begingroup$ Did you try to fit some model, like a negative binomial one? $\endgroup$ Commented Apr 17, 2016 at 21:21
  • $\begingroup$ Using R package MASS (e.g., glm.nb(C~1) glm(C~1,family=quasipoisson) ), negative binomial won't fit data A or B, although it does for C. Quasipoisson works for all three. What benefit would these models give me over just calculating SE with the standard formula on log(C)?besides is seems to deal with data[i]= log(0) = -Inf $\endgroup$
    – Dave M
    Commented Apr 17, 2016 at 21:39

2 Answers 2


I suggest you use a Wald interval with a log link function. Alternatively, you can invert the cdf of a $\text{Poisson}(n\lambda)$ distribution since the sum of $\text{Poisson}(\lambda)$ distributed observations follows a $\text{Poisson}(n\lambda)$ distribution. Either method (Wald with log link or inverted Poisson CDF) will ensure the lower confidence limit does not go below zero. It will also lengthen the upper confidence limit, improving the inference. I am not sure about the R syntax to utilize a log link function, but you should be able to find it in the documentation for glm().

The quasi-Poisson model and empirical standard error should be fine. However, this might preclude you from inverting a Poisson CDF since your model is no longer Poisson. You could use a gamma approximation for the sampling distribution to account for the over- or under-dispersion, but this might be more effort than you are looking for. If you need more details I can amend my answer.


Firstly, counts often have large variance and your sample size (n = 10) seems too small for a robust statistical analysis (and too small to fit count models as commented by @Dave M). Seriously, collect more data or repeat the study with a much larger number of transects.
Anyhow, for counts you should be fitting GLMs with an appropriate error distribution (and link) like poisson, quasipoisson (glm), negative binomial (MASS::glm.nb), hurdle (pcsl::hurdle) or zero-inflated (pcsl::zeroinfl). You can even include an offset if the transects have variable dimensions. Model diagnostics (use quantile residuals where possible for GLMs, e.g. statmod::qresiduals) will tell you if you have picked a suitable error distribution.
Having fitted some GLM to the data, calculate confidence intervals based on profile likelihoods where possible (rather than Wald intervals).
Some useful references for modelling counts, especially for ecologists, are: Martin et al. 2005, Ver Hoef and Boveng 2007 O'Hara & Kotze 2010 and Zuur et al. 2010.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.