Track 1 · Statistical Thinking · Lesson 6 of 10

Where data come from

Classify data sources, distinguish random from systematic measurement error, and check a dataset's documentation and provenance before trusting it.

25 minFoundation7 graded exercisesFree

A planning team downloads a spreadsheet of “clinic visits by district” and uses it to decide where to open a new clinic. Nobody checks that one district's figures exclude walk-in patients, or that the definition of a visit changed halfway through the series. The analysis is flawless; the decision is wrong.

Every dataset was produced by someone, for some purpose, using some procedure. That history — its provenance — limits what the data can tell you.

  • Primary data are collected by you for your question: your own survey, experiment or measurements. You control the design but pay the cost.
  • Secondary data were collected by someone else, usually for another purpose: government statistics, a company's transaction logs, a published dataset. Cheap and often large, but the definitions and coverage were chosen for their purpose, not yours.
SourceExampleStrengthsWatch for
Administrative recordsPayroll, hospital admissions, tax filings, school enrolmentComplete coverage of whoever is in the system; cheapOnly covers people who interact with the system; definitions follow rules, not research needs
SurveysCustomer satisfaction poll, labour-force surveyCan ask exactly what you need; can be randomNonresponse, question wording, honest-answer problems
Designed experimentsA/B test, clinical trial, field trialSupports causal conclusionsCost, artificial settings, dropout
Sensors and logsSmart meters, website clickstreams, GPS tracesHuge volume, automatic, time-stampedDevice faults, bots, gaps, calibration drift
Common sources and what to watch for

No measurement is perfect. The difference between a recorded value and the true value is measurement error, and it comes in two kinds.

  • Random error pushes individual readings up or down unpredictably. It makes data noisier, but it tends to cancel out when you average many readings.
  • Systematic error (measurement bias) pushes readings in the same direction every time: a scale that reads 0.4 kg heavy, a survey question that encourages flattering answers, a clock that runs fast. Averaging more readings does not remove it.

Worked example

A miscalibrated scale

A warehouse weighs five parcels on a scale that, unknown to staff, reads 0.4 kg too heavy. The recorded weights are 2.9, 4.1, 3.6, 5.0 and 3.4 kg. What is the mean recorded weight, and what is the true mean?

  1. Mean of the recorded weights: (2.9+4.1+3.6+5.0+3.4)/5=19.0/5=3.80(2.9 + 4.1 + 3.6 + 5.0 + 3.4)/5 = 19.0/5 = 3.80 kg.

  2. Every reading is 0.4 kg too high, so the mean is also 0.4 kg too high: true mean =3.80−0.40=3.40= 3.80 - 0.40 = 3.40 kg.

  3. Weighing 5,000 parcels instead of five would make the random wobble in the average smaller — but the average would still be 0.4 kg too high. Only recalibration (or a correction) removes systematic error.

Recorded mean 3.80 kg; true mean 3.40 kg.

Two related words describe measurement quality. A measurement is reliable if repeating it gives similar results (little random error). It is valid if it measures what it claims to measure (no systematic error, and the right concept). A bathroom scale that always reads 2 kg light is reliable but not valid; “number of hours logged in” is a reliable but not necessarily valid measure of productivity.

Provenance questions to ask before using a dataset

  1. Who collected it, and why? What were they trying to measure or administer?
  2. What exactly does each variable mean? Is there a data dictionary with units and definitions?
  3. Who is included and who is missing? How were units selected?
  4. When and where were the data collected? Did definitions, systems or procedures change during that period?
  5. How were values measured or recorded — instrument, self-report, manual entry? How are missing values coded?
  6. What processing happened before you received it (cleaning, imputation, aggregation, rounding)?

Quick check

A fitness tracker counts arm movements as steps, so it consistently overcounts by about 10%. What kind of error is that?

Exercises

The lesson is complete when every exercise is answered correctly. Hints are free; viewing a worked solution before solving means the exercise won't count towards mastery.

0 of 7 exercises correct (not saved — sign in to keep your progress)

Exercise 1 · Practice, difficulty 1 of 3

Primary or secondary?

Not started

From the point of view of the analyst described, classify each dataset as primary or secondary data.

A restaurant owner hands out her own feedback cards to diners for a month.
A consultant uses national labour-force statistics published by the statistics office.
A product team runs an A/B test on its own app.
A researcher studies traffic accidents using police incident records.
A marketing analyst uses the company's past transaction logs to study basket sizes.

Exercise 2 · Practice, difficulty 1 of 3

Name the source

Not started

Match each dataset to the type of source.

Electricity readings sent every 15 minutes by smart meters
Records of every vehicle registration held by the traffic authority
A questionnaire sent to a random sample of 2,000 households
A trial in which 36 field plots are randomly given different irrigation levels

Exercise 3 · Practice, difficulty 2 of 3

Random or systematic error?

Not started

Classify each source of measurement error.

A stopwatch operator sometimes presses a little early and sometimes a little late.
A thermometer in a server room is mounted next to an air vent and always reads 2 °C cooler than the room.
Survey respondents under-report how much fast food they eat.
Small fluctuations in a laboratory balance's readings caused by air currents.
A sales system records all transactions in the time zone of head office, so evening sales in another region appear on the next day.

Exercise 4 · Guided, difficulty 1 of 3

Correcting a known bias

Not started

A water-quality team measured the chlorine level (mg/L) at six taps:

5.19, 4.05, 4.19, 4.29, 4.96, 4.56

Later it found that the meter reads 0.15 mg/L too high on every measurement. What is the corrected mean chlorine level? Give 3 decimal places.

mg/L

Exercise 5 · Practice, difficulty 2 of 3

Reliable, valid, both or neither

Not started

A company measures “employee productivity” as the number of minutes each employee's computer is active per day. Activity is recorded precisely and consistently by software. Which description fits best?

Choose one

Exercise 6 · Practice, difficulty 2 of 3

Check before you use

Not started

You download a public spreadsheet titled “Road accidents by city, 2018–2024” to compare road safety across cities. Select all the questions you should answer before analysing it.

Select all that apply

Exercise 7 · Interpretation, difficulty 3 of 3

Hospital records as a measure of illness

Not started

A health department proposes to estimate how common asthma is among adults in a region by counting the adults admitted to the region's hospitals with asthma last year and dividing by the adult population. In two to four sentences, explain the main problems with using these administrative data for this purpose.

0 words

What you can now do

  • Classify data as primary or secondary and name the type of source
  • Distinguish random error (averages out) from systematic error (does not)
  • Judge whether a measure is reliable and valid for the concept of interest
  • Ask provenance questions about coverage, definitions, changes and processing before analysing