Generate Samples: Now, let’s sample 1000 times, every time we draw a sample of size 10, and compute the mean and SD for each sample.
means = replicate(1000,mean(rnorm(10,mean=5,sd=3))) sds = replicate(1000,sd(rnorm(10,mean=5,sd=3)))
Notice the difference between the rep() and replicate() functions in R
Limit Laws : Rules of Thumb -
For most distributions, n > 30 will give a sampling distribution that is nearly normal For fairly symmetric distributions, n > 15 For normal population distributions, the sampling distribution of the mean is always normally distributed
Confidence Intervals A point estimate is a single number, a confidence interval provides additional information about the variability of the estimate