Outlier Fences and Rule Checks
Ada re-derives this chapter’s own numbers step by step, at full precision
ADA · CALCULATION AUDIT
Outlier Fences and Rule Checks
The chapter fences outliers with an IQR rule — quartiles 21 and 24 give bounds of [16.5, 28.5] that flag a suspect 85 — and quarantines a 45.0 C HVAC spike that jumps 22.8 C/s past a 0.5 C/s limit. A validation rule is only as good as the boundary number it computes. This audit reproduces the outlier fences and rule checks so a later reviewer can prove each rejection was correct.
Companion to the chapter Validation and Outlier Detection — every number here comes from that chapter.
Ada: A validation rule is only as good as the boundary number it computes, so let me reproduce the two worked examples above exactly. A fence that is off by a little quietly accepts bad data or rejects good data.
The IQR outlier bound uses the window with quartiles Q1 = 21 and Q3 = 24:
- Interquartile range:
IQR = Q3 - Q1 = 24 - 21 = 3 - Fence half-width:
1.5 x IQR = 1.5 x 3 = 4.5 - Lower fence:
Q1 - 4.5 = 21 - 4.5 = 16.5 - Upper fence:
Q3 + 4.5 = 24 + 4.5 = 28.5 - The suspect value 85 is outside
[16.5, 28.5], so it is flagged, not silently dropped.
The HVAC example applies hard rules to a 45.0 C sample that arrives one second after a 22.2 C reading, with a peer sensor reading 22.4 C:
- Rate of change:
|45.0 - 22.2| / 1 s = 22.8 / 1 = 22.8 C/s, far above the0.5 C/slimit (22.8 / 0.5 = 45.6xover). - Peer difference:
|45.0 - 22.4| = 22.6 C, far above the3 Ctolerance. - The sample fails operating-range, rate-of-change, and peer checks together, so it is quarantined while control keeps the last valid value.
The audit conclusion is narrow: the fence [16.5, 28.5] and the 0.5 C/s and 3 C limits are all reproducible from stated inputs, and that is the point. When the rule version and these boundary numbers travel with each rejected sample, a later reviewer can prove the quarantine was correct rather than trusting that something merely looked wrong.
Every number above is taken from the chapter’s own material and re-derived step by step.