Full name: Continuity shown as three empirical cumulative distribution functions (ECDFs) on a logarithmic axis.
Definition
Continuity drawn as three ECDFs §11.17 on a log axis §18.1.12 is a figure showing how long a receiver went without a message. Each trial, one run of the experiment, contributes one value: its longest gap between consecutive message arrivals in a fixed-length observation window. An ECDF (empirical cumulative distribution function) is a curve whose height at is the fraction of these values at or below . The figure draws three curves, one per situation being compared (a condition), on a logarithmic time axis: equal distances multiply time by equal factors.
The idea
Continuity means that a service keeps going without a noticeable break while something else happens. Take a sensor that sends a reading to a phone ten times a second while the sensor installs new software. An average hides a break. A count divided by the length of the observation window, called a finite-window rate §11.41, is 10 readings per second for 100 readings in 10 seconds, whether the readings arrived evenly, or 50 arrived, nothing came for 5 seconds, and 50 more arrived. The longest gap tells the two cases apart. It is 0.1 seconds in the first case and about 5 seconds in the second.
The longest gap is one number per trial, and an ECDF shows the numbers of all trials without reducing them to an average. One curve per condition on shared axes lets the reader compare the conditions at every gap length. A logarithmic time axis suits values that span several powers of ten, such as gaps from hundredths of a second to several seconds: a linear axis would crowd the short gaps into its left edge.
The longest gap is a maximum, and a maximum depends on how many chances it had. Watching a receiver for longer can raise its longest gap but never lower it. That is why the observation window has a fixed length. All data in this entry’s examples are invented.
How it works
The figure is built in six steps.
Fix the observation window. Choose the event that starts the window and the window length . Use the same choice for every trial and every condition.
Record the arrivals. In each trial the receiver notes the time of every message that arrives inside the window, always on the same clock.
Compute the gaps. A gap is the time from one arrival to the next. State whether the two edge gaps also count: from the start of the window to the first arrival, and from the last arrival to the end of the window.
Keep the longest gap. This number, written , stands for the whole trial. State what a trial with fewer than two arrivals receives, because it has no pair of consecutive arrivals.
Draw one ECDF per condition. For a condition with trials, the curve starts at height 0 and rises by at the longest gap of each trial, so it ends at height 1.
Use a logarithmic time axis. Each value is placed according to its base-10 logarithm, the power to which 10 must be raised to give the value: for 0.01, for 0.1 and 0 for 1. These three values are therefore equally far apart, and the point halfway between 0.1 and 1 second stands for about 0.32 seconds, not 0.55 seconds.
To read the figure, pick a gap length on the horizontal axis, go up to a curve and read the height. That fraction of the condition’s trials had a longest gap no longer than the chosen length. A curve that lies entirely to the left of another belongs to the condition with the shorter longest gaps. If two curves cross, neither condition is better at every gap length.
Worked example
One trial. Messages arrive at 0, 1, 4 and 5 seconds. The gaps are , and seconds, so the longest gap is seconds. Now watch the same trial for longer, and let the next message arrive at 10 seconds. The new gap is seconds, so the longest gap becomes 5 seconds. Only the longer observation raised the result.
One curve. Five trials of one condition have longest gaps of 0.02, 0.03, 0.03, 0.2 and 2 seconds. Each trial adds to the height. The curve is at height 0 below 0.02 seconds, at height 0.2 from 0.02 seconds, at from 0.03 seconds because two trials share that value, at from 0.2 seconds, and at from 2 seconds. At 0.1 seconds the height is 0.6: three of the five trials had no gap longer than 0.1 seconds. The median §11.13 longest gap, the middle of the five sorted values, is 0.03 seconds, where the curve passes height 0.5. On a linear axis from 0 to 2 seconds, the three shortest values would sit within of the axis length from its left end.
Stated precisely
Let one trial observe the window from time to time . Let be the arrival times inside the window, in order and all read from one clock. For the longest gap is If the edge gaps count, set and . The longest gap is then . It exists for every , and for a trial with no arrival it equals .
For a condition with trials whose longest gaps are , the curve is
Four statements hold.
Lengthening the window from to a larger , with the arrivals in the first unchanged, never lowers or . Every gap between consecutive arrivals in the shorter window is still a gap in the longer one. The edge gap at the end of the shorter window either grows or is replaced by a longer gap that ends at a new arrival.
No gap is longer than the window, so every curve has reached height 1 at .
The logarithmic axis changes horizontal positions only. Every height is the same as on a linear axis.
If a trial has gaps and each gap, independently of the others, is longer than with the same probability , the longest gap is longer than with probability , which grows with .
Curves can be compared only if every condition uses the same start event, the same , the same edge rule and the same sending pattern.
Limits and common mistakes
The curve has one point per trial, not one per gap. A height of 0.8 at 0.2 seconds says that 80% of the trials had no gap longer than 0.2 seconds, not that 80% of all gaps were that short.
The sender sets the baseline. If it transmits every 0.1 seconds, gaps of about 0.1 seconds are normal, and only a gap several times longer indicates a break.
A long gap does not name its cause. The sender may have sent nothing, a message may have been lost and sent again, or the receiving software may have held messages back and handed them over later in one batch.
The window caps the result. A silence that is still going on when the window ends is recorded as shorter than it was, or not at all if edge gaps do not count. This is a case of censoring §11.28, which means that a value is only partly known: here the true length is known only to be at least the recorded one.
If the sender kept transmitting, a trial with fewer than two arrivals was almost entirely silent, and leaving such trials out hides the worst results.
A logarithmic axis has no position for zero. The horizontal distance between two curves on it is a factor, not a number of seconds.
Few trials make coarse steps. With 5 trials each step is 0.2 high, so the curve cannot show what happens in 1 trial out of 100, and it describes only the trials that were run.
Questions answered
Why fix the observation-window length?
The observation-window length is fixed because the plotted number, the longest gap between two consecutive message arrivals in a trial, can grow but never shrink when the trial is watched for longer. A longer window contains more gaps, and each gap is another chance for a long one. If one condition, one of the situations being compared, were observed for longer than another, its longest gaps would tend to be longer, and its curve in the figure would shift toward longer gaps, even if the two conditions behaved identically.
A simple model shows the size of the effect. Suppose each gap, independently of the others, is longer than 1 second with probability 0.01. A trial with 10 gaps then contains a gap longer than 1 second with probability . A trial with 100 gaps contains one with probability . The behavior is the same, yet the share of trials with a long gap rises from about 10% to about 63%. A window of the same length in every trial removes this effect, provided the sending pattern is also the same.
Related entries: Empirical cumulative distribution function (ECDF) (§11.17), Finite-window rate (§11.41), Censoring (§11.28), Matplotlib (§12.30), ECDF and reading a cumulative latency curve (§18.1.9), Logarithmic axes and multiplicative differences (§18.1.12), Figure 7 right: paired latency-gap scatter and identity line (§18.2.9).