Grubbs’ Test for Outliers Calculator

Grubbs’ test (maximum normed residual) for a single outlier: the G statistic, the critical value at your significance level, and a one- or two-sided decision.

3 to 1000 values that are roughly normally distributed apart from the suspect point. Use a point for decimals (1.5), no thousands separators, and separate numbers with spaces or a comma and a space.
%
The chance of flagging an outlier when there is none. 5% is the usual choice.

Results

Grubbs’ statistic (G)
2.4688
Critical value at α = 5%
2.0317
The suspect value is flagged when G is larger than this.
Result
Flagged: 245.57 is a statistical outlier at the 5% level (G > critical value)
Value tested
245.57
Mean
206.43
Sample standard deviation (s)
15.853
Count (N)
8

How it’s calculated

Grubbs’ test (also called the maximum normed residual test) checks whether the most extreme value in a data set is an outlier. It assumes the rest of the data are roughly normally distributed and tests one suspect point at a time. If you suspect several outliers, use a method designed for that (for example the generalized extreme studentized deviate test) instead of removing points one by one.

G = max |Yᵢ − Ȳ| ÷ s (two-sided) G = (Y_max − Ȳ) ÷ s or G = (Ȳ − Y_min) ÷ s (one-sided) Flag the point when G > ((N − 1) ÷ √N) × √( t² ÷ (N − 2 + t²) ) t = critical value of Student's t with N − 2 degrees of freedom at α ÷ (2N) (two-sided) or α ÷ N (one-sided)

Example (NIST/SEMATECH e-Handbook 1.3.5.17.1): eight mass spectrometer readings 199.31, 199.53, 200.19, 200.82, 201.92, 201.95, 202.18 and 245.57. The mean is 206.434 and s = 15.853, so for the maximum G = (245.57 − 206.434) ÷ 15.853 = 2.4687. For an upper one-sided test at α = 0.05 the critical value is 2.032, and since 2.4687 > 2.032 the largest reading is flagged as an outlier.

Flagging a point is a prompt to investigate it, not a reason to delete it. Check for a recording error first.

Frequently asked questions

Should I use the one-sided or the two-sided test?

Use one-sided when you decided in advance, from looking at the situation rather than the numbers, that only the largest (or only the smallest) value could be wrong. Use two-sided if either end could be an outlier. The two-sided test is more cautious.

Can I run the test again after removing an outlier?

Repeating Grubbs’ test again and again changes its error rates. If you may have more than one outlier, a test built for multiple outliers is more appropriate.

How is this different from the 1.5 × IQR rule?

The IQR rule uses quartiles and flags any number of points. Grubbs’ test uses the mean and standard deviation, tests a single point, and depends on the data being roughly normal.

Why does the test need at least 3 numbers?

The critical value uses a t distribution with N − 2 degrees of freedom, which needs N of at least 3. Small samples also make the test weak, so be careful with very short lists.

Embed this calculator

Add this free calculator to your own website. Copy the code below into your page’s HTML:

Need this calculator branded, changed or built around your own prices?See custom business solutions →

Sources

Formulas are taken from the free public references above. Results are provided “as is” for informational and educational purposes only. See our disclaimer.

Added · Last updated · How we check our calculators

Spotted a mistake or missing option? Report a problem· Suggest a calculator