I have a small sample of 19 observations, with a mean of 8.105 and sd of 6.064. I want to calculate a 95% CI for the mean. My data is not normally distributed, according to the Q-Q plot. Assuming normality, I get a CI of [5.183,11.028]. I tried calculating a CI using bootstrap, but I am not sure I did it okay. The result was [5.372,10.84]. Does it makes sense that it's narrower? Is there another method of doing it (maybe using LOG transformation).
My R code is:
library("mosaic") xbar = mean(X) trials = do(1000) * mean(resample(X)) histogram(~mean, data = trials, col="gray") se = sd(~ mean , data = trials) xbar - 1.96*se xbar + 1.96*se