Put uncertainty to workLesson 19 of 30 · 7 min
How much would make a difference?
Compare an estimated proportional improvement and its interval with a prespecified useful threshold.
An effect size describes the magnitude of a difference. A 2 ms reduction can be decisive for one task and irrelevant for another. Decide the minimum useful benefit from the decision context, before looking at the results.
Each paired run gives a time ratio A/B. The code takes the natural log of each ratio, finds their mean and applies the exponential function to return to the ratio scale. The result is the geometric mean ratio. Transforming the two t interval endpoints the same way gives an interval for that quantity.
An ratio above favours B. A 20% time reduction means , so . An interval that lies above but crosses supports a positive benefit under the model, while leaving the useful threshold unresolved. Failure to resolve a threshold is not proof of no useful effect.
If A takes 120 ms and B takes 100 ms, how much time does B save as a fraction of A’s time?
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 95% t interval for A/B ratio with 1 (equal times) and with Ratio needed for a 20% reduction. Does the interval only support a positive improvement, or does it also clear the useful threshold?
Your result
Result tools
The prepared interval lies above 1 and includes values below 1.25. The model supports faster B times while leaving a 20% minimum benefit unresolved.
Published example output
The site ran the original code to produce this reference. Build environment ↗
Geometric mean A/B ratio: 1.197 95% t interval for A/B ratio: 1.085 1.321 Implied central time reduction (%): 16.46 Ratio needed for a 20% reduction: 1.25
The prepared interval lies above 1 and includes values below 1.25. The model supports faster B times while leaving a 20% minimum benefit unresolved.
Change and run again
In the Python editor, add b = b * 0.9 before log_ratio = np.log(a / b). Select Run Python again. Compare the lower endpoint of 95% t interval for A/B ratio with 1 and 1.25. Does it now clear the useful threshold? Return to the Python editor
What this example supports. The t model assumes independent paired blocks and approximately normal, stable log ratios. Five pairs provide limited evidence for checking those assumptions.
Try a fresh case
An interval for A/B is 1.05–1.15. The required ratio is 1.25. What does it support?
Hints for this question
- Mark parity and the useful threshold separately.
- Convert a percentage time reduction with A/B = 1 / (1 − reduction).