What a Boxplot Outlier Flag Does—and Does Not—Say
A boxplot compresses a distribution into a box, whiskers, and sometimes separately plotted points. Those points can attract attention, but their meaning is easy to overstate. A point beyond a whisker is usually flagged by a numerical rule; it is not automatically a recording error, an invalid observation, or a value that should be removed. Conversely, a value inside the whiskers has not been certified as accurate.
For the standard modified boxplot, the flagging rule is based on the quartiles and the interquartile range. It is a way to screen observations for review, not a test of whether they are “true” or “false.” Interpretation requires knowing what the variable measures and considering whether an unusual value is plausible in that context.
In a standard modified boxplot, the box extends from \(Q_1\) to \(Q_3\), with a line at the median. The whiskers reach the most extreme observed values that are still within the fences. A point beyond a whisker is therefore outside a fence and is plotted separately. The whisker endpoint is an observed value; it need not equal the fence itself.
Quartiles can be calculated using different conventions, especially for small samples. A problem or software output may specify a convention. In the worked examples below, quartiles are calculated using the median-of-halves convention: sort the observations, find the median, and find \(Q_1\) and \(Q_3\) as the medians of the lower and upper halves. When the sample size is odd, omit the overall median from those halves. If another convention is specified, use it consistently.
Worked Examples: Applying the Rule Without Overinterpreting It
Worked Example: A Flagged Value That Could Be Genuine
A hypothetical insurer reviews ten amounts paid for small equipment claims, in dollars: 100, 110, 120, 130, 140, 150, 180, 250, 400, and 900. Using the median-of-halves convention, identify any flagged value, the upper whisker endpoint, and what the flag does and does not establish.
Method. Sort the values (they are already sorted), calculate the quartiles and fences, and compare each observation with the fences.
Step 1: Find the quartiles. The lower half is 100, 110, 120, 130, 140, so \(Q_1=120\). The upper half is 150, 180, 250, 400, 900, so \(Q_3=250\).
Step 2: Calculate the IQR and fences. The IQR is \(250-120=130\). The lower fence is \(120-1.5(130)=120-195=-75\). The upper fence is \(250+1.5(130)=250+195=445\).
Step 3: Identify the flag and whisker endpoint. The value 900 exceeds 445, so it is flagged. The value 400 is the largest observation that does not exceed the upper fence, so the upper whisker endpoint is 400. There are no observations below the lower fence.
Interpretation. A $900 payment is unusual relative to this sample under the 1.5 IQR rule. It could still be a valid large claim. The flag calls for a contextual check—for example, whether the amount is plausible for the equipment and whether the record is accurate—not automatic deletion.
Check. The fence is 445, and the only observation above it is 900; 400 is within the fence. The common mistake this method avoids is treating a flagged payment as necessarily erroneous.
Worked Example: An Unflagged Value That Still Needs Checking
A hypothetical claims team has ten records of reimbursement amounts in dollars: 900, 950, 975, 990, 1,000, 1,010, 1,025, 1,050, 1,100, and 1,200. The boxplot does not flag the $1,000 record. A check against the source ledger later shows that this particular record should have been $100. Calculate the fences and explain what the boxplot did and did not detect.
Method. Calculate the quartiles and fences from the recorded values, then compare the result with the independent source check.
Step 1: Find the quartiles. The lower half is 900, 950, 975, 990, 1,000, so \(Q_1=975\). The upper half is 1,010, 1,025, 1,050, 1,100, 1,200, so \(Q_3=1,050\).
Step 2: Calculate the IQR and fences. The IQR is \(1,050-975=75\). The lower fence is \(975-1.5(75)=975-112.5=862.5\). The upper fence is \(1,050+1.5(75)=1,050+112.5=1,162.5\).
Step 3: Assess the recorded $1,000 value. Since \(862.5\leq1,000\leq1,162.5\), it is not flagged. The boxplot provides no reason, based on this rule, to single it out. The source-ledger check nevertheless establishes that the recorded value is wrong.
Interpretation. An observation can be numerically typical and still be inaccurate. A boxplot uses the recorded values and their distribution; it does not compare each record with a source document or verify its meaning.
Check. The fences contain $1,000, but the source value is $100. The method avoids the mistake of interpreting “not flagged” as “verified.” The unrelated $1,200 observation is above the upper fence of $1,162.5, which is a separate flag to investigate.
Worked Example: An Unusual Value in a Skewed Distribution
A hypothetical analyst examines ten positive loss amounts, in dollars: 12, 14, 15, 16, 18, 20, 24, 35, 60, and 180. Using the median-of-halves convention, identify the flagged observations and explain why the distribution’s context matters.
Method. Apply the 1.5 IQR rule, then interpret the flag with the positive, right-skewed loss context in mind.
Step 1: Find the quartiles. The lower half is 12, 14, 15, 16, 18, so \(Q_1=15\). The upper half is 20, 24, 35, 60, 180, so \(Q_3=35\).
Step 2: Calculate the IQR and fences. The IQR is \(35-15=20\). The lower fence is \(15-1.5(20)=15-30=-15\). The upper fence is \(35+1.5(20)=35+30=65\).
Step 3: Identify the flags. Every observation is at least 12, which is above the lower fence of -15. The value 180 exceeds the upper fence of 65, so it is flagged. The largest value within the upper fence is 60, so that is the upper whisker endpoint.
Interpretation. Loss amounts are positive and can have a long upper tail. A large loss may be unusual yet entirely plausible. The flag identifies a value to review; it does not show that the value violates the loss process or that the distribution should be symmetric. The analyst should use the variable’s meaning and relevant records to assess the observation.
Check. The upper fence is 65, placing 180 beyond it and 60 within it. The method avoids the mistake of treating a conventional fence as a universal boundary for valid data.
Why the Rule Works as a Screening Convention
The 1.5 multiplier is a conventional distance on the quartile scale. It provides a consistent way to identify observations far from the central half of the sample without requiring a mean and standard deviation. It is not a universal probability cutoff, and the rule alone does not specify how many flags a particular distribution “should” have.
The rule also behaves consistently under a change of units. Suppose values are converted using \(Y=a+bX\), where \(b>0\). Quartiles transform to \(Q_1(Y)=a+bQ_1(X)\) and \(Q_3(Y)=a+bQ_3(X)\), so \(IQR(Y)=bIQR(X)\). The lower fence transforms as follows:
The upper fence transforms in the same way. Thus an observation is beyond a fence before the conversion if and only if its converted value is beyond the corresponding converted fence. Changing from dollars to cents, for example, does not change which observations are flagged. This property supports interpreting the rule as a relative screen on the variable’s scale; it does not make the rule a test of data accuracy.
Common Misreadings and a Careful Interpretation
A boxplot flag answers a limited question: is the observation outside the specified fences for this distribution? It does not answer whether the observation is valid, whether it is important for a predictive model, or whether it should be removed. Those decisions need context and a stated analytical reason.
- “Every point beyond a whisker is erroneous.” Incorrect. The rule detects a value far from the central half, not an error. A valid severe claim or unusually long processing time could be flagged.
- “Every unflagged value is safe.” Incorrect. The rule may not flag an inaccurate value that falls within the fences. A distribution-based screen cannot replace checks against definitions, known constraints, or reliable source records.
- “The whisker ends at the fence.” Usually incorrect for a standard modified boxplot. The whisker ends at the most extreme observed value inside the fence; the fence can lie beyond that value.
- “The rule has the same meaning for every variable.” Incorrect. A flag on a positive, strongly skewed amount has a different practical interpretation from a flag on a variable with a tight, roughly symmetric range. The arithmetic rule is the same; the context is not.
- “A flag should be deleted before modeling.” Not on the flag alone. First determine whether the record is erroneous, valid but unusual, or in need of further investigation. Any treatment should follow the analytical objective and be documented.
When reading a boxplot, state the rule and the conclusion precisely: “This observation is above the upper 1.5 IQR fence” is supported by the calculation. “This observation is wrong” requires additional evidence. Similarly, “this observation is within the fences” does not establish that the record has been verified.
Check Your Understanding
For calculation questions, use the median-of-halves convention. Treat each stated observation as a recorded value; a flag is not, by itself, evidence of an error.
- A sorted sample is 3, 4, 5, 6, 7, 8, 9, 20. Find \(Q_1\), \(Q_3\), the IQR, the fences, and any flagged observation. (Answer: \(Q_1=4.5\), \(Q_3=8.5\), \(IQR=4\), fences \(-1.5\) and \(14.5\); 20 is flagged.)
- A sorted sample of reimbursement amounts is 2, 3, 4, 4, 5, 5, 6, 7, 8, 9. Calculate the fences and decide whether 9 is flagged. (Answer: \(Q_1=4\), \(Q_3=7\), \(IQR=3\), fences \(-0.5\) and \(11.5\); 9 is not flagged.)
- A sorted sample is 40, 42, 44, 45, 46, 47, 48, 50, 55, 80. Identify the upper fence, flagged value, and upper whisker endpoint. (Answer: \(Q_1=44\), \(Q_3=50\), \(IQR=6\), upper fence \(=59\); 80 is flagged and 55 is the upper whisker endpoint.)
- A recorded value is inside the 1.5 IQR fences, but an authoritative source record shows that it was entered incorrectly. What does the boxplot establish about the value’s accuracy? (Answer: Nothing about its accuracy; being inside the fences means only that it is not flagged by this rule.)
- A positive loss amount is above the upper 1.5 IQR fence. Give one conclusion supported by the boxplot and one conclusion it does not support. (Answer: It supports saying the amount is flagged as unusually high relative to the sample under the rule; it does not establish that the amount is erroneous or should be removed.)