Skip to content
Tutorials Center
My learning

Topics

Lesson 3 of 37 ยท Getting Started

Populations and Samples

Understand population, sample, census, parameter and statistic, and see in a simulation why a sample estimate changes from one sample to the next.

Suppose you want to know the average time students in your country spend on homework each night. Asking every student is impossible. So you ask some of them, and use their answers to learn about everyone. That is the core idea of statistics, and this lesson names its parts.

Population and sample

  • The population is the whole group you want to know about. It may be people, but also objects: all light bulbs a factory makes this month, all trees in a forest.
  • A sample is the part of the population you actually measure.
  • A census measures every member of the population. It is accurate but slow and expensive. Many countries do one every ten years.

The population depends on your question. "Students at my school" and "students in the country" are different populations.

Parameters and statistics

Numbers describing a population and numbers describing a sample have different names.

Describes Name Example Usual symbol for mean
Whole population Parameter True mean homework time of all students ฮผ (the Greek letter mu)
A sample Statistic Mean homework time of the 50 students asked xฬ„ ("x bar")

A parameter is a fixed number, usually unknown. A statistic is something you can calculate, and it changes from sample to sample. We use the statistic to estimate the parameter.

To remember: Parameter goes with Population, Statistic goes with Sample.

Why samples vary

Imagine a jar with 1,000 numbered balls whose true mean we know. Different handfuls of 10 balls give different sample means. None is "wrong"; each is a slightly different estimate.

Python Sample means bounce around the population mean

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

The population here is simulated, so the program can "know" the true mean; in real life you never do. The simulation lets you see sample variation directly.

Bigger samples vary less

If you take larger samples, the sample means cluster more tightly around the population mean. That is why a poll of 2,000 people is more trustworthy than one of 20.

Python Compare sample sizes

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Run it and watch the range shrink as the sample size grows. The shrinking is not exactly smooth every time, but the trend is clear.

A sample is only useful if it is representative

A representative sample has the same mix of characteristics as the population. A large but unrepresentative sample can still mislead. A famous failure came from surveys that only reached people who owned telephones or magazines at a time when many people did not; large numbers did not repair the bias. You will study fair sampling methods in the next chapter.

flowchart LR
  P["Population<br/>(parameter: ฮผ)"] -- "sampling" --> S["Sample<br/>(statistic: xฬ„)"]
  S -- "inference" --> P

Sampling goes down from the population; inference goes back up.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. A school wants to know the mean height of all its 800 students and measures 40 of them. The 40 students are

    They are a part of the population of 800, so they form a sample.
  2. 2. Which is a parameter?

    A parameter describes the entire population. The others describe samples.
  3. 3. Two different random samples from the same population give different sample means. This is

    Different samples contain different members, so their statistics naturally differ.
  4. 4. What usually happens to sample means when the sample size increases?

    Larger samples give more reliable estimates, so the means vary less.

Summary

  • A population is the whole group of interest; a sample is the part measured; a census measures the whole population.
  • A parameter describes a population (fixed, often unknown); a statistic describes a sample (known, varies).
  • Sample statistics vary from sample to sample, and larger samples vary less.
  • Samples must be representative, otherwise even large ones mislead.

Next: Using Python as a Statistics Calculator