AI Hints
Statistics & Math for ML · Lesson 4 of 138

Populations and Samples

The part and the whole.

⏱ 2 min read▶ Video at 3:35🎓 Free
Watch this lesson in the Statistics & Math for ML courseWatch on YouTube ↗Full Statistics & Math for ML course

Suppose you want the average height of every adult in a country. You can't measure millions of people. So you measure a few thousand, chosen at random, and use them to estimate the whole country. That's the central idea of statistics.

Populations and Samples
From the video: Populations and Samples
  • Can't measure everyone
  • Measure a random few
  • Estimate the whole

Two words to know

The population is everyone, or everything, you care about. A sample is the part you actually measure. A number that describes the population, like its true average, is called a parameter. The same number computed from a sample is called a statistic. We use statistics to estimate parameters.

Populationeveryone you care about
Samplethe part you measure
Parametertrue population value
Statisticestimated from a sample

Random is the key

A sample only works if it's chosen fairly. If you measured heights only at a basketball club, your estimate would be far too tall. That's called sampling bias. In machine learning, your training data is a sample. If it's biased, your model will be biased too.

keyvalue
Fair samplechosen at random
Biased samplebasketball club heights
Training datais a sample
Biased databiased model

Summary

The population is everything, the sample is what we measure, and a fair random sample lets us estimate the whole. Next, NumPy, the tool for working with numbers in Python.

Key takeaways
  • Population vs sample
  • Parameter vs statistic
  • Avoid sampling bias
Next up: NumPy in a Minute — arrays of numbers