Foundations & the Data-Science Workflow

Sample

A sample is the subset of the population that you actually observe or measure. We use samples because measuring the whole population is usually too slow, too expensive, or simply impossible.

The single most important property of a good sample is that it is representative — its members resemble the population in the ways that matter. A large sample collected badly (for example, only asking your friends) is worse than a smaller sample drawn at random, because size cannot fix a built-in tilt. The process of choosing the sample is called sampling (抽樣), and getting it right is what makes the later inference trustworthy.

Bigger is not automatically better: a biased sample of a million can be more misleading than a random sample of a thousand.