Sampling, Bias and Data Collection

How the way data was collected shapes what it can tell you, and the biases that quietly invalidate conclusions.

Beginner · about 4 hours · difficulty 2/5

Learn first: Descriptive Statistics

Every dataset is a sample of some process. Before analysing, ask how the rows got there, because the collection method limits what you can conclude.

Sampling methods

  • Simple random: every unit has an equal chance. The gold standard, rarely available in business data.
  • Stratified: sample within groups (regions, plans) to guarantee each is represented.
  • Cluster and systematic sampling: practical shortcuts with their own risks.
  • Convenience: whoever answered the survey. Common and dangerous.

Biases to look for

  • Selection bias: only some units enter the data (only customers who contacted support).
  • Survivorship bias: you only see the survivors (only active accounts remain in the table).
  • Non-response bias: the people who reply to surveys differ from those who do not.
  • Measurement bias: tracking changed, a field was redefined, or a sensor drifted.
  • Simpson's paradox: a trend reverses when you split by a hidden group, usually because group mix differs.

Sample size intuition

Uncertainty shrinks with the square root of sample size: quadrupling the sample halves the margin of error. Small segments produce noisy percentages, so be careful ranking tiny groups.

Pitfall: treating "all the data we have" as the population. Your app's users are not all potential customers. Move on when you can name the most likely bias in any dataset you are handed.

Key concepts

  • Population vs sample
  • Random and stratified sampling
  • Selection and survivorship bias
  • Non-response and measurement bias
  • Simpson's paradox
  • Sample size and margin of error
  • Survey design basics

Mini project

Recreate the classic UC Berkeley admissions Simpson's paradox example in a spreadsheet and write a short explanation of why the aggregate and per-department conclusions differ.

Check yourself

A report shows customers who used live chat have higher churn. What bias might explain this without chat causing churn?

Free resources