Introduction to Data
OpenIntro Statistics · Ch. 1 · openintro.org/book/os
New to statistics? Start with Probability and Events, a short chapter you can experiment with.
Statistics begins with data. Every dataset is a collection of observations (rows) described by variables (columns). The type of variable and the way data was collected determine which methods apply.
Observations and variables
An observation (or case) is a single unit in the dataset: one person, one transaction, one experiment. A variable is a characteristic measured on each observation. Variables are either numerical (quantitative) or categorical (qualitative).
Study design: observational vs. experimental
An observational study records data without intervening. An experiment assigns treatments to subjects. Random assignment supports causal inference by preventing systematic differences in who receives a treatment, provided the study is carried out appropriately. Observational causal claims need additional design and assumptions to address confounding. The distinction matters: if you observe that coffee drinkers live longer, that does not mean coffee causes longevity.
Try two ways of choosing residents before comparing sampling strategies. Read the guided introduction β
A fictional town of 200 adults
Sample without replacement: nobody is measured twice in a single sample.
Each dot is a resident. Filled dots mark the town-wide sample. Thick outlined dots mark other residents in the basketball-court subgroup.
No sample yet. What do you think the townβs average height will be?
Population mean: 169.4 cm. Measuring all 40 court residents removes uncertainty about that subgroup, but it still does not represent the whole town.
Sampling strategies
The population is everyone you want to study. The sample is who you actually measure. Good sampling avoids bias: simple random sampling, stratified sampling (split into groups first), and cluster sampling (randomly select entire groups). Convenience samples are cheap but unreliable.
Neighbors
Related chapters
- π° Grinstead Ch.1 — discrete probability spaces, the mathematical foundation beneath sampling
Foundations (Wikipedia)
Translation notes
OpenIntro introduces data with the county and email datasets. We use small inline datasets instead to keep examples self-contained. The original covers data matrices, scatterplots, and data collection pitfalls in more detail. The sampling code chooses uniformly from the remaining cases without replacement; rerunning it can give a different sample.