confIntDemo | R Documentation |
Draw many random samples and compute confidence interval. How many intervals capture the true mean?
confIntDemo(distr = "normal", size = 20, conf.level = 0.95)
distr |
distribution of the population to be sampled. Options include
|
size |
sample size |
conf.level |
confidence level. |
This simulation will draw 100 random samples from a given population distribution and compute the correpsonding confidence intervals. The 100 intervals will be drawn with an indication of the ones that missed the true mean. A histogram of the population will also be created.
The command invisibly returns the fraction of intervals that capture the true mean.
Laura Chihara
confIntDemo()
confIntDemo(distr = "exponential", size = 40)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.