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 A/BA/B ratio above 11 favours B. A 20% time reduction means B/A≤0.8B/A\le0.8, so A/B≥1.25A/B\ge1.25. An interval that lies above 11 but crosses 1.251.25 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.

Benefit versus useful benefit
95% A/B ratio interval11.11.251.4A/B time ratio
95% A/B ratio interval11.11.251.4A/B time ratio
20% less time  ⟺  A/B≥1.2520\%\text{ less time}\;\Longleftrightarrow\;A/B\ge1.25
20% less timeA/B≥1.25\begin{gathered}20\%\text{ less time}\\A/B\ge1.25\end{gathered}
Invented paired reference: estimate 1.197, with a 95% t interval 1.085–1.321 for the geometric mean A/B ratio. The interval is above 1 but crosses the useful threshold 1.25. Positive benefit and established minimum benefit are different claims.

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

Editor tools
About Python ↗

Ctrl+Enter or ⌘+Enter runs the code.

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?

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?

Choose an answer

Hints for this question
  1. Mark parity and the useful threshold separately.
  2. Convert a percentage time reduction with A/B = 1 / (1 − reduction).
Your notes