Skip to main content

Pilot · Lab P06 · 45 minutes

Cleaning journey records

A fictional class logged six journey records, with a duplicate and a missing value among them. Decide which rows to include, log each cleaning decision, calculate the mean journey time and the bus mean, and write a claim that is qualified by what the data can and cannot show.

Predict first

Write your predictions before you use the tool.

  1. Look at the six rows. Which ones would you leave out of a mean journey time, and why?
  2. Predict the mean journey time after keeping one row per trip and excluding the missing value.
  3. Predict what happens to the mean if the missing minutes are treated as 0.

Practice tool

The journeys tool applies two cleaning choices to the six fixed fictional rows: keep one row per trip ID or keep duplicates, and exclude missing minutes or treat them as 0. It then shows each row’s decision with a reason, plus the count, mean and bus mean. It contains no real personal data and does not decide which claim is true.

Journey records · fixed six-row dataset

Cleaning decision for each row
RowTripMinutesModeDecision
1A10walkIncluded: Valid
2B20busIncluded: Valid
3C20busIncluded: Valid
4C20busIncluded: Valid
5DmissingwalkIncluded: Missing treated as 0 (unsafe)
6E50busIncluded: Valid

Rows used: 6 · mean minutes: 20 · bus mean: 27.5

Starter

Fictional journey records · Data
trip, minutes, modeA, 10, walkB, 20, busC, 20, busC, 20, busD, (missing), walkE, 50, bus
Cleaning log template · Data
row, included?, reason1, , …

Worked case

Worked cleaning: one row per trip, missing excluded
rowtripminutesdecisionreason
1A10includevalid
2B20includevalid
3C20includevalid
4C20excludeduplicate of trip C
5Dmissingexcludeminutes missing
6E50includevalid

Four valid rows: (10 + 20 + 20 + 50) ÷ 4 = 25 minutes. Bus rows B, C, E: (20 + 20 + 50) ÷ 3 = 30 minutes.

Missing is not 0. Treating D as 0 minutes keeps five rows and pulls the mean down to 20, as if someone arrived instantly. Keeping the duplicate counts trip C twice. Each choice changes the result, so the cleaning log is part of the evidence.

A qualified claim: "In these four recorded trips, the bus trips averaged 30 minutes and the one walk averaged 10." It does not say buses cause longer journeys: distance was not recorded, and four trips cannot represent the whole school.

Build

  1. Fill in the cleaning log for all six rows before using the tool.
  2. Set the tool to one row per trip and exclude missing; compare its decisions with your log.
  3. Record the count, mean and bus mean.
  4. Try the other three combinations and record how each result changes.
  5. Write one claim the data supports and one limitation that keeps it from being a general conclusion.

Tests

Tests for this lab
InputExpectedWhy this test
One per trip, exclude missing4 rows; mean 25; bus mean 30The intended cleaning.
Keep duplicates, exclude missing5 rows; mean 24; bus mean 27.5Trip C is counted twice.
One per trip, missing as 05 rows; mean 20; bus mean 30An invented 0 drags the overall mean down; the walk row is not a bus row.
Keep duplicates, missing as 06 rows; mean 20; bus mean 27.5Both errors at once.

Explain and reflect

Explain

  1. Explain, with the numbers, why treating missing minutes as 0 is not a neutral choice.
  2. Explain why your claim describes an association in these trips and not a cause.

Reflect

  1. What extra column would most improve the claim about bus and walking times?
  2. How many more trips, collected how, would you want before generalising to the school?

What this lab does not do

  • The six rows are fixed and fictional; you cannot add or edit rows in the tool.
  • The tool offers only two cleaning choices; real data often needs more.
  • Nothing is saved.