Definition
Missing data are planned observations whose values were not recorded. Attrition is missing data caused by cases that drop out of a study before their outcome is recorded, as when a trial crashes, a device disconnects or a run is aborted. Whether the recorded values still represent all planned values depends on why the others are missing. Donald Rubin’s classification distinguishes values missing completely at random, missing at random given recorded information, and missing not at random, where the chance of being missing depends on the missing value itself.
The idea
A device runs 100 planned trials of an operation and writes each duration to a log when the trial ends. Most trials take about 1 millisecond. A few trials take a slow path and stall. A watchdog timer §6.16, a hardware timer that restarts the device when the software stops responding, then restarts the device before the log record is written. The log holds only the fast trials. Its mean is close to 1 millisecond, and only the number of records, fewer than 100, shows that anything is missing.
The missing records are not a random selection of the planned trials: they are missing because they were slow. A customer survey is a fair picture. Customers who left in anger do not answer it, so the answers look happier than the customers were. The picture stops being accurate in one respect: a survey office knows how many forms it sent, whereas a log often does not show how many trials were planned. Keeping the planned count is therefore the first step of every analysis of missing data.
How it works
Fix the denominator before running. Write down how many trials will count, called the planned denominator, and which attempts are warmup §11.27 and do not count, so that the set of counted trials cannot be adjusted after the outcomes are seen.
Mark the measured boundary: the point at which the system under test begins the operation being measured, for example the instant the device receives the request.
Classify every attempt by where it failed, and treat each class by a fixed rule.
Failed before the boundary, for example because the test computer could not open its connection. The system under test never began the operation, so the failure says nothing about the outcome, and the attempt may be repeated in the same planned slot. This is sound only while such failures are unrelated to the version under test, so compare their rates across versions.
Crossed the boundary. The system began the operation, so whatever followed, including a crash, a timeout §9.34 or a corrupted record, is that trial’s outcome. The trial counts and must not be repeated: a repeat would replace a bad outcome by a fresh draw, and repeating until success turns every failure into a success.
Ambiguous: the records cannot show whether the boundary was crossed. Treat the attempt as having crossed it, count it as a trial with a missing outcome, and report how many such attempts occurred. The opposite choice would let failures caused by the system be repeated away.
Record, for every counted trial, whether its outcome was observed and, if not, the stage at which it was lost and the reason: a disconnect, a crash, a timeout, a corrupted record, or an exclusion under a declared rule.
Compare the losses across versions, devices, run order and time. A version that loses more trials than another has produced a result about its reliability, not merely a gap in the data.
Choose the analysis to match the assumed reason for the losses, using the three classes below, and report the planned, attempted, counted, observed and lost numbers with every summary.
Rubin’s three classes describe why values are missing.
Missing completely at random (MCAR): the loss is unrelated to the value and to everything else recorded, as when records are lost because a cable was knocked loose at a moment unrelated to the trials. Analyzing only the complete records is then unbiased, only less precise.
Missing at random (MAR): the loss depends only on recorded information, such as which device ran the trial, and not on the value itself once that information is fixed. Weighting, or imputation (filling in values predicted from the recorded information), can then remove the bias. The name misleads: the values are not lost by chance, only for reasons that the records capture.
Missing not at random (MNAR): the loss depends on the value itself, even among trials with the same recorded information, as when slow trials crash before logging. No method that uses only the recorded values removes this bias. The analysis needs bounds, an explicit model of the loss or a sensitivity analysis §11.46, and the failures are reported as a result.
Worked example
Attempt accounting. A plan fixes 20 counted trials. Three attempts fail before the boundary, because the test computer cannot connect, and are repeated in their slots, so there are attempts. Of the 20 counted trials, 17 produce a record, 2 crash after the device received the request, and 1 is ambiguous. The report states: 20 planned, 23 attempted, 20 counted, 17 observed, 3 lost (2 crashes and 1 ambiguous attempt). The fraction of counted trials that produced a result is , not .
Missing at random, corrected by weighting. Two devices each run 10 planned trials. On device A every trial takes 2 milliseconds, but its radio link loses half of the records, regardless of how the trials went, so 5 are recorded. On device B every trial takes 1 millisecond and all 10 are recorded. The mean of the 15 recorded values is milliseconds. The mean over all 20 planned trials is milliseconds. Device A is under-represented. Each recorded value from A stands for planned trials, since only half were recorded, and each value from B for . Weighting by these numbers gives milliseconds, the correct mean. The weighting works because, on each device, the lost records were no slower than the recorded ones.
Missing not at random, bounded. Ten trials are counted. Nine are recorded at 1 millisecond each; the tenth crashed before its record was written. The recorded mean is millisecond. If the tenth trial ran for 2 milliseconds before it ended, the mean of all ten is milliseconds; if it ran for 1000 milliseconds, the mean is milliseconds. The log supports both. Suppose an independent fact limits the missing value: the test equipment resets the device 1000 milliseconds after the start of any trial that has not finished, so the crashed trial ran for between 0 and 1000 milliseconds before it ended. Then the mean time per trial lies between and milliseconds. The bound is wide because the data say nothing about the crashed trial. Its width is the missing fraction times the possible range, milliseconds. The upper limit must come from such a mechanism, not from the largest recorded value.
Stated precisely
Let be a trial’s outcome, its record indicator (1 if the outcome was recorded, 0 if not) and information recorded for every trial, such as the device. Write for “ and are independent once is known”. The three classes are:
MCAR: ;
MAR: ;
MNAR: neither holds.
This is the form for one outcome with fully recorded . Rubin’s general definitions apply the same idea to the observed and missing parts of a whole data set.
The mean of the recorded values estimates , the mean among recorded trials, where denotes the expected value (the probability-weighted average) and the bar reads “given”. The usual target is . The two are equal under MCAR. Under MAR, let be the probability that a trial with information is recorded, and suppose for every possible . Then which is the inverse probability weighting used in the example: each recorded value is weighted by one over its probability of being recorded. The condition , called positivity, matters: a group that is never recorded cannot be represented by weighting the others.
Under MNAR, suppose the outcome is known to lie in , and let be the recorded fraction. Because and the unknown lies in , an interval of width .
The recorded data cannot tell MAR from MNAR. The same recorded values can arise under both, because the values that would tell them apart are the missing ones. MCAR can be refuted, for example by showing that loss rates differ between devices, but MAR can only be assumed and argued from the mechanism.
Limits and common mistakes
More data do not fix the bias. A million recorded trials with an outcome-dependent loss give a precise estimate of the wrong quantity.
Filling each missing value with the mean of the recorded values, called mean imputation, preserves the mean only under MCAR, and it understates the spread and the uncertainty in every case, because the invented values agree exactly with the rest. Multiple imputation, which fills each gap several times with plausible random values and combines the results, represents the uncertainty that a single filled-in value hides, but it still rests on the MAR assumption.
Repeating failed trials until they succeed, or replacing crashed runs with new runs, turns an outcome-dependent loss into a data set that looks clean. The attempt accounting above exists to prevent exactly this.
A metric computed on successful trials only is legitimate when it is labeled as such and the failure rate is reported beside it.
Survivorship bias §11.30 is the special case in which the cases that failed a selection step are the missing ones. Censoring §11.28 is a different case: the value is partly known, for example known to exceed a time limit, rather than missing.
Questions answered
Are failed trials missing at random or more likely to be slow or unsafe?
The recorded data alone cannot show that failed trials are missing at random, and failed trials are often more likely to be slow or unsafe, because the fault that makes a trial slow or unsafe, such as a stall, an overload or a crash, is often what stops its result from being recorded. Missing at random means that, once recorded information such as the device and the version is taken into account, whether a trial’s result is missing does not depend on that result. A crash that erases its own slow timing is the opposite case, called missing not at random: the values are missing because of what they are.
Evidence decides which case is plausible. Check where each failure happened: a failure before the measured operation began, such as a test computer that could not connect, says nothing about the operation, whereas a failure after it began is part of the outcome and must be counted. Compare failure rates across versions, devices and run order, and note how long each failed trial had run before it stopped. Report the planned number of trials, the number lost and the reason for each loss, label metrics computed on successful trials as such, and give a bound or a sensitivity analysis for the overall result.
Related entries: Censoring (§11.28), Survivorship bias (§11.30), Sensitivity analysis (§11.46), Conditioning on valid trials and selection bias (§18.5.7), Warmup and steady state (§11.27).