Chapter 1 · OpenStax Ch 1

Sampling and Data

How we get data, and why the way we sample decides what we can conclude.

1.1 Population and sample

The grey dots are every person we care about, the population. Their average height is the population mean \(\mu\), a fixed number called a parameter. In real life we never see all the dots. We measure a sample, a handful chosen at random, and compute its average \(\bar{x}\), a statistic.

Click the field a few times. Each click is a fresh sample. The highlighted dots change and the solid line \(\bar{x}\) jumps to a new place, while the dashed line \(\mu\) never moves. The small triangles remember where earlier sample means landed. Now raise \(n\) and click again. With more dots in each sample the jumps get smaller, but they never stop. A statistic is an estimate, not the truth.

Reading: OpenStax Introductory Statistics, Section 1.1.

1.2 Sampling methods and bias

The town has four neighbourhoods with very different commute times. How we pick residents decides what we can conclude. A simple random sample gives every resident the same chance. A stratified sample takes a share from each neighbourhood in proportion to its size. A cluster sample picks one whole neighbourhood at random. A convenience sample takes whoever is nearest the entrance.

Choose a method and press “Draw 20”. Watch the mean of all sample means. The first three settle on the population mean, though cluster samples swing wildly on the way. The convenience sample settles somewhere else, every time, because it keeps asking the same neighbourhood. That gap is sampling bias, and no amount of extra data removes it.

Reading: OpenStax Introductory Statistics, Section 1.2.

1.3 Variation in samples

Draw one sample and note its mean. Draw another, honestly, from the same population, and you get a different number. Neither is wrong. This is sampling variability. Samples disagree because they contain different people. The histogram piles up the means of every sample drawn so far. The pile centres on the population mean, and its width shows how far a single sample can wander.

Now slide \(n\) up and draw again. The pile becomes narrower, because bigger samples disagree less. The readout SD of sample means measures that width.1 Two students who each survey ten people should expect different answers. Two who each survey a hundred should expect close ones.

1 Standard deviations on this site divide by \(n - 1\), the sample convention. Reading: OpenStax Introductory Statistics, Sections 1.2, 1.3.