This pages shows you how to draw a random sample from a defined population using the computer.
For our example we will use the data in the URL
so we can use the URL external data entry method. (These data are made up. No story goes with them.)
The R function sample
(on-line help)
generates random samples from a population. Each time this is resubmitted,
a new sample results. The first argument is the population to be sampled
(here x
) and the second argument is the sample size.
How does the sample resemble the population, how is it different?
What happens when you change the sample size?