Make the evidence travelLesson 28 of 30 · 6 min
Does it survive a new setting?
Distinguish computational reproducibility from new-data replication and limited generalisation.
Computational reproducibility means rerunning the same analysis on the same recorded inputs and obtaining consistent results. Replication collects new evidence to examine a finding. Terminology varies across fields, so describe the concrete procedure rather than relying on the label alone.
The invented table compares A and B in two environments. B improves time on one device and worsens it on another. Reproducing either calculation will not resolve that difference. It may reveal an interaction worth investigating.
A replication should state which parts of the original procedure stay fixed and which change. A close repeat tests stability under similar conditions. A deliberate change in device, population or workload probes generalisation. Report disagreements, inspect implementation and measurement differences, then revise the claim to match the evidence rather than averaging away a meaningful boundary.
If both environments have equal numbers of runs, could a pooled mean hide the direction change?
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
A saved draft is open. To run the published example, open Editor tools and select Restore example. Recover draft brings your code back.
Execution error
Technical error details
What to compare
Compare Mean reduction (%) by environment with Pooled mean reduction (%). Does the pooled number show that the direction differs between laptop and phone?
Your result
Result tools
The mean reduction favours B on laptop and A on phone in the invented rows. The pooled estimate depends on how much weight each environment gets.
Published example output
The site ran the original code to produce this reference. Build environment ↗
environment a_ms b_ms reduction_pct
laptop 100 75 25.000000
laptop 105 79 24.761905
laptop 95 72 24.210526
laptop 110 83 24.545455
phone 100 110 -10.000000
phone 105 116 -10.476190
phone 95 104 -9.473684
phone 110 121 -10.000000
Mean reduction (%) by environment:
environment
laptop 24.63
phone -9.99
Name: reduction_pct, dtype: float64
Pooled mean reduction (%): 7.32
The mean reduction favours B on laptop and A on phone in the invented rows. The pooled estimate depends on how much weight each environment gets.
Change and run again
In the Python editor, add data = pd.concat([data, data[data.environment == "phone"]], ignore_index=True) before data["reduction_pct"] is assigned. Select Run Python again. What changes in the pooled mean and in the environment means? Why did the number of genuine observations stay the same? Return to the Python editor
What this example supports. The device outcomes are invented. A direction change is a reason to investigate scope and interaction, not evidence of any actual device difference.
Try a fresh case
A colleague reruns your saved script on your saved CSV and gets the same output. What has that established?
Hints for this question
- Ask whether any new observations were collected.
- Separate an analysis rerun from a new experiment.