Calculating confidence intervals from the empirical distribution obtained with the bootstrap method

1.3k views Asked by At

I have calculated the empirical distribution of the sample mean using the bootstrap method, but now I would also need to calculate the confidence interval for the population mean using the empirical distribution I found.

Is there a way to do it automatically in Matlab given my state? If not, how would you find the 95% confidence interval for population mean?

1

There are 1 answers

4
Bill Denney On

The bootstrapped confidence intervals for the mean as you have calculated it are the quantiles of the distribution. So, it can be as simple as

quantile(myBootstrappedMeans, [0.05, 0.95])

That will give a 90% confidence interval for the vector myBootstrappedMeans. For reference, http://math.usask.ca/~longhai/doc/talks/slide-bootstrap.pdf

0.05 and 0.95 are for the 90% confidence interval (the middle 90% of the data). For a different confidence interval, you would just need to choose the middle quantiles of that data. So, for 95% you would use 0.025 and 0.975. To generalize, you would use (1-level)/2 and (0.5 + level/2) where level is the confidence interval (or confidence level) that you want.