Read the observationsLesson 14 of 30 · 6 min

Do not shuffle away the clue

Use observation order to detect drift that a pooled summary conceals.

Observation order is part of the evidence. A machine can warm up, a reagent can degrade, or demand can rise. A histogram shows the values but removes their sequence, so it can hide an important time pattern.

The invented time series below declines throughout a session. If A occupies the first half and B the second half, even identical treatments could look different. Plot values against run order before pooling them.

A trend does not identify its own cause. It tells you the stable-population assumption deserves scrutiny. Investigate conditions, block or randomise treatment order, and define warm-up rules before seeing which exclusions favour a treatment. Dropping early results after looking at them can create a new bias.

Order carries information
13.756.59.251290108125142160Time (ms)Position in sequence
13.756.59.251290108125142160Time (ms)Position in sequence
  • Published order
  • Same values, rearranged
The same twelve invented values have the same histogram in both orders. Their time patterns differ. Rearranging here is a teaching illustration, not a correction to historical observations.

What would an A-first, B-second schedule make you conclude about this series?

Write a prediction (optional)

Run the prepared example

This page puts the example in the Python editor. Select Run Python with the code unchanged.

Invented data

Editor tools
About Python ↗

Ctrl+Enter or ⌘+Enter runs the code.

What to compare

Compare Mean time for A (ms) and Mean time for B (ms). Look at how the time plot changes with run order. Which label gets the later, faster positions under the prepared schedule?

Published example output

The site ran the original code to produce this reference. Build environment ↗

Run labels: ['A' 'A' 'A' 'A' 'A' 'A' 'B' 'B' 'B' 'B' 'B' 'B']
Mean time for A (ms): 130.0
Mean time for B (ms): 104.0
Elapsed times decline in the prepared sequence. A gets the first six positions and B gets the last six.
Open full-size figure ↗

The labels split a declining series. B has the lower mean because it gets later positions in these invented observations.

Change and run again

In the Python editor, change labels = np.repeat(["A", "B"], 6) to labels = np.tile(["A", "B"], 6). Select Run Python again. Compare Mean time for A (ms) and Mean time for B (ms). Why does reassigning labels on paper answer a scheduling question without testing a real treatment? Return to the Python editor

What this example supports. These values are authored to show drift. Detecting a trend alone does not tell you whether it arose from warm-up, load or another mechanism.

Try a fresh case

A histogram looks symmetric, but the time plot shows a steady increase. Which statement is justified?

Choose an answer

Hints for this question
  1. Identify the information lost by pooling.
  2. Consider whether the same data in a different order would tell a different story.
Your notes