Sampling selects observations from a larger population when measuring everyone is impractical or impossible. A sample is used to estimate or learn about that larger group, but its usefulness depends on what population it represents and the conditions under which it was collected. section 1.0 section 2.6
A dorm sleep study
Suppose a dorm has 64 residents, but only six sleep-tracking watches are available. Randomly choosing six residents creates a sample of n = 6 from a population of N = 64. If their average sleep is 5.2 hours, that average can suggest a dorm-wide pattern, but a sample this small may miss important differences in sleep habits. section 2.6
Figure 2.1 Randomly selecting six people in a dormitory to participate in a sleep study
The diagram makes the population-to-sample move concrete: six people are selected from the 64-person dorm rather than treating the six measurements as the whole group. section 2.6
Start by defining the population carefully. The relevant population might be one spool of filament, one factory, several factories, or all factories; it can also depend on where measurements are taken. Historical taxi-road records and airport punctuality records may look complete, yet still represent samples from broader sets of possible future conditions. section 2.6 section 10.22
A sample is more credible when its limits are made explicit:
- Select randomly where possible. A nonrandom group can systematically differ from the population it is meant to represent. section 2.6 section 2.7
- Check sample size. Six observations may not capture enough variation; a rough guideline calls for a sizable sample, ideally 31 or more. section 2.6
- Record timing and setting. Weekend versus weekday, final-exam periods, humidity, and measurement location can change what observations mean. section 2.6 section 10.22
- Disclose likely biases and corrective choices. Sampling across demographics in different proportions can improve representation, but it also adds modeling decisions that should be acknowledged. section 2.7
- Consider the full operating domain, including missing conditions, changing environments, and variables absent from the collected data. section 9.16
Bias is not an automatic verdict that data are useless. It is a reason to ask who could be excluded, why they were excluded, and how that omission might shift the result. For example, sampling only students with sleep trackers may overrepresent people whose devices and habits encourage healthier sleep. Treating data as a sample of something larger keeps uncertainty visible instead of turning a convenient dataset into an unquestioned truth. section 2.6 section 2.7






















