A ratio or difference inherits uncertainty from its inputs; arithmetic precision is not evidence that the result is measured precisely.
Derived metrics: carry input bounds and shared error into the result
Start with a named derived quantity
A delivery team reports average route speed as distance divided by elapsed time. The estimated route distance is 47.2 kilometres with a conservative input range from 46.9 to 47.5 kilometres; elapsed time is 1.5 hours with a range from 1.4 to 1.6 hours. The point calculation is about 31.47 kilometres per hour. A single printed value hides both input ranges and the assumptions that produced them. Units must cancel correctly.
Propagate defensible bounds
For positive distance and positive time, the smallest possible ratio under separate input bounds uses the smallest distance and largest time; the largest uses the largest distance and smallest time. That gives 46.9/1.6 = 29.3125 and 47.5/1.4 about 33.93 kilometres per hour. This is a conservative arithmetic envelope, not a probability interval. If some combinations cannot occur together, the envelope may be wider than the feasible range.
Identify shared error
Two distances measured with the same miscalibrated odometer share a systematic component. Averaging them reduces independent noise but not that shared bias. Likewise, subtracting two readings from one sensor may cancel an offset but not a changing slope. Record which inputs share a device, calibration, clock or source table before applying a formula that assumes independent errors. Reference checks reveal some shared components.
Keep statistical and engineering ranges distinct
A confidence interval for a population mean addresses sampling variability under a design. A measurement bound addresses uncertainty in the observed quantities. A derived metric may need both. Do not add their endpoints casually or label the arithmetic envelope a 95% interval. Bootstrap interpretation is useful only after the independent sampling unit and measurement inputs are specified.
Tie uncertainty to the decision
If a route policy changes above 32 kilometres per hour, the point value is below the threshold but the arithmetic envelope crosses it. The packet should say the decision is unresolved under current input bounds and identify which measurement would reduce the range most. Rounding to one decimal place cannot make that ambiguity disappear.
Implementation
from math import isclose
def positive_ratio_bounds(numerator_low, numerator_high, denominator_low, denominator_high):
if not 0 <= numerator_low <= numerator_high:
raise ValueError("numerator bounds must be nonnegative")
if not 0 < denominator_low <= denominator_high:
raise ValueError("denominator bounds must be positive")
return numerator_low / denominator_high, numerator_high / denominator_low
low_speed, high_speed = positive_ratio_bounds(46.9, 47.5, 1.4, 1.6)
assert isclose(low_speed, 29.3125)
assert round(high_speed, 2) == 33.93Performance and operating cost
Computing one monotone ratio envelope is O(1) time and space. For many correlated inputs or nonlinear formulas, scenario enumeration or simulation costs more and requires an explicit dependence model; a simple endpoint calculation is not enough.
Common Mistakes
- Do not call an arithmetic input-bound envelope a confidence interval.
- Do not assume repeated measurements from one device have independent errors.
- Do not let rounded display digits decide a threshold crossed by plausible input values.
Read next
- Quantity units and conversion contracts for mixed datasets
- Calibration drift: compare sensor readings with a reference
- Sensitivity analysis: find which assumptions can reverse a decision
- Project: audit cold-chain sensor measurements before classifying excursions
Continue the workflow: Scenario stress tests and regret for uncertain allocation benefits.
Continue the workflow: Joint inputs and correlated operational shocks.
