There seem to be a lot of different confidence interval variations for proportions (e.g. Wald, Wilson, Agresti-Coull, Jeffreys). I can't seem to find any variations for means though. What options are available?
The reason is, I have an issue where the mean is close to zero and the sample size is low. The confidence interval then goes below zero, which is impossible for this sort of data. Something like the Wilson interval for proportions (which doesn't go below zero), but for means would be useful.
I have added an extreme (made up) case as an example (using R). This would only the be case if I was using a grouping variables where some of the groups had small sample sizes. In this case, the lower bound of group 1 is below zero and the upper bound is above 100, even though scores can only be between 0 and 100.
library(tidyverse) df <- tibble(score = c(25, 100, 0, 25, 25, 0, 0, 100, 0, 100, 100, 75, 0, 100), counts = 1, groups = c(rep(c(1,2), 7))) %>% mutate(groups = factor(groups)) df %>% group_by(groups) %>% summarise(mean = mean(score), var = var(score), sd = sqrt(var), count = sum(counts), se = sd/sqrt(count)) %>% mutate(lower = mean - (se*1.96), upper = mean + (se*1.96))
# A tibble: 2 x 8 groups mean var sd count se lower upper <fct> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> 1 1 21.4 1339. 36.6 7 13.8 -5.68 48.5 2 2 71.4 1756. 41.9 7 15.8 40.4 102.