[R] small sample size confidence interval by bootstrap

Prof Brian Ripley ripley at stats.ox.ac.uk
Sat Apr 1 10:08:11 CEST 2006


On Fri, 31 Mar 2006, Urania Sun wrote:

> I only have 4 samples. I wish to get a confidence interval around the mean.
> Is it reasonable? If not, is there a way to compute a confidence interval
> for such small sample size's mean?

(BTW, the CI is for the population mean, not the sample mean.  I'll also 
assume that you are prepared to assume that you have a single random 
sample of size 4 from a location family.)

For a confidence interval, you need to make some assumptions about the 
distribution.  If you assume normality, you can use t.test, but the 
estimate of the standard deviation (on just 3 df) will be very variable 
and this will be reflected in the length of the CI.

Your subject line mentions the bootstrap.  You could use one of several 
different types of bootstrap CI but they also make assumptions, weaker 
assumptions that lead to even more variability.  For a sample of size 4 
there are (at most) 36 distinct means of bootstrap resamples, so none of 
the methods I know of will work adequately (and most not at all).

As an example to ponder, the Cauchy distribution does not even have a 
mean, but from small samples you will have no idea that is very 
long-tailed.  And getting a CI for a location parameter is often better 
done from a robust estimator of location than from the sample mean.
Alternatively, your true distribution might be a discrete distribution on 
5 points, and you have no idea at all about the 5th value.

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595




More information about the R-help mailing list