Definition
Subtracting a nuisance interval at an upper bound is a way to correct a measured duration that contains a part the experiment did not mean to measure. That part is the nuisance interval, for example the seconds a person spends typing a code during a timed start-up. Its exact length is unknown but is known to be no longer than some value, its upper bound. Subtracting the upper bound from the measured total gives a duration that the rest cannot be shorter than: a lower bound, not the exact value.
The idea
A stopwatch runs from the moment a device is switched on until the device is ready for use. Partway through, the device waits for a person to type a six-digit code. The stopwatch shows 10 seconds, but the experimenter wants the start-up time without the typing. Nobody timed the typing. It is known only that the typing took at least 2 seconds and at most 4 seconds. The word nuisance is used as in statistics, where a nuisance factor is something that may affect a measured result but is not of primary interest.
Picture the total as a plank 10 units long from which one piece is sawn off. If the piece is between 2 and 4 units long, what remains is between 6 and 8 units long. The longest possible piece leaves the shortest possible remainder. So the upper bound of the nuisance interval gives the lower bound of the rest, and the lower bound of the nuisance interval gives the upper bound of the rest.
The picture fails in one respect. Sawn-off wood is gone, but a device can keep working while it waits. The rest is then still the time outside the wait, but it is no longer the time that the device spent working. All data in this entry’s examples are invented.
How it works
The correction has five steps.
Define the total. Name the event that starts it, the event that ends it and the clock that times both. Call its length .
Define the nuisance interval. Name the event that starts it and the event that ends it. Both events must lie inside the total. Call its length .
Bound the nuisance interval. Find a lower bound , a length that the nuisance interval cannot have been shorter than, and an upper bound , a length that it cannot have been longer than. Both must hold for this very trial, the one run that produced . An upper bound can come from a rule of the system, such as a time limit after which the step is abandoned, or from two timestamps (recorded clock readings) known to enclose the step. A lower bound can come from two timestamps known to lie inside the step.
Subtract. The rest, , lies between and .
Label the result. A figure that subtracts at the upper bound draws . Its label must say that the rest is at least this long.
For a summary over many trials, subtract inside each trial first and summarize afterwards. If the same bound holds in every trial, this procedure gives the median §11.13 of the totals minus , which is a lower bound on the median of the rests. The median is the middle value of the sorted values.
Worked example
One trial. The total is seconds, and the nuisance interval lasted between and seconds. The rest is at least seconds and at most seconds. A figure that subtracts at the upper bound draws 6 seconds, the lower end of that range.
An uncertain total. If the total is known only to lie between 9 and 11 seconds, the rest is at least seconds and at most seconds. That range is seconds wide: the seconds of the total’s range plus the seconds of the nuisance interval’s range. The widths add, so subtracting an uncertain length never narrows the range of the result.
Three trials. The totals are 9, 10 and 14 seconds, so the median total is 10 seconds. In every trial the nuisance interval lasted between 2 and 4 seconds. The median rest is then at least seconds and at most seconds. To check, suppose the nuisance intervals really lasted 2.5, 4 and 3 seconds. The rests are , and seconds. Sorted, they are 6, 6.5 and 11, so the median rest is 6.5 seconds, between 6 and 8. The median total minus the median nuisance interval, seconds, is not the median rest.
Stated precisely
Let the total run from time to time and the nuisance interval from time to time , all four read from one clock. Let and . Three premises are needed.
Containment. The nuisance interval lies inside the total: . Then , and the rest is exactly the time inside the total and outside the nuisance interval.
A bound for this trial. Numbers and are known with in the same trial that produced .
One unit and one clock. and are in the same unit as . If they come from timestamps of a clock other than the one that timed , those timestamps belong to a different clock domain §13.29, the set of timestamps that share one clock. The rates of the two clocks must then have been compared, so that the bounds can be converted to the clock that timed .
Then This range bounds : the true value lies between the two limits, and the range does not say where. Such a worst-case interval is not the usual statement of measurement uncertainty §11.33. The usual statement is a standard uncertainty: an estimated standard deviation §11.14, which measures how widely the plausible values spread. If the total is itself known only to lie between and , then
For trials with totals and rests , where and hold in every trial, The reason is that every is at least , that raising values never lowers their median, and that subtracting one constant from every value subtracts it from the median. The upper limit follows in the same way from .
Calling the system’s own time needs a fourth premise: the system does no work during the nuisance interval that the experimenter wants to count.
Limits and common mistakes
The direction is easy to reverse. Subtracting the upper bound of the nuisance interval gives a lower bound on the rest, which is the flattering end of the range when a shorter duration is the better result. A claim that the rest took at most some time must subtract the lower bound of the nuisance interval.
The result is a bound, not an estimate. Reporting the middle of the range as the value needs an assumption about how nuisance lengths are distributed, for example that every length between the limits is equally likely.
A typical value is not a bound. “People usually need 3 seconds” does not limit the trial in which someone needed 20 seconds.
Work done during the nuisance interval breaks the interpretation. Take seconds and a nuisance interval of exactly 3 seconds, during which the device spends 1 second preparing its storage. Then seconds. If the device worked throughout those 7 seconds, it worked for seconds in all. A run without the nuisance step would also take 8 seconds, because the preparation would still have to happen.
A negative result means that the bound is too loose to be useful. With seconds and seconds, second. A duration cannot be negative, so this says only that the rest is at least 0 seconds.
Questions answered
What must hold for that subtraction?
Three things must hold before the upper bound of a nuisance interval may be subtracted from a measured total. A nuisance interval is a part of the measured time that the experiment did not mean to measure, such as a wait for a person.
The nuisance interval lies entirely inside the measured total, so that the total is the nuisance interval plus the rest.
The upper bound is a true limit on the nuisance interval in the same trial, the same run of the experiment, as the total. A typical value, or a value from other trials, is not enough.
The total and the bound are in the same unit and come from the same clock, or from two clocks whose rates have been compared.
The result is then a lower bound on the rest: with a total of 10 seconds and a nuisance interval of at most 4 seconds, the rest took at least seconds. The result is not the exact length of the rest and not an upper bound on it. Reading the result as the time that the system itself needed requires a fourth condition: the system did no work during the nuisance interval that should be counted.
Related entries: Median (§11.13), Measurement uncertainty (§11.33), Clock domain (§13.29), Bounds for sums, maxima, and uncertain components (§18.5.10), Figure 9: boot timelines with two clocks and min–max whiskers (§18.2.13). Further reading: [77].