Number of simulations nrep

Sampling theory applies to the number of simulations nrep just as much as the sample size n within a simulation.

means and SDs from 24 sims N(0,1) with n=10



Now, let’s do the same with a number of repeats nrep of 1000.

means and SDs from 1000 sims N(0,1) with n=10



Conclusion

The number of simulations needs to be a big enough number to obtain a good representation of the distribution of the simulation results, e.g. 1000.


YOUR TURN:
The code generating the data and plots presented above are included in your exercice script. Feel free to modify the parameters of the functions that simulate data and plot the results to better understand the principles presented in these two pages, but, at this stage, there is no need to fully understand the code that generates the plots.


Back to top