Stratified Sampling
Stratified sampling is a way to build a sample that “looks like” the population you care about, especially when that population has important subgroups. Instead of hoping a random sample includes enough of each subgroup, you plan for it.
What it is
In stratified sampling, you split the population into non-overlapping groups called strata based on a characteristic that matters (for example: age band, region, device type, or disease status). Then you take a random sample within each stratum. This ensures every stratum is represented, which reduces the chance that rare-but-important groups get missed.
How it’s done in practice
Common allocation choices include:
- Proportional allocation: sample each stratum in proportion to its population size (keeps the sample’s composition realistic).
- Disproportional (oversampling): sample more from small strata to get stable estimates (often paired with sampling weights later).
Concrete examples
- House prices: stratify by neighborhood type (urban/suburban/rural) so rural homes aren’t underrepresented.
- Medical measurements: stratify by age group and sex to ensure enough older patients to estimate risk reliably.
- Customer churn: stratify by plan tier; premium users may be few but crucial for revenue modeling.
Why it matters in AI/ML
Many ML failures come from “silent undercoverage”: the model performs well on the majority group but poorly on smaller groups. Stratified sampling helps with:
- Fairer evaluation: stratified train/validation/test splits preserve class or subgroup proportions.
- Better learning on rare classes: controlled oversampling can improve signal for minority outcomes.
- Lower-variance estimates: metrics like accuracy or AUC become more stable when strata are properly represented.
Stratified Sampling is a sampling method that divides a population into meaningful subgroups (strata) and then draws samples from each stratum, often in proportion to its size. It improves representativeness and reduces variance compared with simple random sampling, especially when strata differ systematically. In AI/ML, it helps build training and evaluation sets that preserve class or demographic proportions, e.g., sampling equally from rare and common classes to avoid biased models.
Imagine you’re making a fruit salad and want it to represent what’s in a big mixed fruit box. If you only scoop from the top, you might get mostly apples. A better plan is to first separate the fruit into groups—apples, oranges, bananas—then take a little from each group.
That’s stratified sampling: you split a population into meaningful subgroups (called strata, like age ranges or regions) and sample from each one. In statistics and AI/ML, this helps your training or survey data reflect important groups fairly, especially when some groups are small but important.