Sampling Techniques
Sampling is the process of selecting a subset (sample) from a larger group (population) so that conclusions drawn from the sample can be generalised to the population.
Key Terminology
| Term | Meaning |
|---|---|
| Population (N) | The complete set of all items/individuals of interest |
| Sample (n) | The subset actually observed |
| Sampling frame | The accessible list from which the sample is drawn (e.g. the college's student register) |
| Sampling unit | A single element that can be selected |
| Parameter | A numerical property of the population (μ, σ) |
| Statistic | The corresponding property computed from the sample (x̄, s) |
| Sampling error | The difference between statistic and parameter due to chance |
| Bias | Systematic error that does not shrink with sample size |
Why Sample at All?
- Cost — surveying 1.4 billion people is impossible; 5,000 well-chosen people is not.
- Time — results are needed before they become irrelevant.
- Feasibility — destructive testing (crash tests, food-quality tests) rules out testing everything.
- Accuracy — a small, well-controlled sample often beats a huge sloppy census, because effort per unit is higher.
A. Probability (Random) Sampling
Every member has a known, non-zero probability of selection — this is what makes statistical inference (Unit 2) valid.
1. Simple Random Sampling (SRS)
Every unit has an equal chance of being selected; selection is by lottery or random number generator.
- With replacement — a selected unit returns to the pool and can be picked again
- Without replacement — more common in practice
| Advantages | Disadvantages |
|---|---|
| Unbiased; simplest to understand | Needs a complete sampling frame |
| Easy to compute sampling error | May miss small subgroups entirely |
| No researcher influence | Expensive if the population is geographically spread |
import pandas as pd
import numpy as np
np.random.seed(42)
population = pd.DataFrame({
"student_id": range(1, 101),
"marks": np.random.randint(35, 100, 100),
"section": np.random.choice(["A", "B", "C"], 100, p=[0.5, 0.3, 0.2]),
})
# Simple random sample of 10 students
srs = population.sample(n=10, random_state=1)
print(srs["marks"].mean(), "vs population", round(population["marks"].mean(), 2))
2. Systematic Sampling
Select every k-th unit after a random start, where k = N / n is the sampling interval.
N = 1000 students, n = 100 needed
k = 1000 / 100 = 10
Random start r between 1 and 10, say r = 7
Selected: 7, 17, 27, 37, 47, ... , 997
| Advantages | Disadvantages |
|---|---|
| Simple and quick to execute | Dangerous if the list has a periodic pattern matching k |
| Spreads the sample evenly over the frame | Needs to know N in advance |
Periodicity trap: if a list of houses repeats "corner house every 10th" and k = 10, every sampled house is a corner house — a systematically biased sample.
k = len(population) // 10
start = np.random.randint(0, k)
systematic = population.iloc[start::k]
print(len(systematic), "students selected, every", k, "th")
3. Stratified Sampling
Divide the population into homogeneous, non-overlapping strata (e.g. by gender, section, income band), then randomly sample within each stratum.
- Proportionate — each stratum contributes in proportion to its share of the population
- Disproportionate — small but important strata are over-sampled
| Advantages | Disadvantages |
|---|---|
| Guarantees representation of every subgroup | Requires prior knowledge of strata membership |
| Lower sampling error than SRS for the same n | More complex to organise and analyse |
| Allows comparison between strata | Wrong stratification variable adds no benefit |
# Proportionate stratified sample: 20% from each section
stratified = (population
.groupby("section", group_keys=False)
.apply(lambda g: g.sample(frac=0.2, random_state=1)))
print(stratified["section"].value_counts())
# A 10
# B 6
# C 4 -> proportions preserved
4. Cluster Sampling
Divide the population into naturally occurring clusters (villages, colleges, city blocks), randomly select entire clusters, and survey everyone inside the chosen clusters.
| Advantages | Disadvantages |
|---|---|
| Cheapest for geographically dispersed populations | Highest sampling error of all probability methods |
| No complete list of individuals needed — only of clusters | Clusters may be internally homogeneous → less information |
Stratified vs Cluster — The Classic Exam Question
| Basis | Stratified Sampling | Cluster Sampling |
|---|---|---|
| Group composition | Strata are internally homogeneous, different from each other | Clusters are internally heterogeneous, similar to each other |
| Selection | Sample within every stratum | Select whole clusters, ignore the rest |
| Purpose | Increase precision | Reduce cost |
| Groups used | All strata used | Only selected clusters used |
| Example | Sample 10 students from each of A, B, C sections | Randomly pick 3 colleges, survey all their students |
5. Multi-stage Sampling
Sampling applied in stages: e.g. randomly select states → within them districts → within them villages → within them households. Used in national surveys like the NSSO and the Census follow-up surveys.
B. Non-Probability Sampling
Selection probability is unknown; results cannot be statistically generalised, but these methods are cheap and useful for exploratory work.
| Technique | How units are chosen | Typical use | Main risk |
|---|---|---|---|
| Convenience | Whoever is easiest to reach | Quick pilot studies, classroom surveys | Severe selection bias |
| Judgemental / Purposive | Expert picks "typical" or "informative" units | Case studies, expert panels | Researcher bias |
| Quota | Fixed counts per category filled by convenience | Market research | Non-random within quota |
| Snowball | Existing participants refer new ones | Hidden/hard-to-reach populations (e.g. rare disease patients) | Network bias — friends resemble friends |
Sample Size — What Drives It
For estimating a population mean:
n = (Z × σ / E)²
Z = z-score for the confidence level (1.96 for 95%)
σ = population standard deviation (estimated)
E = margin of error you can tolerate
Example: σ = 15 marks, E = 2 marks, 95% confidence
n = (1.96 × 15 / 2)² = (14.7)² ≈ 216 students
Larger samples reduce sampling error (proportional to 1/√n) — note the diminishing returns: quadrupling n only halves the error.
Sampling Bias — What to Watch For
| Bias | Description | Example |
|---|---|---|
| Selection bias | Some groups systematically more likely to be chosen | Online-only survey excludes those without internet |
| Non-response bias | Non-responders differ from responders | Only satisfied customers bother to reply |
| Survivorship bias | Only "surviving" units observed | Analysing only companies still in business |
| Undercoverage | Sampling frame misses part of the population | Voter list missing recent migrants |
| Volunteer bias | Self-selected participants are unusual | Online polls on news sites |
A well-drawn sample is the bridge between the data you have and the population you want to talk about — and every inferential technique in Unit 2 silently assumes that bridge is sound.