BioDeviceHub

Outlier Screening Tool (Grubbs, Tukey, Modified Z)

Screen measurements for outliers by Grubbs' test, Tukey's fences and the modified Z-score, with each value flagged by each method and a reminder not to delete data.

Formula

Grubbs:G=max⁡∣xi−xˉ∣s, compared with a critical value from the t distribution\text{Grubbs:}\quad G = \dfrac{\max|x_i - \bar{x}|}{s},\ \text{compared with a critical value from the } t \text{ distribution}
Tukey: outside Q1−k IQR or Q3+k IQR\text{Tukey: outside } Q_1 - k\,\mathrm{IQR} \ \text{or}\ Q_3 + k\,\mathrm{IQR}
Mi=0.6745 (xi−x~)MAD,flagged above 3.5M_i = \dfrac{0.6745\,(x_i - \tilde{x})}{\mathrm{MAD}},\quad \text{flagged above } 3.5
IQR\mathrm{IQR}
interquartile range, Q3 − Q1
MAD\mathrm{MAD}
median absolute deviation from the median

How it works

One value that seems far from the rest raises the question of whether it belongs. Three screens are run side by side. Grubbs' test is a formal significance test for a single outlier in normal data. Tukey's fences mark values beyond 1.5 interquartile ranges outside the quartiles, and use ranks, so are not thrown off by the outlier itself. The modified Z-score uses the median and the median absolute deviation, which are robust, and flags values above 3.5.

When they agree the case is stronger, but none of them says why a value is unusual. An outlier may be a pipetting slip, a wrong sample, or a real observation, and real observations should not be discarded. Discard a point only when you have found a cause and documented it.

Worked example

Ten measurements, nine near 10 and one at 12.9.

  1. Mean 10.37, SD 0.907; G = |12.9 − 10.37| / 0.907 = 2.79, against a critical value of 2.29 (α = 0.05, n = 10).
  2. Quartiles 10.0 and 10.275 give fences at 9.587 and 10.69; modified Z of 12.9 is 12.59.

All three screens flag 12.9. The other nine values are not flagged.

These are the values the calculator opens with, so you can check its output against this example.

Assumptions

  • For Grubbs, normally distributed data with at most one outlier.
  • Independent measurements of the same quantity.
  • Tukey's multiplier of 1.5 marks outliers and 3 marks extreme ones.

Common mistakes

  • Removing data to make the result look better.
  • Applying Grubbs' test repeatedly until nothing is left.
  • Screening fewer than seven values, where none of the methods has much power.