Skip to content
Tutorials Center
My learning

Topics

Lesson 27 of 57 ยท Sampling and Experiments

Sampling Methods

Compare simple random, systematic, stratified and cluster sampling, plus convenience and other non-random methods, with Python simulations showing their accuracy.

How you pick the sample matters as much as how big it is. A good method gives every member of the population a known chance of being selected, so the sample is representative and the mathematics of probability applies. This lesson covers the main probability sampling methods (where chance does the choosing) and the common non-probability methods (where it does not), and when each is a good idea.

Simple random sampling

In a simple random sample (SRS) of size n, every possible group of n members is equally likely to be chosen. Think of drawing names from a hat. It is the benchmark: the formulas for standard errors and confidence intervals you will see later assume it.

Python Drawing a simple random sample

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Systematic sampling

Choose a random starting point, then take every k-th member from the list, where k = N / n. It is simple to run (every 20th customer, every 10th item on a belt). It works well unless the list has a hidden pattern that lines up with k: if every 10th item comes from the same machine, you sample only that machine.

Stratified sampling

Divide the population into non-overlapping groups called strata that are internally similar (year of study, region, age band), then take a random sample within each stratum. Either use the same fraction in each (proportional allocation) or oversample small strata. Stratification guarantees that every group is represented and usually gives a smaller standard error than an SRS of the same size when the groups differ from each other.

Python Stratified versus simple random

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

The stratified estimates cluster much more tightly because the large differences between the groups no longer add noise.

Cluster sampling

When a full list of individuals is unavailable or travel is expensive, divide the population into naturally occurring clusters (schools, villages, city blocks), randomly pick some clusters, and survey everyone (or a random subsample) inside them. It is cheap and practical, but each cluster is internally alike, so you get less information per person than an SRS: expect a larger standard error.

The difference to remember: strata are homogeneous and you sample from every stratum; clusters are miniature versions of the population and you sample some clusters.

flowchart TD
    A["Probability sampling"] --> B["Simple random: any group equally likely"]
    A --> C["Systematic: every k-th member"]
    A --> D["Stratified: sample inside every group"]
    A --> E["Cluster: sample whole groups"]

Four probability methods, all with known selection chances.

Non-probability methods

These are easy but cannot support valid statistical inference, because selection chances are unknown.

  • Convenience sampling: whoever is easiest to reach (people leaving a shop, volunteers).
  • Voluntary response: people choose to respond (online polls, reviews). Those with strong opinions respond most, so results are skewed.
  • Quota sampling: fill quotas by group (50% women, 50% men), but interviewers choose whom to ask.
  • Snowball sampling: participants recruit others. Useful for hidden populations, but biased toward connected people.

Non-probability samples can still be useful for exploring ideas or testing a design. Just do not attach a margin of error to them, and be honest about whom they represent.

Sample size and the finite population correction

The standard error sigma / sqrt(n) assumes that the sample is a small part of the population. If you sample more than about 5% of a finite population without replacement, multiply the standard error by the finite population correction sqrt((N - n) / (N - 1)). Sampling the whole population (n = N) gives a correction of 0: no sampling error remains.

Python Finite population correction

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Choosing a method

  1. Do you have a complete list of members? If yes, prefer an SRS or stratified sample.
  2. Are there clear subgroups you must report on? Stratify.
  3. Is the population spread out and costly to reach? Consider cluster sampling.
  4. Is the method truly random? If people select themselves, treat the results as anecdote.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. A researcher splits students into first-, second- and third-year groups and randomly samples from each. This is:

    Sampling within every group of a split population is stratified sampling.
  2. 2. A school district randomly picks 8 of its 60 schools and surveys all students in those 8. This is:

    Entire groups (schools) are selected at random, which is cluster sampling.
  3. 3. An online poll asks visitors to click a link to vote. This is mainly a problem of:

    People with strong opinions are more likely to respond, so the sample is not representative.
  4. 4. Why can systematic sampling fail?

    If the list repeats with period k, every k-th member could come from the same type.

Summary

  • Probability sampling gives every member a known chance of selection; only then do standard formulas apply.
  • Simple random is the benchmark; stratified reduces error when groups differ; cluster saves cost but increases error; systematic is easy but pattern-sensitive.
  • Convenience and voluntary samples are cheap but biased.
  • Sampling a large share of a finite population calls for the finite population correction.

Next: Sampling Distributions and the Central Limit Theorem