Selecting a sample manually (raffle tickets)

When choosing a random sample, each population member must have the same chance of being included in the sample. How can we select a random sample in practice? One method of selecting a random sample of size n is...

  1. Write the names (or other identification) of all population members on identical pieces of paper,
  2. Mix them thoroughly in a box
  3. Select n pieces of paper (with or without replacement).

This method is often used for raffles, but thorough mixing is difficult for large populations and it is rarely used in research applications.

Random digits

An alternative method of selecting a random sample involves generating random digits (0, 1, ..., 9). There are several ways to generate random digits such that each has the same chance of appearing.

  • Roll a 10-sided die several times. (6-sided dice are more common, but 10-sided dice are also used in various games — especially fantasy games.)
  • Books of random digits have been published. Open a page at random then use a sequence of digits starting from an arbitrary position on the page.
  • Some computer programs (e.g. Microsoft Excel) contain functions that generate random numbers. (Computer-generated values should strictly be called pseudo-random numbers, but the distinction is not important here.)
  • Many calculators have a 'random number' key that generates (pseudo-) random numbers.

Concatenating 2 or more of these random digits gives a larger random number.

Click the button Generate digit to generate a random digit.

Concatenating three such random digits gives a random number between 0 and 999. Click Generate value to find a random number in this range.

Random number between 0 and k

A random number that is equally likely to be any number between 0 and 357 can be found by repeatedly generating 3-digit numbers (between 0 and 999) until a value between 0 and 357 is obtained.

It is easier however to use a spreadsheet such as Excel — it has a function designed for this purpose, "=RANDBEWEEN(0, 357)".

Selecting a random sample

To select a random sample without replacement using random numbers,

  1. Number all population members, starting from index 0.
  2. Generate a random value between 0 and the largest population index.
  3. If sampling without replacement and the generated index has already been selected, go back to step 2 and select another index.
  4. Add the selected population member to the sample, then repeat steps 2. and 3. until a large enough sample has been selected.

The diagram below illustrates sampling without replacement from a population of 56 individuals. They have been numbered from 0 to 55.

Click Random index. If the resulting two digits are between 0 and 55, the corresponding individual is added to the sample. Otherwise, an error message appears and a new random value must be generated.

Repeat several times to add more individuals to the sample. Note that: