Statistics.GrubbsTest Method

Double GrubbsTest(TVec Data, ref THypothesisResult hRes, ref Double Signif, ref Double[] ConfInt, THypothesisType hType, Double Alpha)

Grubb's test for outliers.

#NameDescription
1Datadataset.
2hResReturns the result of the null hypothesis (default assumption is there are no outliers).
3Signif(Significance level) returns the probability of observing the given result by chance given that the null hypothesis is true.
4ConfIntReturns the confidence interval to determine the outliers.
5hTypeDefines the type of the null hypothesis (one or two - tailed, default value two-tailed).
6AlphaDefines the desired significance level. If the significance probability (Signif) is bellow the desired significance (Alpha), the null hypothesis is rejected.

Returns: Double - Grubb's (G) statistic.

Remarks:

Grubbs' test detects one outlier at a time. This outlier is expunged from the dataset and the test is iterated until no outliers are detected. However, multiple iterations change the probabilities of detection, and the test should NOT be used for sample sizes of six or less since it frequently tags most of the points as outliers. Grubbs' test is also known as the maximum normed residual test.

Grubbs' test is defined for the hypothesis:

  • H0: There are no outliers in the data set.
  • Ha: There is at least one outlier in the data set.