Population vs Sample

1 min read

A population is the full data-generating group you care about. A sample is the observed subset used to infer properties of that population.

Population parameters: fixed but usually unknown quantities.

  • Mean: μ\mu
  • Variance: σ2\sigma^2
  • Proportion: pp

Sample statistics: random quantities computed from observed data.

  • Sample mean: xˉ=1ni=1nxi\bar{x} = \frac{1}{n}\sum_{i=1}^n x_i
  • Sample variance: s2=1n1i=1n(xixˉ)2s^2 = \frac{1}{n-1}\sum_{i=1}^n (x_i - \bar{x})^2
  • Sample proportion: p^\hat{p}

Key distinction: parameters belong to the population; statistics belong to the sample.

If you took another sample, the population parameter would stay the same, but the sample statistic would usually change. This variation is sampling error.

Representativeness matters:

  • Random sample -> supports statistical inference
  • Biased sample -> estimates can be systematically wrong
  • Larger sample -> usually lower sampling error, but does not fix biased sampling

In ML: the training set is a sample from an underlying data distribution. Generalization depends on whether train, validation, and test data are representative of the target population.

See also: Estimators, Sampling Distributions, Cross-Validation

Linked from