Skip to content
Start free

Is an extreme value an error or real data?

Decide what each extreme value is by looking at its other columns: impossible, explainable or pending, and write it down before you touch it.

Free course. Your Maestro, an AI, .

You have a list of suspects: three trips of more than 1,300 minutes, six of less than a minute, a 96-minute ride and three records with birth year 1900. An extreme value is a value far from the rest. That doesn't make it an error. There are real extremes (a bulk order, a long ride) and errors that don't even look extreme.

The answer is almost never in the column where you spotted the extreme. It's in the other columns of the same row: what time it started, how far apart its stations are, which station it left from, what type of user it was. A row is a whole case; you read the whole case.

Start with the easiest suspect. Place a bet before you read on.

Check yourself: Trip 40478 lasts 96.4 minutes, five times the median. It started on Saturday, March 14 at 11:07 a.m. at Parque Alameda, ended at the same station and was taken by an occasional user. What is most likely?

For each suspect, ask: what do its other columns say, and what can't they tell us? The answers fall into three families: probable error, plausible data, or pending. For the day-long trips, the stations are less than a kilometer apart in a straight line; we don't know how far the bikes traveled. The duration and closure times make a recording problem worth investigating, but do not make the trip physically impossible. A long ride can return close to its start. Classify provisionally and note what needs confirmation.

  1. A value far from the rest

  2. What do its other columns say?

    • Path 1 of 3: suggest an error

      1. Probable error

        Compare figures with and without it; confirm

      Continues at: Write it in your log

    • Path 2 of 3: are compatible

      1. Plausible data

        Keep it provisionally

      Continues at: Write it in your log

    • Path 3 of 3: they aren't enough

      1. Pending

        You ask whoever knows the data

      Continues at: Write it in your log

  3. Write it in your log

All three outcomes end up in the log: before you touch a value, you write it down.

Three trips of more than 1,300 minutes

Worked example · 5 steps

Three trips last between 1,317 and 1,453 minutes: almost a whole day. Are they errors or real trips?

Work out the next step yourself, then open it to compare.

Try it: the trips under a minute

Now the other extreme. Run the code and read the other columns of the trips under a minute. Before you decide, ask yourself what would have to happen for a trip to last 20 seconds.

Your turn

Run the code and look at the other columns of the trips under a minute. Then change the filter to < 5 and compare the extra trips that show up.

Data: viajes-rueda, 311 rows
The exercise's data, "viajes-rueda". Your edits run with your code.
RowRemove
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Page 1 of 16

The six records under a minute start and end at the same station. They are compatible with failed starts, but confirm whether they count as trips under the operational definition. With < 5, two more appear, lasting 4.4 and 4.9 minutes between stations half a kilometer apart: plausible short trips. The cutoff changes what you count.

Here is the provisional list:

SuspectObserved evidenceHypothesisNext step
3 records over 1,300 minStations under 1 km apart; closures next day near 8:40 p.m.Duration-recording problemCompare summaries with and without them; confirm with operations
6 records under 1 minSame station, distance between stations 0Failed startsConfirm whether they count as trips and state the criterion
Trip 40478, 96.4 minSaturday 11:07 a.m., occasional, round tripPlausible long rideKeep provisionally
3 records with year 1900Subscriber label and suspicious yearFiller valueConfirm before treating it as an age

None of this changes the table yet. Removing, correcting or flagging rows is cleaning, covered in another free Maestro course. If you are unsure about a case, tell your Maestro along with the other columns of the row. To practice your judgment, ask for a new case.

Check yourself: At a pharmacy, the median sale is $180 and there's one for $48,000. Its other columns: 40 boxes of the same medication, a customer registered as a clinic, a Tuesday at 10:00 a.m. What is most likely?