sim.ci.mean(.05, 10, 1, 5000)
# Should return (within sampling error):
# Coverage Lower Error Upper Error Ave CI Width
# 0.9484 0.0264 0.0252 1.392041
sim.ci.mean(.05, 40, 4, 1000)
# Should return (within sampling error):
# Coverage Lower Error Upper Error Ave CI Width
# 0.94722 0.01738 0.0354 0.6333067
Run the code above in your browser using DataLab