Sampling: Estimating the Whole from a Small Part
Sampling lets you understand a large group by studying a small, representative piece. Think of it like tasting a spoonful of soup to season the whole pot. It's used in A/B tests and polls, but the main footgun is a biased sample.
THE MENTAL MODEL: Sampling is the principle of making a judgment about a whole population by examining a small, representative part. Instead of analyzing every user's click or testing every product off an assembly line, you analyze a carefully chosen subset to infer characteristics of the whole. This saves immense time, money, and computational resources.
HOW IT WORKS: The core challenge is selecting a sample that is representative of the population. If your sample is skewed, your conclusions will be wrong. This error is called selection bias. For example, estimating average adult height by only sampling professional basketball players would yield a wildly inaccurate result. Statisticians use techniques like simple random sampling, where every individual has an equal chance of being selected, to minimize bias and ensure the sample accurately reflects the larger group.
WHEN TO USE IT: Use sampling when analyzing the entire population is impractical or impossible. Three common scenarios: first, in user analytics, like A/B testing a new feature on 1% of users to predict its impact on everyone. Second, in opinion polling, where surveyors contact a few thousand people to estimate national sentiment. Third, in manufacturing quality assurance, where a factory tests a small batch of products to ensure the entire production run meets standards.
WHEN NOT TO USE IT: Avoid sampling when the population is small and easily measurable, as analyzing the whole group gives you perfect accuracy. It's also inappropriate when every single data point is critical. For instance, you wouldn't 'sample' your bank transactions to see if you've been paid; you need to check the entire ledger. For mission-critical systems, you would run exhaustive tests rather than sampled ones.
ONE CANONICAL EXAMPLE: A website wants to know if changing a button color from blue to green increases clicks. Instead of showing the green button to all 10 million users, they randomly select a 1% sample (100,000 users). Half of this sample sees the old blue button, and the other half sees the new green button. By comparing click rates between these two small groups, the company can confidently estimate how the change would perform across all 10 million users, without risking a negative impact on their entire user base.
Read the original → en.wikipedia.org
Get five bites like this every day.
Tezvyn delivers a daily feed of 60-second tech bites with quizzes to lock in what you learn.