Data Sampling › Sampling Methods {#sampling-methods}

Michael BrenndoerferMay 16, 20253 min read
Machine Learning from ScratchAll chapters
Part 1 of 9Statistics 101
Chapter 5Data Sampling › Sampling Methods {#sampling-methods}
Reading section 4 of 10 · Sampling Methods {#sampling-methods} · 3 minSection 4 of 10 · 3 min

Book contents

Section 4 of 10 · 3 min read

Data Sampling › Sampling Methods {#sampling-methods}One section · Sections in this chapter4 / 10 ↓
Reading tools Definitions & inline links

Choose your expertise level to adjust how many terms are explained. Beginners see more tooltips, experts see fewer to maintain reading flow. Hover over underlined terms for instant definitions.

Article links

Make inline references clickable

The method used to select a sample affects how accurately it represents the population. Sampling strategies differ in how they work, where they help, and when they are appropriate.

Simple Random Sampling

Simple random sampling gives every member of the population an equal probability of selection, making it the most straightforward probability sampling method. In practice, this might involve assigning each population member a unique number and using a random number generator to select the sample. For a digital dataset, this could mean randomly shuffling records and taking the first nn observations.

Simple random sampling has desirable theoretical properties by eliminating systematic selection bias and providing a basis for calculating standard errors and confidence intervals using classical formulas. However, it requires a complete list (sampling frame) of all population members, which may not be available or practical to construct. Additionally, simple random sampling may by chance produce samples that underrepresent or overrepresent important subgroups in the population.

Stratified Sampling

Stratified sampling addresses some limitations of simple random sampling by dividing the population into homogeneous subgroups (strata) based on characteristics like age, region, or income level, then drawing random samples from each stratum. The number of observations selected from each stratum can be proportional to the stratum's size in the population (proportionate allocation) or deliberately over- or under-sample certain strata (disproportionate allocation).

This approach offers several advantages. By ensuring representation from all important subgroups, stratified sampling can reduce sampling variability and produce more precise estimates for the same sample size. It also enables analysts to make reliable inferences about individual strata while still estimating overall population parameters. The cost is increased complexity in sample design and the need to define appropriate strata before sampling begins.

Cluster Sampling

Cluster sampling divides the population into groups (clusters) and randomly selects some clusters, then samples all or some members within chosen clusters. For example, a nationwide survey might randomly select cities (clusters), then survey households within those cities. This differs from stratified sampling in that we want clusters to be internally heterogeneous (mini-representations of the population) rather than homogeneous.

The primary motivation for cluster sampling is practical convenience and cost reduction. When populations are geographically dispersed, traveling to randomly selected individuals across the entire area becomes expensive. Concentrating data collection within selected clusters substantially reduces logistical complexity. However, observations within clusters often share characteristics, leading to higher sampling variability than simple random sampling of the same size. This design effect must be accounted for in analysis.

Convenience Sampling

Convenience sampling selects observations based on ease of access rather than probability-based selection mechanisms. Examples include surveying people walking by a particular location, analyzing data from volunteers who responded to an online advertisement, or using whatever data happens to be readily available.

While convenience sampling can provide quick, inexpensive preliminary insights, it frequently introduces substantial biases that limit generalizability. People who volunteer for surveys may differ systematically from those who do not. Locations convenient for data collection may attract non-representative populations. Convenience samples should be used cautiously, with careful consideration of how selection mechanisms might bias results, and ideally validated against probability-based samples when possible.