In the following we will create a finite population of size 500 by taking a random sample from a gamma distribution. We will then generate simple random samples without replacement from this population and calculate the sample means. To study the sampling distribution of the sample means we will construct a histogram and find some of the quantiles.
To learn more about the rgamma function click on
(
on-line help)
Another useful family of skewed distributions is the log-normal. It
depends on two parameters the mean and sd (standard deviation) of its
log which has a normal distribution. For example rlnorm(10,4.3,.5)
generates a random sample of size 10 from a distribution whose
log has a normal distribution with mean=4.3 and sd=0.5.