Grubbs test
G = 4.657 · Critical value 2.802 · p = 7.6 × 10⁻²⁰ · two-sided · α = 0.05
Flagged values: 28.95
The normality assumption may be questionable; an outlier itself can lower W.
Paste one group or a whole table to run Grubbs, Dixon Q, Tukey IQR and z-score side by side.
One value per line, or a table with one group per column.
1 group · 24 values
Grubbs G = 4.657 · Critical value 2.802 · p < 0.001 · n = 24 · two-sided
Flagged by test: Grubbs 1 · ESD 2 · Dixon n/a · IQR 2 · Modified z 2 · z 1
| Value | z | Modified z | Flagged by |
|---|---|---|---|
| 5.28 | 0.1887 | 3.601 | Generalized ESD, Tukey IQR, Modified z-score (MAD) |
| 28.95 | 4.657 | 48.57 | Grubbs test, Generalized ESD, Tukey IQR, Modified z-score (MAD), z-score |
Shapiro–Wilk normality reference: W = 0.3115 · p < 0.001. Outliers themselves can reduce W.
G = 4.657 · Critical value 2.802 · p = 7.6 × 10⁻²⁰ · two-sided · α = 0.05
Flagged values: 28.95
The normality assumption may be questionable; an outlier itself can lower W.
Flagged values: 28.95, 5.28
No exact p value; compare Rᵢ with λᵢ.
Generalized ESD critical values are approximate, especially for samples smaller than 25.
| i | Removed | Ri | λi | Exceeds critical value |
|---|---|---|---|---|
| 1 | 28.95 | 4.657 | 2.802 | Yes |
| 2 | 5.28 | 3.016 | 2.780 | Yes |
| 3 | 2.2 | 1.724 | 2.758 | No |
| 4 | 2.2 | 1.910 | 2.734 | No |
| 5 | 2.4 | 1.741 | 2.708 | No |
| 6 | 2.4 | 1.956 | 2.681 | No |
| 7 | 2.5 | 2.023 | 2.652 | No |
| 8 | 2.7 | 1.835 | 2.620 | No |
| 9 | 2.8 | 1.828 | 2.586 | No |
| 10 | 2.9 | 1.810 | 2.548 | No |
Dixon’s Q test is tabulated for n = 3 to 10; use Grubbs’ test or the generalized ESD instead
Q1 = 2.750 · Q3 = 3.700 · Lower fence = 1.325 · Upper fence = 5.125 · k = 1.5
Flagged values: 5.28, 28.95
MAD = 0.3550 · Modified z threshold = 3.5
Flagged values: 5.28, 28.95
Largest possible |z| = 4.695 · z threshold = 3
Flagged values: 28.95
Assumes approximately normal observations apart from outliers. Rule of thumb, not a hypothesis test.
Methods Selected screening methods: Grubbs test (two-sided; α = 0.05); Generalized ESD (α = 0.05; r = Auto); Dixon Q test (r10; α = 0.05); Tukey IQR (Exclusive; k = 1.5); Modified z-score (MAD) (Modified z threshold = 3.5); z-score (z threshold = 3). No values were removed. Compare conclusions with all observations and with flagged observations excluded; investigate exclusions and report both analyses. Dixon Q test was not applied to Copper (ppm): n = 24 is outside its tabulated range (3–10).
Results Copper (ppm), n = 24: Grubbs test (G = 4.657, p < 0.001) and z-score flagged 28.95; Generalized ESD, Tukey IQR (Lower fence = 1.325, Upper fence = 5.125), and Modified z-score (MAD) flagged 5.28 and 28.95; Dixon Q test could not be applied. Compare results with all observations retained and with flagged values excluded; no data were removed automatically.
Explore different kinds of measurements and compare methods.
Compare six methods on 24 copper determinations.
A small sample shows why a z-score threshold of 3 can miss an outlier.
A later ESD step reveals three values even when the first step does not exceed its critical value.
Compare the largest gap with the tabulated Q10 critical value.
Compare a single-value test with generalized ESD.
Analyze five experiments independently from one table.
A small, consistent set of chromatographic peak areas.
Screen each treatment group separately.
Screen your measurements in four steps.
Enter one group or a table of groups.
Choose the tests and significance level.
Compare flagged values and applicability.
Download the figure or copy the methods.
| Test | How many | Sample size | Assumption | p value | Typical use |
|---|---|---|---|---|---|
| Grubbs test | One | ≥ 3 | Approximate normality | Yes | One suspected value |
| Generalized ESD | Several | ≥ 5 | Approximate normality | No | Multiple suspected values |
| Dixon Q test | One | 3–10 | Approximate normality | Table only | One suspected value |
| Tukey IQR | Any number | ≥ 4 | Descriptive rule | No | Distribution screening |
| Modified z-score (MAD) | Any number | ≥ 3 | Descriptive rule | No | Distribution screening |
| z-score | Any number | ≥ 3 | Descriptive rule | No | Distribution screening |
In analytical chemistry, Dixon’s Q test compares an extreme gap with the range. Grubbs uses the mean and sample standard deviation; generalized ESD can screen for several outliers.
For n observations the largest possible absolute sample z-score is (n−1)/√n. At n = 8 it is 2.475, below the common threshold of 3.
Two nearby extreme values can mask one another. Generalized ESD accounts for the possibility of multiple outliers.
The one-sided Grubbs test uses α/n in its critical value; the two-sided test uses α/(2n). For n = 8 and α = 0.05 these give 2.032 and 2.127.
References: NIST/SEMATECH 1.3.5.17 · Grubbs (1969) · Dixon (1951) · Rosner (1983) · Rorabacher (1991)
G = max |xᵢ − x̄| / s
Gcrit = (n − 1)/√n · √[t² / (n − 2 + t²)]
p = min(1, 2n · P(T ≥ √[k(n − 2)/(1 − k)])), k = G²n/(n − 1)²
Qhigh = (xₙ − xₙ₋₁)/(xₙ − x₁)
Qlow = (x₂ − x₁)/(xₙ − x₁)
Q1 − k · IQR, Q3 + k · IQR
zᵢ = (xᵢ − x̄)/s
Mᵢ = 0.6745 · (xᵢ − median)/MAD
For a two-sided test, t uses the upper α/(2n) tail with n − 2 degrees of freedom. A one-sided test uses α/n and replaces 2n by n in the p formula.
For the copper example, G = 4.657 exceeds the two-sided critical value 2.802 at α = 0.05.
| n | Two-sided α = 0.05 | Highest value α = 0.05 |
|---|---|---|
| 3 | 1.1543 | 1.1531 |
| 5 | 1.7150 | 1.6714 |
| 10 | 2.2900 | 2.1761 |
| 20 | 2.7082 | 2.5566 |
| 30 | 2.9085 | 2.7451 |
| 50 | 3.1282 | 2.9570 |
| 100 | 3.3841 | 3.2095 |
| n / α | 0.10 | 0.05 | 0.04 | 0.02 | 0.01 |
|---|---|---|---|---|---|
| 3 | 0.941 | 0.970 | 0.976 | 0.988 | 0.994 |
| 4 | 0.765 | 0.829 | 0.846 | 0.889 | 0.926 |
| 5 | 0.642 | 0.710 | 0.729 | 0.780 | 0.821 |
| 6 | 0.560 | 0.625 | 0.644 | 0.698 | 0.740 |
| 7 | 0.507 | 0.568 | 0.586 | 0.637 | 0.680 |
| 8 | 0.468 | 0.526 | 0.543 | 0.590 | 0.634 |
| 9 | 0.437 | 0.493 | 0.510 | 0.555 | 0.598 |
| 10 | 0.412 | 0.466 | 0.483 | 0.527 | 0.568 |
No p value is calculated from the Dixon table.
References: Harvey, Dixon Q10 · Tukey (1977) · Iglewicz & Hoaglin (1993)
Review records, instrumentation and the sample; repeat the measurement if appropriate.
Report results with and without the observation when relevant.
Record the test, side, α, value and reason for any exclusion.
Do not remove a point merely to make a test significant. Recalculate precision after any exclusion. t-test calculator · RSD calculator
References: NIST/SEMATECH · ASTM E178-21
Use Grubbs for one suspected outlier and generalized ESD for several; Dixon Q is tabulated here for 3–10 observations. Tukey IQR and modified z-scores are descriptive rules.
A threshold of 3 cannot flag any observation when n ≤ 10: the largest possible absolute sample z-score is (n−1)/√n.
Grubbs uses the sample mean and standard deviation and provides a p value. Dixon Q10 uses an extreme gap and a tabulated critical value for a single suspected outlier.
One-sided and two-sided Grubbs tests use different tail probabilities. For n = 8 at α = 0.05 they are approximately 2.032 and 2.127, respectively.
Yes. Generalized ESD evaluates up to a chosen maximum and uses the last significant step to determine how many observations to flag.
Do not delete a value solely because a test flags it. Investigate an assignable cause and report the effect of retaining or excluding it. To compare relative precision, use the RSD calculator.
The Tukey rule flags observations outside the selected IQR fences. The box plot maker uses the same quartile methods. box plot maker.
In R, outliers::grubbs.test and EnvStats::rosnerTest provide related tests. In Excel, calculate the statistic and compare it with an appropriate critical value.
Grubbs, generalized ESD and Dixon Q assume the non-outlying observations are approximately normal. An outlier itself can affect a normality test.
Compare the evidence and document your decisions.
Test for outliers