Step 2: Data and How It’s Collected
- Data comes in tables: each row is an individual, each column is a variable. Variables are categorical or quantitative (discrete or continuous).
- The four levels of measurement are nominal, ordinal, interval and ratio. Only ratio data has a true zero, and the level decides which calculations are allowed.
- Good samples let chance decide: simple random, stratified, cluster or systematic. Convenience and voluntary-response samples are almost always biased, however large.
- Only a randomised experiment can show cause and effect. Observational studies show association, which a confounding variable may explain.
Individuals, variables and data tables
Think of the class register your teacher keeps. Each line is one student. Across the line are details: age, course, how many hours they study, whether they own a car. That register is a data table, and almost all data you meet in this course arrives in this shape.
| Student ID | Age | Programme | Study hours / week | Owns a car? | Grade band |
|---|---|---|---|---|---|
| S-014 | 19 | Economics | 12.5 | No | B |
| S-021 | 21 | Business | 7.0 | Yes | C |
| S-036 | 18 | Economics | 18.0 | No | A |
| S-052 | 23 | Statistics | 15.5 | Yes | A |
This table shows four individuals (the four students) and six variables (the six columns). Every individual has one value for each variable, which is what makes it a tidy data table.
Types of variables and levels of measurement
The most useful distinction in descriptive statistics is between two kinds of variable, because it decides which summaries and graphs you are even allowed to use.
Quantitative variables come in two flavours. A discrete variable takes separated values, usually from counting (number of siblings, text messages sent yesterday). A continuous variable can take any value in a range, usually from measuring (height, body temperature, time to run 5 km).
Categorical variables are summarised with counts and shown in a bar chart. Quantitative variables get histograms, which you meet in Step 3.
The four levels of measurement
Statisticians go one step further and sort variables into four levels. Each level adds something to the one before.
| Level | What it adds | Examples |
|---|---|---|
| Nominal | Named categories, no order | Eye colour, programme, blood type |
| Ordinal | Ordered categories, gaps not equal | Grade band A/B/C, T-shirt size S/M/L, medal |
| Interval | Equal gaps, but no true zero | Temperature in °C, calendar year |
| Ratio | Equal gaps and a true zero | Height, weight, study hours, income, exam mark |
The level decides your toolkit. Nominal data can be counted but never averaged. Ratio data unlocks everything: means, standard deviations and ratios. Ask “what level is this?” before you calculate anything.
Census, sample and sampling frame
Why not just ask everyone? Sometimes it costs too much or is impossible: a battery maker cannot test every battery until it dies, or there would be none left to sell. A well-drawn sample of a few thousand can describe millions accurately, as long as the list you sample from and the way you pick are both sound.
A census collects data from every individual in the population; a sample collects from a subset. Suppose a city samples names from the property-ownership register to find out what residents think. Renters are missing from the frame entirely, and they may have systematically different views. This is called undercoverage, and no amount of careful random sampling inside a flawed frame can repair it.
Methods of sampling
Once the frame is sound, how do you choose who is in the sample? The gold standard is to let chance, not a person, decide.
Three other designs are common, each trading a little simplicity for lower cost or more precision:
- Stratified: split the population into similar groups called strata (for example, year groups), then take an SRS from each stratum. Every group is guaranteed to appear.
- Cluster: split the population into many similar groups called clusters (for example, tutorial classes), randomly pick a few whole clusters and measure everyone in them. Cheaper to reach, but riskier if clusters differ.
- Systematic: put the frame in order and take every \( k \)-th individual after a random start.
The contrast to remember: stratified samples within every group; cluster samples whole groups.
A convenience sample takes whoever is easiest to reach, such as the first 30 people outside the library. It is fast and cheap but almost always biased, because “easy to reach” is rarely “representative”.
A university has 4,000 students. A researcher wants a sample of 200. Describe how she would take a systematic sample, and how many she would take from each of three equal-sized year groups in a stratified sample.
Both methods use chance, so both allow honest inference. The stratified version also guarantees that every year group is represented.
Bias: when a sample lies
In 1948 the Chicago Tribune printed the famous headline “DEWEY DEFEATS TRUMAN”. Truman won. The pollsters had used quota sampling: interviewers had to fill quotas (so many men, so many city-dwellers) but chose the individuals themselves. They tended to approach people who were easier to reach and a little better off, a group that leaned towards Dewey. They also stopped polling too early to catch late deciders.
Even with a plan, bias can leak back in. Learn these four names:
A classic case: in 1976 the advice columnist Ann Landers asked readers whether, given the chance again, they would have children. About 10,000 wrote in and around 70% said no. This was a voluntary-response sample. Unhappy parents were far more motivated to write than contented ones. When pollsters later asked a randomly selected sample, a large majority said they would have children again.
Observational studies versus experiments
Suppose you notice that towns with more ice-cream sales also have more drownings. Is ice cream dangerous? No. Hot weather raises both ice-cream sales and swimming, and so drownings. The weather is linked to both variables, creating an association with no cause between them.
Three more terms go with this. The explanatory variable is the suspected cause (ice-cream sales). The response variable is the effect you measure (drownings). A confounding variable is a lurking third factor tied to both (temperature), so you cannot tell which is really driving the response.
Random assignment to treatment and control groups tends to balance out every lurking variable, even ones you never thought to measure. So if the groups end up different, you can pin that difference on the treatment. Observational studies can show strong, real associations, but association is not causation.
Practise: 6 questions
Try each one on paper first, then check the worked answer.
EasyQ1. Classify each variable as categorical or quantitative (and if quantitative, discrete or continuous): (a) number of siblings; (b) nationality; (c) weight of a parcel in kg. Show worked answer
(b) Categorical: it places people into groups.
(c) Quantitative, continuous: it is a measurement that can take any value in a range.
EasyQ2. Give the level of measurement for: (a) finishing position in a race (1st, 2nd, 3rd); (b) temperature of a room in °C; (c) jersey number of a player; (d) annual income in dollars. Show worked answer
(b) Interval: equal gaps, but 0 °C is not “no temperature”.
(c) Nominal: a label; averaging jersey numbers is meaningless.
(d) Ratio: equal gaps and a true zero (zero dollars means no income).
MediumQ3. Name the sampling method or bias in each case: (a) a researcher randomly selects 6 of 90 schools and surveys every pupil in those 6; (b) a website poll lets anyone click to vote; (c) a phone survey reaches only landline numbers, while many young adults have only mobiles. Show worked answer
(b) Voluntary-response bias: people choose themselves, so strong opinions dominate.
(c) Undercoverage: the frame (landlines) leaves out mobile-only young adults, so they can never be selected.
MediumQ4. Of 2,000 surveys about workplace dissatisfaction mailed out, only 180 are returned. What percentage replied, and what bias is present? Show worked answer
This is nonresponse bias: 91% did not reply, and those who did are likely to differ from those who didn’t (for example, the more dissatisfied may be keener to respond).
MediumQ5. People who take vitamin supplements have fewer illnesses, so researchers conclude supplements prevent illness. Identify a plausible confounder and explain why the causal claim is not justified. Show worked answer
ExamQ6. Design a randomised experiment to test whether a new study app improves exam scores. Name the explanatory and response variables, describe the groups and explain why random assignment matters. [5 marks] Show worked answer
1. Explanatory variable: use of the app (yes/no).
2. Response variable: exam score.
3. Treatment group uses the app; control group does not; everything else is kept the same.
4. Students are assigned to groups at random, for example by coin flip or random numbers, and mean scores are compared.
5. Random assignment spreads lurking variables such as motivation evenly across both groups, so any difference in scores can be attributed to the app.
Check yourself
1. A pollster divides voters into age bands and randomly samples within each band. This is…
2. Which level of measurement has equal gaps and a true zero?
3. Which type of study can establish cause and effect?
Your score: 0 out of 3
The short version
- Rows are individuals, columns are variables. Variables are categorical or quantitative; ask whether arithmetic on them makes sense.
- Nominal, ordinal, interval, ratio: the level decides which summaries are legitimate, and only ratio has a true zero.
- A bad sampling frame causes undercoverage. Prefer random designs (simple random, stratified, cluster, systematic) over convenience or voluntary response.
- Undercoverage, nonresponse, response bias and self-selection cannot be fixed by a bigger sample.
- Only randomised experiments show causation. The full chapter in Statistics Made Simple has 40 practice questions with a complete answer key.
Further reading on EconTutorials
Older in-depth articles on this topic from our blog:
