Skip to content

Instantly share code, notes, and snippets.

@evilying
Created July 7, 2018 19:47
Show Gist options
  • Save evilying/67c46380b149534fcdb46dad0070d7f9 to your computer and use it in GitHub Desktop.
Save evilying/67c46380b149534fcdb46dad0070d7f9 to your computer and use it in GitHub Desktop.

Grubbs’ outlier test

Grubbs’ test is an algorithm that finds a single outlier in a normally distributed dataset by considering the current minimum or maximum value in the series. The algorithm is applied iteratively, removing the previously detected outlier between each iteration. Although we do not go into the details here, a common way to use Grubbs’ outlier test to detect anomalies is to calculate the Grubbs’ test statistic and Grubbs’ critical value, and mark the point as an outlier if the test statistic is greater than the critical value. This approach is only suitable for normal distributions, and can be inefficient because it only detects one anomaly in each iteration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment