Want to know the average height of every adult on Earth? You can't measure 8 billion people. So you measure a sample, and from it, you estimate the truth about the whole population. Getting the vocabulary straight here makes every later chapter click.
Population vs. Sample
The population is everyone (or everything) of interest. The sample is a manageable subset chosen to represent it:
The sample should look like the population in miniature. A biased sample (say, only polling people who answer landlines) gives misleading estimates no matter how big it is.
Parameter vs. Statistic
Same quantities, two worlds. A parameter is the true value for the whole population (usually unknown). A statistic is what you compute from your sample (your best estimate). There's even a notation convention:
| Quantity | Parameter (population) | Statistic (sample) |
|---|---|---|
| Size | N | n |
| Mean | μ (mu) | x̄ (x-bar) |
| Standard deviation | σ (sigma) | s |
| Proportion | p | p̂ (p-hat) |
Parameter ↔ Population; Statistic ↔ Sample. Parameters usually wear Greek letters (μ, σ); statistics wear Latin letters with hats (x̄, p̂).
The Big Idea: A Statistic Estimates a Parameter
This is the core move of statistics. We can't see the parameter, so we use the statistic to estimate it, and inferential statistics tells us how good that estimate is:
🌍 Population
has a true parameter (μ) we can't directly see.
🔬 Sample
gives us a statistic (x̄) we can compute.
🎯 Estimate
x̄ estimates μ, with a measurable margin of error.
Two different samples give two different statistics, that's sampling variability. But good statistics are unbiased: across many samples they center on the true parameter, and they sharpen as the sample grows. The spread of those sample estimates has a name, the standard error (for the mean, SE = σ/√n), and it's the bridge to confidence intervals later in the book.
Census vs. Sampling
A census measures the entire population, exact, but slow and expensive. Sampling measures a subset, fast and cheap, with a known margin of error. Each has its place:
- Measures everyone, gives the parameter exactly
- Highest accuracy, no sampling error
- Slow, costly, sometimes impossible
- Best for: national population counts, small groups
- Measures a representative subset
- Fast, cheap, often the only feasible option
- Estimates come with a margin of error
- Best for: polls, market research, quality control
A well-designed poll of ~1,000 people can estimate the views of millions to within a few points. You rarely need to ask everyone, you just need a fair sample. Sampling methods come next in Sampling & Data Collection.
When sampling goes wrong: named biases
A sample misleads when it systematically leaves people out or lets the wrong people in. The common culprits:
Selection / undercoverage
Part of the population can't be chosen at all (a landline poll misses cell-only households).
Nonresponse
Selected people don't answer, and non-responders often differ from responders.
Voluntary response
Online opt-in polls overweight people with strong opinions.
Convenience / wording
Sampling whoever's easiest, or a leading question, skews the result.
In 1936 the Literary Digest polled 2.4 million people and still called the election wrong, because its sample (car and phone owners) was biased toward the wealthy. More data shrinks random error, not bias. And a poll's margin of error covers only random sampling error, never nonresponse or bad question wording. A tiny margin of error can still hide a badly biased poll.
How to sample well
Simple random
Everyone has an equal chance, like names from a hat.
Stratified
Split into groups (strata), then sample each, to guarantee representation.
Cluster
Randomly pick whole groups (e.g., schools), then survey within them.
Systematic
Take every k-th item from an ordered list.
Bring it to life in Python
The companion notebook computes parameters vs. statistics, shows statistics jiggling around the true value, watches the error shrink with bigger samples, and runs a 1,000-person opinion poll.
View opens the rendered notebook instantly (no setup). Open in Colab runs &
edits it live in your browser. To run locally, install numpy, pandas, matplotlib
and launch jupyter notebook.
🎓 Key Takeaways
- ✓Population = the whole group (size N); sample = the measured subset (size n).
- ✓Parameter describes the population (μ, σ, p); statistic describes the sample (x̄, s, p̂).
- ✓A statistic estimates a parameter, the core move of inferential statistics.
- ✓Statistics vary but are unbiased, they center on the parameter and sharpen as n grows.
- ✓Census vs. sampling: exact-but-costly vs. estimate-but-cheap with a known margin of error.
Practice Challenges
Four short challenges on the chapter's core ideas. Beginner-friendly, try them on paper or in Python.
Population or sample?
A university has 20,000 students. A researcher surveys 500 of them. Name the population, the sample, and the sample size n.
Parameter or statistic?
Classify each and give its symbol: (a) the mean height of all NBA players; (b) the mean height of 30 sampled players; (c) the approval rate in a 1,000-person poll.
Compute a statistic
A sample of 8 customers spent ($): [12, 18, 9, 22, 15, 30, 11, 19]. Find the sample mean
x̄ and the proportion p̂ who spent more than $15. What are they estimating?
Census or sampling?
Which fits each, and why? (a) a national population count; (b) testing how long a factory's light bulbs last; (c) an election-night exit poll.
A fully-worked solutions notebook walks through all four challenges in the same visual style, try them yourself first, then compare.
Quiz: Test Yourself
Eight quick questions to lock in population/sample and parameter/statistic. Answer them, hit Check Answers, and keep refining until you score 100%. Your progress is saved.