Introduction
Sampling is the practice of selecting a subset of a larger population to study, used when examining every member of the population is impractical, too costly, or simply impossible. The central goal of any sampling method is representativeness: the sample should reflect the characteristics of the full population closely enough that conclusions drawn from the sample generalize back to it. A sample that is not representative, no matter how large, can lead to systematically wrong conclusions, which is why the method used to choose a sample matters as much as its size.
Cricket analogy: A scout doesn't watch every club match in the country to judge a region's talent pool; they watch a representative subset of matches, and if that subset only includes one style of ground, the scout's read on the whole region will be systematically wrong, the same risk as an unrepresentative sample.
Explanation
Simple random sampling gives every member of the population an equal chance of being selected, typically implemented by assigning each member a number and drawing numbers at random; it is the conceptual baseline against which other methods are compared, but it can by chance under-represent a small subgroup that matters to the analysis. Stratified sampling addresses this by first dividing the population into subgroups, or strata, based on a characteristic such as region or age band, and then drawing a random sample from within each stratum, often in proportion to that stratum's share of the population; this guarantees every subgroup is represented rather than leaving it to chance.
Cricket analogy: Drawing player names from a hat gives every player an equal shot at being surveyed, but might by chance miss the spin-bowling subgroup entirely; splitting the pool by playing role first and drawing from each role's group guarantees spin bowlers are represented, mirroring stratified sampling.
Systematic sampling selects members at a fixed interval from an ordered list, such as every tenth record after a randomly chosen starting point, which is simple to implement and spreads the sample evenly across the population, but it risks introducing bias if the list itself has a hidden periodic pattern that happens to align with the sampling interval. Convenience sampling, by contrast, selects whichever members are easiest to reach, such as the first hundred survey respondents; it is fast and cheap but generally the least representative method, since ease of access is rarely unrelated to the characteristic being studied, and results from convenience samples should be generalized with caution.
Cricket analogy: Selecting every tenth name from an alphabetically ordered squad list spreads the sample evenly, but surveying only whichever players happen to be in the dressing room that day is convenience sampling, quick but risking a skewed read since availability often correlates with form or role.
Example
import pandas as pd
df = pd.read_csv("survey_population.csv")
# Simple random sample of 200 rows
simple_sample = df.sample(n=200, random_state=1)
# Stratified sample: proportional draw from each region
stratified_sample = (
df.groupby("region", group_keys=False)
.apply(lambda g: g.sample(frac=0.1, random_state=1))
)
# Systematic sample: every 10th row after a random start
start = 3
systematic_sample = df.iloc[start::10]Analysis
The frac=0.1 within each region group in the stratified example ensures every region contributes roughly ten percent of its own members, so a small region is neither drowned out nor overrepresented the way a pure simple random sample might do it by chance. The systematic sample's reliance on df.iloc[start::10] assumes the DataFrame's row order carries no hidden periodicity; if, for instance, survey_population.csv happened to be sorted such that every tenth row corresponded to the same submission batch or time slot, the systematic sample would inherit that pattern instead of representing the population evenly, which is why checking how a dataset is ordered before applying systematic sampling is a necessary precaution.
Cricket analogy: Drawing ten percent from each playing region's squad list guarantees a small region isn't drowned out by chance, but picking every tenth name from a list secretly sorted by team would systematically skip whole teams instead of sampling evenly, undermining a systematic sample.
Key Takeaways
- Sampling selects a subset of a population when studying every member is impractical; representativeness matters more than raw sample size.
- Simple random sampling gives every member equal selection probability but can under-represent small subgroups by chance.
- Stratified sampling divides the population into subgroups and samples within each, guaranteeing every subgroup's representation.
- Systematic sampling picks members at a fixed interval from an ordered list and risks bias if the list has a hidden periodic pattern.
- Convenience sampling selects whichever members are easiest to reach and is generally the least representative method.
Practice what you learned
1. What is the primary goal of any sampling method?
2. What distinguishes stratified sampling from simple random sampling?
3. What is a key risk of systematic sampling?
4. Why is convenience sampling generally considered the least representative method?
Was this page helpful?
You May Also Like
Outlier Detection
How the IQR rule and z-score method identify data points that fall unusually far from the rest of a dataset.
DataFrames Explained
How a DataFrame organizes labeled rows and columns of data in memory and enables filtering, grouping, and joining operations.
A/B Testing Basics
How splitting users into control and treatment groups and comparing outcomes with statistical significance testing reveals a change's true effect.