Tutorials › Introduction to Statistics › Flagged Observations Are Not Automatically Errors

Graphs for Quantitative Data · Tutorial 138 of 996

Flagged Observations Are Not Automatically Errors

Learn to interpret a flagged laboratory measurement as a prompt for investigation, not as automatic evidence of a mistake.

Beginner 9 min read

What You'll Learn

  • Define the inner fences used to flag observations in a modified boxplot.
  • Calculate fences and identify which laboratory values lie beyond them.
  • Distinguish a graphical flag from evidence of a recording or measurement error.
  • Use laboratory context and follow-up checks to assess a flagged value.
  • Explain why flagged observations should not be deleted automatically.

Why a Flag Is a Prompt, Not a Verdict

A modified boxplot makes unusually distant measurements easy to notice. In a laboratory data set, a point beyond the boxplot’s whiskers may deserve attention: perhaps a digit was entered incorrectly, perhaps the measurement was affected by a technical problem, or perhaps the specimen genuinely had an unusually high value. The plotted point alone cannot tell us which explanation is right.

That distinction matters. If every flagged value is deleted, real and informative measurements may be lost. If a genuine recording or measurement problem is ignored, the data may be misleading. The useful role of a flag is to identify a value for careful follow-up, not to make the follow-up decision automatically.

Definition: In a modified boxplot, the lower and upper fences are \(Q_1-1.5(\mathrm{IQR})\) and \(Q_3+1.5(\mathrm{IQR})\), where \(Q_1\) and \(Q_3\) are the first and third quartiles and \(\mathrm{IQR}=Q_3-Q_1\). An observation below the lower fence or above the upper fence is flagged by this graphical rule. The whiskers extend to the most extreme observed values that are not beyond the fences; flagged observations are plotted separately.

A value exactly on a fence is not beyond it, so it is not flagged by this rule. The rule compares a measurement with the middle-half spread of the data. It does not compare the measurement with a laboratory reference range, decide whether a result is clinically important, or identify the cause of an unusual value.

The fences are descriptive conventions, not the outcome of a probability model. Applying them does not require a normal distribution, and crossing a fence does not mean a measurement is impossible or erroneous. For the calculations below, the quartiles are supplied for each hypothetical boxplot; any quartile convention used to construct a plot should be used consistently.

Worked Examples: What the Flag Does and Does Not Tell Us

Worked Example: A High Assay Result Is Flagged

A hypothetical laboratory records 12 enzyme assay measurements, in units per liter (U/L): 18, 19, 20, 20, 21, 21, 22, 22, 23, 24, 25, and 41. The quartiles used for the modified boxplot are \(Q_1=20\) U/L and \(Q_3=23.5\) U/L. Is 41 U/L flagged, and what can be concluded?

First calculate the interquartile range and the upper fence:

$$ \mathrm{IQR}=Q_3-Q_1=23.5-20=3.5\ \mathrm{U/L} $$
$$ \text{Upper fence}=Q_3+1.5(\mathrm{IQR}) =23.5+1.5(3.5) =23.5+5.25 =28.75\ \mathrm{U/L} $$

Because \(41>28.75\), the 41 U/L observation is above the upper fence and is flagged. The lower fence is \(20-1.5(3.5)=14.75\) U/L; none of the listed measurements is below it.

The justified conclusion is that 41 U/L is unusually high relative to the middle-half spread of these 12 measurements, according to the modified-boxplot rule. The calculation does not show that the result was typed incorrectly or measured inaccurately. The laboratory should check the specimen identifier, original instrument record, and relevant quality-control information before deciding how to handle it.

Worked Example: An Audit Confirms a Data-Entry Mistake

Now suppose a different hypothetical data file contains 12 measurements: 18, 19, 20, 20, 21, 21, 22, 22, 23, 24, 25, and 410 U/L. The quartiles used for its plot are \(Q_1=20\) U/L and \(Q_3=23.5\) U/L. The instrument record for the last specimen says 41.0 U/L. How should the 410 U/L entry be assessed?

The quartiles give \(\mathrm{IQR}=23.5-20=3.5\) U/L, so the upper fence is

$$ 23.5+1.5(3.5)=28.75\ \mathrm{U/L}. $$

Since \(410>28.75\), the entered value is flagged. But the flag is not what establishes the mistake: the original instrument record independently shows that the file entry does not match the recorded result. The file has 12 measurements, including 11 values from 18 through 25 U/L and the final entry of 410 U/L.

After checking that the instrument record belongs to the same specimen and that the relevant record is reliable, the file can be corrected from 410 to 41.0 U/L, with the correction documented according to laboratory practice. With 41.0 in place, the value remains above the same upper fence of 28.75 U/L. It is still flagged, but it is no longer the same kind of problem: the audit identified a transcription error in the original file, while the corrected measurement is a recorded laboratory result. Further context may still be relevant to interpreting that result.

Worked Example: A Flagged Value Is Confirmed

A hypothetical environmental laboratory measures a concentration in 12 samples, in milligrams per liter (mg/L): 4, 5, 5, 6, 6, 7, 8, 8, 9, 10, 11, and 35. The quartiles for the modified boxplot are \(Q_1=5.5\) mg/L and \(Q_3=9.5\) mg/L. The laboratory checks the sample label and instrument record, repeats the measurement on the stored sample, and obtains 34.8 mg/L. What is the appropriate interpretation?

The spread and upper fence are

$$ \mathrm{IQR}=9.5-5.5=4.0\ \mathrm{mg/L} $$
$$ \text{Upper fence}=9.5+1.5(4.0)=9.5+6.0=15.5\ \mathrm{mg/L}. $$

Since \(35>15.5\), the original measurement is flagged. The repeat result, 34.8 mg/L, is also well above the fence. In this hypothetical situation, the specimen label and record agree, and the repeat measurement supports the unusually high result. These checks give evidence against a simple recording error or an isolated faulty reading, although the boxplot itself supplies no such evidence.

The result should therefore not be discarded merely because it is flagged. It can be retained and described as unusually high relative to the other measurements, with the verification and relevant sample context recorded. Whether the concentration is important for a particular environmental or regulatory purpose is a separate question that cannot be answered by the boxplot alone.

Why the Fence Rule Cannot Diagnose an Error

The logic of the flag is deliberately limited. For a value \(x\), the upper-tail rule is

$$ x>Q_3+1.5(\mathrm{IQR}). $$

Since \(\mathrm{IQR}=Q_3-Q_1\), this is equivalent to

$$ x-Q_3>1.5(Q_3-Q_1). $$

Thus, the rule says that \(x\) lies more than one and a half times the interquartile range above \(Q_3\). It uses the value and the quartiles; it does not use the instrument log, specimen label, measurement protocol, or information about how the value was entered. Those records are needed to investigate a possible error.

The same numerical value can consequently have different explanations in different situations. A value may be a genuine unusual observation, a correctly measured result from an unusual specimen, a measurement affected by a technical problem, or a transcription error. The boxplot flag is compatible with each possibility. It points to a value worth checking but cannot choose among the explanations.

A Practical Follow-Up

A sensible follow-up begins with the original records and the measurement process, not with deleting the point. Depending on the laboratory and measurement, useful checks may include:

  • Comparing the data file with the original instrument output or laboratory worksheet.
  • Confirming that the result is attached to the correct specimen and has the correct units.
  • Checking for a decimal-place, digit-transposition, or copy-and-paste error.
  • Reviewing instrument calibration, quality-control results, and any relevant notes about the measurement.
  • Repeating the measurement when a stored sample and an appropriate repeat procedure are available.

A check should be relevant to the suspected problem. A repeat measurement can help assess whether a result is reproducible, for example, but it cannot by itself establish that the original specimen was labeled correctly. Likewise, a matching data-entry record does not prove that an instrument measurement was accurate. The evidence should be described in terms of what was actually checked.

If a value is confirmed to be erroneous, any correction or exclusion should follow the applicable data-handling procedure and be documented. If the value is verified as a genuine measurement, it should generally remain in the data set unless there is a separate, explicit reason to exclude it. The decision should not be based on whether retaining the point changes a graph or summary in a convenient direction.

Common Mistake

Wrong reasoning: “The modified boxplot marks this result as an outlier, so it must be a data-entry error and should be removed.”

Correction: The plot marks a value that lies beyond a fence calculated from the quartiles and IQR. It does not identify a cause. Check the underlying records and measurement context, then decide whether the observation is erroneous, verified, or still uncertain. A confirmed unusual measurement is not made erroneous by its position in the boxplot.

A second caution is that “not flagged” does not mean “error-free.” A transcription mistake can produce a value that lies within the fences, and a technical problem can affect multiple observations without producing any single extreme point. A modified boxplot is one descriptive check, not a general data-validation system.

Key takeaway: A modified boxplot identifies observations beyond its \(1.5(\mathrm{IQR})\) fences. The flag describes a value’s position relative to the data; it does not diagnose a mistake. Use records and measurement context to investigate, and document any correction or exclusion.

Check Your Understanding

Answer each question using the distinction between a graphical flag and evidence about how a measurement was obtained.

  1. A laboratory has \(Q_1=12\) mg/L and \(Q_3=20\) mg/L. Calculate the IQR and upper fence. Would a value of 33 mg/L be flagged?
  2. In the same data set, a value is beyond the upper fence. What does the modified boxplot establish, and what does it not establish?
  3. A flagged value is confirmed by the original instrument record, correct specimen identification, and a repeat measurement. Explain why it should not be deleted just because it is flagged.
  4. A value is not flagged, but the original worksheet shows that one digit was entered incorrectly. What does this show about the limits of the boxplot rule?
  5. Name two different checks that could be relevant when investigating a flagged laboratory measurement, and state what each check can help assess.