0
$\begingroup$

As a word of background, I want to show that certain result is stable when averaging over a large number of simulations, but could be just a lucky draw with a small number of simulations.

I have a computationally expensive, complicated stochastic process and I am bootstrapping the mean result over a number of simulations - in particular I am finding the bootstrap confidence interval for this mean. My bootstrap confidence interval is stable when I run a lot (say, $10^5$) simulations and draw with replacement large samples (again, $10^5$). I would like to find the confidence intervals for the small sample mean (say, $10^3$).

For simplicity of the MWE, assume the generating process is just a random draw from $\mathcal{N}(0,1)$:

require(boot)
fboot <- function(a,i) mean(a[i])
iterations <- 10
sim_results <- apply(matrix(rnorm(iterations^2,0,1),iterations,iterations),2,mean)
b <- boot(sim_results, fboot, R=1000)
boot.ci(b, conf=0.95, type="norm")

How do I find the CI for

iterations <- 10

when every time I run the above I get completely different ones because my simulated sample is so small? I understand I can increase the number of iterations in the simulation, but this will give me the CI for a larger bootstrap draw - I want the bootstrap draw to be size 10.

$\endgroup$
  • $\begingroup$ Any comments would be most useful - please let me know if the question isn't clear! $\endgroup$ – adrug Apr 10 '15 at 18:29
  • $\begingroup$ Do you want to find a confidence interval for a true mean of means? $\endgroup$ – Michael M Apr 10 '15 at 19:44
  • $\begingroup$ I want to find a confidence interval for a true value of means (I misspoke earlier) - I want to show, that it's very wide if you take a sample mean of a sample of 10, but narrow when you take a sample mean of a sample of a 1000. $\endgroup$ – adrug Apr 10 '15 at 20:46
  • $\begingroup$ You take the CI of the 'completely different ones' thus getting a very wide interval - isn't this illustrating precisely your point? $\endgroup$ – katya May 9 '15 at 1:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.