Section 18.2.9

Figure 7 right: paired latency-gap scatter and identity line

Definition

A paired latency-gap scatter is a figure with one point per trial, a trial being one run of the experiment. The point’s horizontal position is the latency of an operation in that trial, meaning the time from the operation’s start to its completion. The point’s vertical position is the longest gap between two consecutive messages received in the same trial. The identity line, also called the line of equality, is the straight line on which the two durations are equal. Each point keeps the two values of one trial together.

Where it fits

Main entry: Paired design (§11.7).

The entry on paired design explains why two measurements taken on the same thing, such as the same board or the same trial, are kept together and compared within the pair. Usually the pair holds one measurement under each of two conditions. In this figure the pair holds two different durations from one trial. Write LiL_i for the latency in trial ii and GiG_i for the longest gap in the same trial. The point for trial ii is at (Li,Gi)(L_i, G_i). Separate summaries of all latencies and of all gaps lose the record of which latency belongs with which gap.

The identity line makes the comparison inside each trial visible. A point on the line has Gi=LiG_i = L_i. A point above the line has a gap longer than the latency. A point below the line has a gap shorter than the latency, and its vertical distance to the line is Li−GiL_i - G_i: the point with Li=10L_i = 10 seconds and Gi=7G_i = 7 seconds lies 10−7=310 - 7 = 3 seconds below the line. This reading needs linear axes, and the distance is read on the vertical axis in that axis’s unit. The line runs at 45 degrees only if both axes also use the same unit and the same scale. If both axes are logarithmic, the line is still straight, but the vertical distance to it shows the ratio Gi/LiG_i / L_i, not the difference: equal distances mean equal ratios. All data in this entry’s examples are invented.

Limits and common mistakes

A point near the identity line, where the longest gap is about as long as the operation took, does not show that the operation caused the gap. A third factor, such as slow storage in that trial, can lengthen both durations without the operation ever stopping reception. The effect of such a shared cause is called confounding §11.10.

Li−GiL_i - G_i is a difference between two durations, not the length of a phase of the operation. The latency and the gap can begin and end at different events.

The longest gap can grow, and never shrink, as the receiver is observed for longer, so every trial needs an observation window of the same length.

A trial that lacks either value has no point. The caption should give the number of such trials.

Questions answered

Can the difference of the two reported medians §11.13 replace the median of Li−GiL_i-G_i?

No: the difference of the two medians cannot replace the median of the per-trial differences Li−GiL_i - G_i, because the two are different quantities. Here LiL_i is the latency of an operation in trial ii, GiG_i is the longest gap between received messages in the same trial, and a median is the middle value of a sorted list. Take three trials with latencies of 0, 100 and 100 seconds and gaps of 0, 0 and 100 seconds, in the same trial order. The per-trial differences are 0−0=00 - 0 = 0, 100−0=100100 - 0 = 100 and 100−100=0100 - 100 = 0 seconds, and their median is 0 seconds. The median latency is 100 seconds and the median gap is 0 seconds, so the difference of the medians is 100−0=100100 - 0 = 100 seconds.

The results disagree because the middle latency and the middle gap can come from different trials. Means do not behave this way: the mean latency 200/3200/3 minus the mean gap 100/3100/3 is 100/3100/3 seconds, the mean of the three differences. To report the median difference, subtract within each trial first, then take the median.

Related entries: Median (§11.13), Causal inference (§11.11), Finite-window rate (§11.41), Paired differences versus differences of medians (§18.1.14), Figure 7 left: continuity as three ECDFs on a log axis (§18.2.8), Confounding (§11.10).